Skip to content

Latest commit

Β 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Inventory Management System

A simple inventory management system built with Python GUI (Tkinter) and MySQL database.

Python MySQL License

πŸ“‹ Features

  • βœ… Add, update, delete products
  • πŸ” Search products by name, category, or description
  • πŸ“Š View inventory statistics
  • ⚠️ Low stock alerts
  • 🎨 User-friendly GUI interface
  • πŸ“ Category management
  • πŸ’Ύ MySQL database integration

πŸš€ Screenshots

Add screenshots of your application here

πŸ› οΈ Installation

Prerequisites

  • Python 3.8 or higher
  • MySQL 8.0 or higher
  • pip (Python package installer)

Step 1: Clone the Repository

git clone https://github.com/isuru709/inventory-management-system.git
cd inventory-management-system

Step 2: Install Python Dependencies

pip install -r requirements.txt

Step 3: Setup MySQL Database

  1. Start MySQL service
  2. Run the database setup script:
    mysql -u root -p < setup/database_setup.sql
  3. Insert sample data (optional):
    mysql -u root -p < setup/sample_data.sql

Step 4: Configure Database Connection

  1. Copy the config file:

    cp config.py config_local.py
  2. Edit config_local.py with your database credentials:

    DATABASE_CONFIG = {
        'host': 'localhost',
        'database': 'inventory_system',
        'user': 'your_mysql_username',
        'password': 'your_mysql_password',
        'port': 3306
    }

Step 5: Test Database Connection

python test_connection.py

Step 6: Run the Application

python main_app.py

πŸ“– Usage

Adding Products

  1. Fill in the product information in the form
  2. Click "Add Product" button
  3. Product will appear in the products list

Updating Products

  1. Double-click on a product in the list
  2. Modify the information in the form
  3. Click "Update Product" button

Deleting Products

  1. Select a product from the list
  2. Click "Delete Product" button
  3. Confirm the deletion

Searching Products

  1. Enter search term in the search box
  2. Click "Search" button or press Enter
  3. Results will be filtered in the list

Low Stock Management

  1. Go to "Statistics" tab
  2. Set your preferred low stock threshold
  3. Click "Low Stock" button to view items below threshold

πŸ“ Project Structure

inventory-management-system/
β”‚
β”œβ”€β”€ README.md                 # Project documentation
β”œβ”€β”€ requirements.txt          # Python dependencies
β”œβ”€β”€ .gitignore               # Git ignore rules
β”œβ”€β”€ config.py                # Configuration template
β”œβ”€β”€ database_operations.py   # Database operations
β”œβ”€β”€ main_app.py              # Main GUI application
β”œβ”€β”€ test_connection.py       # Database connection test
β”œβ”€β”€ setup/
β”‚   β”œβ”€β”€ database_setup.sql   # Database schema
β”‚   └── sample_data.sql      # Sample data
└── screenshots/
    └── app_screenshot.png   # Application screenshots

πŸ—„οΈ Database Schema

Products Table

  • id - Primary key (AUTO_INCREMENT)
  • name - Product name (VARCHAR)
  • category - Product category (VARCHAR)
  • price - Product price (DECIMAL)
  • quantity - Stock quantity (INT)
  • description - Product description (TEXT)
  • created_at - Creation timestamp
  • updated_at - Last update timestamp

Customers Table (Optional)

  • id - Primary key
  • first_name, last_name - Customer name
  • email - Email address (UNIQUE)
  • phone - Phone number
  • address, city, state, zip_code - Address information

πŸ”§ Configuration

The application uses config.py for configuration settings. Create a config_local.py file for your personal database credentials:

DATABASE_CONFIG = {
    'host': 'your_host',
    'database': 'your_database',
    'user': 'your_username',
    'password': 'your_password',
    'port': 3306
}

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ› Troubleshooting

Common Issues

  1. Connection Error: Check MySQL credentials and ensure MySQL service is running
  2. Import Error: Install required dependencies with pip install -r requirements.txt
  3. Permission Error: Ensure MySQL user has necessary privileges

Getting Help

πŸš€ Future Enhancements

  • Web interface using Flask/Django
  • Barcode scanning
  • Report generation (PDF/Excel)
  • Multi-user support
  • Inventory alerts via email
  • Product images upload
  • Sales tracking
  • Supplier management

πŸ‘¨β€πŸ’» Author

Isuru - @isuru709

⭐ Show your support

Give a ⭐️ if this project helped you!


Built with ❀️ using Python and MySQL

About

MySQL_APP1

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages