How sheetalnagar16/inventory-app works
This is a full-stack inventory and order management system. A user works through the React dashboard or product, customer, and order pages; those pages call the shared HTTP client, which sends requests to FastAPI routes that validate business rules and read or update PostgreSQL-backed records. Order creation checks customers and stock, calculates totals, and deducts inventory; cancellation restores it. The dashboard summarizes counts and low-stock products. The route handlers, ORM models, schemas, and database connection are shown as distinct backend layers. Some connections are documented in the README; unsampled database configuration details are not inferred.
Main entry points: api.js API client · database.py DB connection · App.js App routing · models.py ORM entities
Components 15
Web interface
- App routing
frontend/src/App.js - Dashboard
frontend/src/pages/Dashboard.jsx - Products UI
frontend/src/pages/Products.jsx - Customers UI
frontend/src/pages/Customers.jsx - Orders UI
frontend/src/pages/Orders.jsx - API client
frontend/src/api.js
API and domain
- Product routes
backend/main.py - Customer routes
backend/main.py - Order routes
backend/main.py - Dashboard route
backend/main.py - Request schemas
backend/schemas.py
Persistence
- ORM entities
backend/models.py - DB connection
backend/database.py - PostgreSQL
Other components
- User
Connections 26
- User → App routing: uses
- App routing → Dashboard: routes to
frontend/src/App.js - App routing → Products UI: routes to
frontend/src/App.js - App routing → Customers UI: routes to
frontend/src/App.js - App routing → Orders UI: routes to
frontend/src/App.js - Dashboard → API client: requests summary
frontend/src/pages/Dashboard.jsx - Products UI → API client: requests products
frontend/src/pages/Products.jsx - Customers UI → API client: requests customers
frontend/src/pages/Customers.jsx - Orders UI → API client: requests orders
frontend/src/pages/Orders.jsx - API client → Product routes: calls endpoints
frontend/src/api.js - API client → Customer routes: calls endpoints
frontend/src/api.js - API client → Order routes: calls endpoints
frontend/src/api.js - API client → Dashboard route: calls endpoint
frontend/src/api.js - Product routes → Request schemas: validates and shapes
backend/main.py - Customer routes → Request schemas: validates and shapes
backend/main.py - Order routes → Request schemas: validates and shapes
backend/main.py - Product routes → ORM entities: queries and updates
backend/main.py - Customer routes → ORM entities: queries and updates
backend/main.py - Order routes → ORM entities: checks and updates
backend/main.py - Dashboard route → ORM entities: counts and filters
backend/main.py - Product routes → DB connection: uses session
backend/main.py - Customer routes → DB connection: uses session
backend/main.py - Order routes → DB connection: uses session
backend/main.py - Dashboard route → DB connection: uses session
backend/main.py - ORM entities → DB connection: imports base
backend/models.py - DB connection → PostgreSQL: connects to
README.md