Skip to content

Priyashanmugasundaram005/Inventory-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

11 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Flask Inventory Management System

A comprehensive inventory management system built with Flask that allows you to manage products, track movements, and generate reports across multiple locations.

🌟 Features

Core Functionality

  • Product Management: Add, edit, and delete products
  • Location-based Storage: Manage products across multiple predefined locations
  • Movement Tracking: Track product movements between locations
  • Duplicate Prevention: Automatically merges products with same name, price, and location
  • Reports: Generate location-based product reports
  • Modern UI: Beautiful, responsive design with hover effects

Predefined Locations

The system comes with 6 hardcoded locations that can be easily modified:

  • Chennai
  • Coimbatore
  • Madurai
  • Trichy
  • Salem
  • Bangalore

πŸš€ Quick Start

Prerequisites

  • Python 3.7 or higher
  • pip (Python package installer)

Installation

  1. Clone the repository

    git clone https://github.com/Priyashanmugasundaram005/Inventory-app.git
    cd Inventory-app
  2. Install dependencies

    pip install flask flask-sqlalchemy
  3. Run the application

    python app.py
  4. Access the application

    • Open your browser and go to: http://localhost:8089
    • The application will be running on all network interfaces

πŸ“ Project Structure

Inventory-app/
β”œβ”€β”€ app.py                 # Main Flask application
β”œβ”€β”€ models.py              # Database models and hardcoded locations
β”œβ”€β”€ views.py               # Route handlers and business logic
β”œβ”€β”€ static/
β”‚   β”œβ”€β”€ styles.css         # Modern CSS styling
β”‚   └── image1.jpg         # Background image
β”œβ”€β”€ templates/
β”‚   β”œβ”€β”€ base.html          # Base template
β”‚   β”œβ”€β”€ index.html         # Product list view
β”‚   β”œβ”€β”€ add_product.html   # Add product form
β”‚   β”œβ”€β”€ add_movement.html  # Add movement form
β”‚   β”œβ”€β”€ view_movement.html # View movements
β”‚   β”œβ”€β”€ shift_product.html # Edit product
β”‚   └── report.html        # Product reports
β”œβ”€β”€ instance/
β”‚   └── inventory.db       # SQLite database (auto-created)
β”œβ”€β”€ .gitignore             # Git ignore rules
└── README.md              # This file

🎯 Usage Guide

Adding Products

  1. Click "Add Product" from the main page

  2. Fill in product details:

    • Product Name
    • Price
    • Quantity
    • Location (select from dropdown)
  3. Submit the form

    add product

Smart Duplicate Handling: If you add a product with the same name, price, and location, the system will automatically increase the quantity of the existing product instead of creating a duplicate.

Managing Products

  • Edit: Click "Edit" to modify product details or change location
  • Delete: Click "Delete" to remove a product (with confirmation dialog)

Tracking Movements

  1. Go to "Movement" β†’ "Add Movement"
  2. Select:
    • Product to move
    • From Location (optional)
    • To Location
    • Quantity to move
  3. Submit to record the movement

Viewing Reports

  • Click "Reports" to see all products organized by location
  • View quantity and pricing information for each location report

πŸ”§ Customization

Adding New Locations

You no longer need to modify the LOCATIONS list in models.py. New locations can now be added dynamically through the application UI.

Go to the β€œAdd Location” section in the app, enter the location name, and save it β€” the new entry will be stored automatically and available system-wide.

Database

  • The application uses SQLite database stored in instance/inventory.db
  • Database tables are automatically created on first run
  • No additional setup required

πŸ› οΈ Technical Details

Built With

  • Backend: Flask (Python web framework)
  • Database: SQLite with SQLAlchemy ORM
  • Frontend: HTML5, CSS3, JavaScript
  • Styling: Custom CSS with modern design principles

Key Features Implementation

  • Duplicate Prevention: Smart logic that checks name, price, and location before creating new products
  • Responsive Design: Works on desktop and mobile devices
  • Form Validation: Client and server-side validation
  • Error Handling: Graceful error handling with user feedback

πŸ“Š Database Schema

Product Table

  • id: Primary key
  • name: Product name
  • price: Product price
  • quantity: Available quantity
  • location: Storage location

ProductMovement Table

  • id: Primary key
  • timestamp: Movement date/time
  • product_id: Foreign key to Product
  • from_location: Source location
  • to_location: Destination location
  • qty: Quantity moved

πŸ”’ Security Features

  • Form validation and sanitization
  • SQL injection protection via SQLAlchemy ORM
  • Confirmation dialogs for destructive actions

πŸš€ Deployment

The application is ready for deployment on various platforms:

  • Local Development: Run python app.py
  • Production: Use WSGI servers like Gunicorn
  • Cloud Platforms: Deploy to Heroku, AWS, Google Cloud, etc.

πŸ“ License

This project is open source and available under the MIT License.

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Submit a pull request

πŸ“ž Support

If you encounter any issues or have questions, please create an issue in the GitHub repository.


Made with ❀️ using Flask

Sample video: https://github.com/user-attachments/assets/88a45fef-d102-44df-bbdb-8431db407d5a

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors