Skip to content

About

Inventory and Order Management System built with FastAPI, React, PostgreSQL and Docker

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

9 Commits

Folders and files

Repository files navigation

Inventory and Order Management System

A simplified Inventory and Order Management System for managing products, customers, orders, and inventory tracking. Built with FastAPI, React, PostgreSQL and Docker as per the assessment requirements.

Tech Stack

  • Frontend: React.js with React Router and Axios
  • Backend: Python FastAPI
  • Database: PostgreSQL
  • Containerization: Docker and Docker Compose
  • Frontend Hosting: Vercel
  • Backend Hosting: Render

Project Structure

inventory-management/ ├── backend/ │ ├── app/ │ │ ├── models/ │ │ │ └── models.py │ │ ├── routes/ │ │ │ ├── products.py │ │ │ ├── customers.py │ │ │ └── orders.py │ │ ├── database.py │ │ └── main.py │ ├── Dockerfile │ ├── requirements.txt │ └── .env ├── frontend/ │ ├── src/ │ │ ├── components/ │ │ │ └── Navbar.js │ │ ├── pages/ │ │ │ ├── Dashboard.js │ │ │ ├── Products.js │ │ │ ├── Customers.js │ │ │ ├── Orders.js │ │ │ └── Inventory.js │ │ ├── App.js │ │ └── index.js │ ├── Dockerfile │ └── .env ├── docker-compose.yml └── README.md

Features

Dashboard

  • Animated welcome screen with typing effect
  • Real time business overview with key metrics
  • Recent orders summary
  • System online status indicator

Products Management

  • Add, edit, and delete products
  • Unique SKU enforcement across all products
  • Search by product name or SKU
  • Stock status badges showing In Stock or Low Stock

Customers Management

  • Add, edit, and delete customers
  • Unique email enforcement across all customers
  • Search by name or email
  • Customer avatar generated from initials

Orders Management

  • Create orders with multiple product items
  • Automatic stock reduction when order is placed
  • Orders are blocked when product stock is insufficient
  • Update order status between pending, completed, and cancelled
  • Search by customer name or order ID

Inventory Tracking

  • Real time stock level monitoring across all products
  • Visual stock progress bars for quick assessment
  • Filter products by All, In Stock, Low Stock, and Out of Stock
  • Update stock directly from inventory page
  • Total inventory value calculation

Business Rules

  • Every product must have a unique SKU
  • Every customer must have a unique email address
  • Orders cannot be placed if product stock is insufficient
  • Stock quantity is automatically reduced when an order is placed
  • Order status can be updated to pending, completed, or cancelled

API Endpoints

Products

  • GET /api/products/ - Retrieve all products
  • POST /api/products/ - Create a new product
  • GET /api/products/{id} - Retrieve a single product
  • PUT /api/products/{id} - Update a product
  • DELETE /api/products/{id} - Delete a product

Customers

  • GET /api/customers/ - Retrieve all customers
  • POST /api/customers/ - Create a new customer
  • GET /api/customers/{id} - Retrieve a single customer
  • PUT /api/customers/{id} - Update a customer
  • DELETE /api/customers/{id} - Delete a customer

Orders

  • GET /api/orders/ - Retrieve all orders
  • POST /api/orders/ - Create a new order
  • GET /api/orders/{id} - Retrieve a single order
  • PUT /api/orders/{id}/status - Update order status
  • DELETE /api/orders/{id} - Delete an order

Running Locally

Requirements

  • Docker Desktop
  • Git

Steps

Step 1 - Clone the repository: git clone https://github.com/Shrutir15/Inventory-Management.git cd Inventory-Management

Step 2 - Start the application: docker compose up --build

Step 3 - Open in browser: Frontend: http://localhost:3000 Backend API: http://localhost:8000 API Documentation: http://localhost:8000/docs

Environment Variables

Backend

  • DATABASE_URL: PostgreSQL connection string

Frontend

  • REACT_APP_API_URL: Backend API base URL

Live Application

Docker Hub

GitHub Repository

https://github.com/Shrutir15/Inventory-Management

About

Inventory and Order Management System built with FastAPI, React, PostgreSQL and Docker

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages