Skip to content

Shivank2005/Track

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Track - Product Inventory Management

A comprehensive product inventory management system built with FastAPI backend and React frontend, providing seamless tracking and management of product inventory.

Features

  • GET /: Welcome endpoint
  • GET /products/: Get all products
  • GET /products/{product_id}: Get a specific product by ID
  • POST /products/: Create a new product

Setup

  1. Create and activate virtual environment:

    python -m venv myenv
    myenv\Scripts\activate.ps1  # Windows PowerShell
  2. Install dependencies:

    pip install fastapi uvicorn
  3. Run the application:

    uvicorn main:app --reload
  4. Access the API:

Project Structure

stocksphere/
├── main.py          # FastAPI application with endpoints
├── models.py        # Pydantic models
├── .gitignore       # Git ignore file
└── README.md        # This file

API Usage Examples

Get all products

curl http://localhost:8000/products/

Get product by ID

curl http://localhost:8000/products/1

Create a new product

curl -X POST "http://localhost:8000/products/" \
     -H "Content-Type: application/json" \
     -d '{
       "id": 5,
       "name": "Monitor",
       "description": "4K monitor",
       "price": 299.99,
       "quantity": 15
     }'

Models

Product

  • id: integer
  • name: string
  • description: string
  • price: float
  • quantity: integer

Built With

  • FastAPI - Modern, fast web framework for building APIs
  • Pydantic - Data validation using Python type hints
  • Uvicorn - ASGI server implementation

About

Full-stack FastAPI CRUD application with frontend UI, PostgreSQL database, and SQLAlchemy ORM, demonstrating REST API design and full-stack development skills.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors