Skip to content

Sasaank79/Inventory-Management-System

Repository files navigation

Inventory Management System

Python Flask PostgreSQL Deployment CI License

A production-ready inventory management system built with Flask and PostgreSQL, featuring real-time analytics, product tracking, and automated database seeding.

🌐 Live Demo

https://inventory-management-ylmu.onrender.com

Hosted on Render free tier - first request may take 30-60 seconds (cold start)

🔑 Demo Credentials: admin / PasswordforAdmin

📸 Screenshots

Login

Login Page

Dashboard

Dashboard

Products Management

Products

Product Search

Product Search

Analytics

Analytics Dashboard

✨ Key Features

  • Product Management - CRUD operations with SKU tracking and archiving
  • Stock Transactions - Record purchases (IN) and sales (OUT) with notes
  • Real-time Analytics - Low stock alerts, top sellers, stock value by category
  • Supplier Tracking - Maintain supplier relationships and contact info
  • Advanced Reporting - Stock movement history, products by supplier
  • Secure Authentication - JWT-based API with password hashing
  • Auto-seeding - Generates 100 products and 20 suppliers on first deploy

🛠️ Tech Stack

Backend: Python 3.11 • Flask 3.0 • SQLAlchemy
Database: PostgreSQL 15
Deployment: Docker • Render
Testing: pytest • GitHub Actions CI

🚀 Quick Start

Run Locally with Docker

git clone https://github.com/Sasaank79/Inventory-Management-System.git
cd Inventory-Management-System
docker-compose up

Access at http://localhost:5000.

Note: No default credentials are included. Use ADMIN_USERNAME and ADMIN_PASSWORD in your .env file or environment variables, then run the application to auto-create the admin user.

Deploy to Render

  1. Fork this repository
  2. Connect to Render using the Blueprint
  3. Set environment variables (ADMIN_USERNAME, ADMIN_PASSWORD)
  4. Deploy automatically via render.yaml

See Deployment Guide for detailed instructions.

📊 API Highlights

POST   /auth/login              # Authenticate user
GET    /api/products            # List products (paginated)
POST   /api/transactions        # Record stock transaction
GET    /api/analytics/low-stock # Get low stock alerts

Full API documentation: docs/API.md (coming soon)

🧪 Testing

Coverage

35 automated tests covering all core modules with 96% code coverage.

# Run tests with coverage
pytest tests/ -v --cov=app

# Lint code
flake8 app/ config/ tests/

Test Coverage by Module:

Module Coverage
Auth & Security 100%
Products API 99%
Suppliers API 100%
Analytics API 93%
Transactions 85%

📁 Project Structure

app/
├── routes/          # API endpoints (auth, products, analytics)
├── models.py        # SQLAlchemy models
└── templates/       # Frontend HTML

config/              # Environment-based settings
tests/               # pytest test suite
render.yaml          # Deployment blueprint

📝 License

MIT License - see LICENSE file

🔗 Links


Built by Sasaank79

About

Production-ready inventory management system featuring real-time analytics, SKU tracking, and automated database seeding. Built with Flask, PostgreSQL, and SQLAlchemy. Deployed on Render.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors