Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fastapi-react-inventory

🚀 FastAPI + React Inventory Management App

A full-stack inventory management application built using FastAPI (Python) for the backend and React (Vite) for the frontend.

This project demonstrates full CRUD operations, PostgreSQL integration, environment variable configuration, and modern frontend development practices.


📌 Features

  • ✅ Create new products
  • ✅ View all products
  • ✅ Update existing products
  • ✅ Delete products
  • ✅ PostgreSQL database integration
  • ✅ Environment-based configuration using .env
  • ✅ Clean REST API design
  • ✅ Responsive UI with React
  • ✅ Proper Git & project structure

🛠 Tech Stack

Backend

  • FastAPI
  • SQLAlchemy
  • PostgreSQL
  • Python
  • python-dotenv

Frontend

  • React (Vite)
  • JavaScript (ES6+)
  • CSS

fastapi-demo/ │ ├── frontend/ # React frontend │ ├── main.py # FastAPI entry point ├── database.py # DB connection setup ├── database_models.py # SQLAlchemy models ├── models.py # Pydantic schemas │ ├── .env # Environment variables (ignored) ├── .gitignore └── README.md


⚙️ Setup Instructions

1️⃣ Clone the repository

git clone https://github.com/AbhijitK20/fastapi-react-inventory.git

cd fastapi-react-inventory


2️⃣ Backend Setup

Create a virtual environment:

python -m venv myenv myenv\Scripts\activate # Windows

Install dependencies:

pip install -r requirements.txt

Create a .env file:

DATABASE_URL=postgresql://username:password@localhost:5432/dbname

Run FastAPI:

uvicorn main:app --reload

Backend runs on:

http://localhost:8000

Swagger docs:

http://localhost:8000/docs


3️⃣ Frontend Setup

Go to frontend folder:

cd frontend

Install dependencies:

npm install

Run development server:

npm run dev

Frontend runs on:

http://localhost:5173


🔐 Environment Variables

Sensitive information like database credentials are stored in a .env file and excluded from version control using .gitignore.


📷 Screenshots

(Add screenshots of your UI here)


🚀 Future Improvements

  • Authentication (JWT)
  • User roles (Admin / Viewer)
  • Pagination & sorting
  • Docker containerization
  • Deployment to cloud (Render / Railway / Vercel)

👨‍💻 Author

Abhijit Kapure

GitHub: https://github.com/AbhijitK20


📜 License

This project is for educational and portfolio purposes.

📂 Project Structure

About

fastapi with react used to build profucts list which can be crud

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages