A comprehensive inventory management system built with Flask that allows you to manage products, track movements, and generate reports across multiple locations.
- 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
The system comes with 6 hardcoded locations that can be easily modified:
- Chennai
- Coimbatore
- Madurai
- Trichy
- Salem
- Bangalore
- Python 3.7 or higher
- pip (Python package installer)
-
Clone the repository
git clone https://github.com/Priyashanmugasundaram005/Inventory-app.git cd Inventory-app -
Install dependencies
pip install flask flask-sqlalchemy
-
Run the application
python app.py
-
Access the application
- Open your browser and go to:
http://localhost:8089 - The application will be running on all network interfaces
- Open your browser and go to:
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
-
Click "Add Product" from the main page
-
Fill in product details:
- Product Name
- Price
- Quantity
- Location (select from dropdown)
-
Submit the form
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.
- Edit: Click "Edit" to modify product details or change location
- Delete: Click "Delete" to remove a product (with confirmation dialog)
- Go to "Movement" β "Add Movement"
- Select:
- Product to move
- From Location (optional)
- To Location
- Quantity to move
- Submit to record the movement
- Click "Reports" to see all products organized by location
- View quantity and pricing information for each location

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.
- The application uses SQLite database stored in
instance/inventory.db - Database tables are automatically created on first run
- No additional setup required
- Backend: Flask (Python web framework)
- Database: SQLite with SQLAlchemy ORM
- Frontend: HTML5, CSS3, JavaScript
- Styling: Custom CSS with modern design principles
- 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
id: Primary keyname: Product nameprice: Product pricequantity: Available quantitylocation: Storage location
id: Primary keytimestamp: Movement date/timeproduct_id: Foreign key to Productfrom_location: Source locationto_location: Destination locationqty: Quantity moved
- Form validation and sanitization
- SQL injection protection via SQLAlchemy ORM
- Confirmation dialogs for destructive actions
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.
This project is open source and available under the MIT License.
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
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