Skip to content

AmaanShikalgar/StockFlow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 

Repository files navigation

StockFlow

Full-Stack Inventory Management System
Built with FastAPI ⚡ PostgreSQL 🐘 SQLAlchemy 🧠 React ⚛️

Project Preview

Features

  • 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)

Tech Stack

Backend: FastAPI, SQLAlchemy, PostgreSQL, Pydantic, Uvicorn, JWT Authentication

Frontend: React (Vite), Axios, CSS (custom UI), LocalStorage (Auth state)


📁 Project Structure

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

API Endpoints

🔐 Auth

  • POST /register → Register user
  • POST /login → Login & get JWT token

📦 Products (Protected)

  • GET /products → Get all products
  • GET /products/{id} → Get product by id
  • POST /products → Add product
  • PUT /products/{id} → Update product
  • DELETE /products/{id} → Delete product

Setup Instructions

🔹 Clone repo

git clone https://github.com/your-username/StockFlowAPI.git
cd StockFlowAPI

🔹 Backend setup

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


🔹 Frontend setup

cd frontend
npm install
npm run dev

Frontend → http://localhost:3000


Authentication Flow

  1. User registers → credentials stored securely
  2. User logs in → receives JWT token
  3. Token stored in localStorage
  4. Token sent with API requests
  5. Protected routes validate token

Learnings

  • 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

👨‍💻 Author

Amaan Shikalgar Full Stack Developer


⭐ Support

If you like this project, give it a ⭐ on GitHub!

About

StockFlowAPI is a modern full-stack inventory management application that enables secure product management using JWT authentication. Built with FastAPI, PostgreSQL, and React, it provides protected CRUD operations, a responsive UI, and seamless frontend-backend integration with features like search, filtering, and sorting.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors