A simple Full-Stack Product Management System built with FastAPI (Backend), PostgreSQL (Database), and React (Frontend).
You can add, edit, delete, and manage products easily 🚀.
- Add new products with details (ID, Name, Description, Price, Quantity)
- Edit and update product information
- Delete products
- Display product list in a table
- Error/success messages for actions
- API documentation available via Swagger UI (
/docs)
- Backend: FastAPI, SQLAlchemy, Pydantic
- Database: PostgreSQL
- Frontend: React.js
- Others: Uvicorn, Alembic (for migrations), CORS handling
- Designing REST APIs (
GET,POST,PUT,DELETE) - Database models with SQLAlchemy (tables, relationships)
- CRUD operations (Create, Read, Update, Delete)
- Error handling (e.g., when product not found)
- API documentation with Swagger (
/docs)
- Designing a schema (
productstable with id, name, description, price, quantity) - Running migrations (Alembic, optional later)
- Writing queries for filtering, sorting
- Fetching data from FastAPI API
- Displaying product lists in a table
- Handling forms (Add Product)
- Showing error/success messages
- Managing state (e.g., products list after add/edit/delete)
- Connecting React frontend with FastAPI backend
- Understanding CORS issues and how to fix them
- Deploying both backend + frontend (Heroku, Render, Vercel, etc.)
- Using
.envfiles for secrets (DB password, API URL)
- Authentication (login system for admin)
- File uploads (e.g., product images)
- Search, filter, pagination for products
- Dockerizing your project
# Clone the repo
git clone <your-repo-url>
cd FASTAPI
# Create virtual environment
python -m venv myenv
.\myenv\Scripts\activate # On Windows
source myenv/bin/activate # On Mac/Linux
# Install dependencies
pip install -r requirements.txt
# Run FastAPI server
uvicorn main:app --reloadBackend will be running at: 👉 http://127.0.0.1:8000 👉 Swagger Docs: http://127.0.0.1:8000/docs
cd frontend
npm install
npm startFrontend will run at: 👉 http://localhost:3000
FASTAPI/
│── main.py # FastAPI entry point
│── database.py # Database connection
│── models.py # SQLAlchemy models
│── database_models.py # Product schema
│── requirements.txt # Python dependencies
│── frontend/ # React app (UI)
│── myenv/ # Virtual environment (ignored in git)
│── .gitignore
- ✅ Add user authentication (login system for admin)
- ✅ Add product image upload
- ✅ Add search & filter functionality
- ✅ Add pagination for product list
- ✅ Deploy using Docker & CI/CD