https://github.com/eugen-goebel/inventory-management
Full-stack inventory management with React/TypeScript frontend and FastAPI/SQLAlchemy backend
https://github.com/eugen-goebel/inventory-management
docker fastapi full-stack python react rest-api sqlalchemy tailwindcss typescript vite
Last synced: 3 months ago
JSON representation
Full-stack inventory management with React/TypeScript frontend and FastAPI/SQLAlchemy backend
- Host: GitHub
- URL: https://github.com/eugen-goebel/inventory-management
- Owner: eugen-goebel
- License: mit
- Created: 2026-03-29T15:56:49.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2026-03-29T22:33:55.000Z (3 months ago)
- Last Synced: 2026-03-30T00:51:37.383Z (3 months ago)
- Topics: docker, fastapi, full-stack, python, react, rest-api, sqlalchemy, tailwindcss, typescript, vite
- Language: Python
- Size: 65.4 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Inventory Management Dashboard
Full-stack inventory management system with a React/TypeScript frontend and FastAPI backend. Tracks products, stock movements, and suppliers with real-time analytics.




## Screenshots
**Dashboard** — KPI cards, stock value by category, top products by value

**Products** — Product list with search, category filter, and low-stock indicator

**Movements** — Audit trail of inbound/outbound stock movements

**Login** — JWT authentication with role-based access control (admin/staff/viewer)

## Architecture
```
┌─────────────────────────────────┐
│ React + TypeScript │
│ Vite + Tailwind CSS │
│ Recharts │
│ Port 5173 (dev) │
└──────────────┬──────────────────┘
│ REST API
▼
┌─────────────────────────────────┐
│ FastAPI + Python │
│ SQLAlchemy ORM │
│ Pydantic v2 │
│ Port 8000 │
└──────────────┬──────────────────┘
│
▼
┌─────────────────────────────────┐
│ SQLite │
│ inventory.db │
└─────────────────────────────────┘
```
## Features
- **Dashboard**: KPI cards, stock value by category (bar chart), top products, recent movements
- **Product Management**: CRUD operations, search, category filter, low-stock alerts
- **Stock Movements**: Record inbound/outbound stock with reference tracking
- **Supplier Management**: CRUD with product count tracking
- **Analytics API**: Real-time stock value, category breakdown, movement history
- **Data Validation**: Pydantic v2 schemas, unique SKU enforcement, stock integrity checks
- **30+ Backend Tests** with pytest
## Tech Stack
### Frontend




### Backend




### DevOps


## Quick Start
### With Docker
```bash
docker build -t inventory-management .
docker run -p 8000:8000 inventory-management
```
Open http://localhost:8000 in your browser.
### Manual Setup
**Backend:**
```bash
cd backend
pip install -r requirements.txt
python -m data.seed # Generate sample data
uvicorn main:app --reload # Start API at localhost:8000
```
**Frontend:**
```bash
cd frontend
npm install
npm run dev # Start dev server at localhost:5173
```
### API Documentation
Once the backend is running, visit http://localhost:8000/docs for interactive Swagger documentation.
## API Endpoints
| Method | Endpoint | Description |
|--------|----------|-------------|
| GET | /api/products | List products (search, category, low_stock filter) |
| POST | /api/products | Create product |
| PUT | /api/products/{id} | Update product |
| DELETE | /api/products/{id} | Delete product (only if stock is 0) |
| GET | /api/movements | List stock movements |
| POST | /api/movements | Record stock in/out |
| GET | /api/suppliers | List suppliers |
| POST | /api/suppliers | Create supplier |
| PUT | /api/suppliers/{id} | Update supplier |
| DELETE | /api/suppliers/{id} | Delete supplier (only if no products) |
| GET | /api/analytics/dashboard | Dashboard KPIs and charts |
## Project Structure
```
inventory-management/
├── backend/
│ ├── agents/
│ │ ├── routes.py # API endpoint definitions
│ │ ├── product_service.py # Product CRUD logic
│ │ ├── movement_service.py # Stock movement logic
│ │ ├── supplier_service.py # Supplier CRUD logic
│ │ └── analytics_service.py # Dashboard analytics
│ ├── models/
│ │ ├── orm.py # SQLAlchemy table definitions
│ │ └── schemas.py # Pydantic request/response models
│ ├── db/
│ │ └── database.py # Database connection and session
│ ├── data/
│ │ └── seed.py # Sample data generator
│ ├── tests/ # 30+ pytest tests
│ ├── main.py # FastAPI application entry point
│ └── requirements.txt
├── frontend/
│ ├── src/
│ │ ├── pages/ # Dashboard, Products, Movements, Suppliers
│ │ ├── components/ # KpiCard, Modal, Layout, LoadingSpinner
│ │ ├── api/ # API client with fetch wrapper
│ │ └── types/ # TypeScript interfaces
│ ├── package.json
│ └── vite.config.ts
├── Dockerfile
└── README.md
```
## Running Tests
```bash
cd backend
pytest -v
```
## License
MIT