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!