Full-Stack Inventory Management System
Built with FastAPI β‘ PostgreSQL π SQLAlchemy π§ React βοΈ
- JWT Authentication (Login & Register)
- Protected API routes
- Full CRUD operations on products
- FastAPI high-performance backend
- PostgreSQL database integration
- SQLAlchemy ORM
- Pydantic validation
- React frontend with modern UI
- Clean and responsive UI (Auth + Dashboard)
- Search, filter & sort products
- Real-time UI updates after CRUD
- Deployed backend (Render)
Backend: FastAPI, SQLAlchemy, PostgreSQL, Pydantic, Uvicorn, JWT Authentication
Frontend: React (Vite), Axios, CSS (custom UI), LocalStorage (Auth state)
StockFlowAPI
βββ backend
β βββ main.py
β βββ database.py
β βββ models.py
β βββ security.py
β βββ routes/
β βββ .env (ignored)
β
βββ frontend
β βββ src
β β βββ components (Login, Register)
β β βββ api.js
β β βββ App.js
β β βββ App.css
β βββ public
β βββ package.json
β
βββ README.md
POST /registerβ Register userPOST /loginβ Login & get JWT token
GET /productsβ Get all productsGET /products/{id}β Get product by idPOST /productsβ Add productPUT /products/{id}β Update productDELETE /products/{id}β Delete product
git clone https://github.com/your-username/StockFlowAPI.git
cd StockFlowAPI
cd backend
python -m venv venv
venv\Scripts\activate
pip install -r requirements.txt
Create .env
DATABASE_URL=postgresql://postgres:password@localhost:5432/stockflow
SECRET_KEY=your_secret_key
Run backend
uvicorn main:app --reload
Backend β http://127.0.0.1:8000 Docs β http://127.0.0.1:8000/docs
cd frontend
npm install
npm run dev
Frontend β http://localhost:3000
- User registers β credentials stored securely
- User logs in β receives JWT token
- Token stored in localStorage
- Token sent with API requests
- Protected routes validate token
- Implemented JWT authentication in FastAPI
- Built scalable REST APIs with proper structure
- Integrated PostgreSQL with SQLAlchemy ORM
- Connected React frontend with secured backend
- Designed modern UI with clean UX
- Debugged real-world deployment & CORS issues
- Managed full-stack project deployment
Amaan Shikalgar Full Stack Developer
If you like this project, give it a β on GitHub!