Skip to content

Uchemike-Tech/cashier-management-system

Repository files navigation

Cashier Management System

A comprehensive web-based cashier management system built with Python Flask, designed to manage cashiers, transactions, and login histories efficiently.

Features

  • Secure Login System: Password-hashed authentication for cashiers
  • Transaction Management: Record and view transactions with filtering options
  • Cashier Management: Add new cashiers with complete profile information
  • Login History: Track cashier login and logout times
  • Responsive Design: Clean, modern UI that works on desktop and mobile
  • Real-time Data: Live transaction recording with automatic ID generation

Project Structure

cashier-management-system/
├── app.py                 # Main Flask application
├── database.db           # SQLite database (created automatically)
├── requirements.txt       # Python dependencies
├── setup.py              # Setup and initialization script
├── README.md             # This file
└── templates/            # HTML templates
    ├── base.html         # Base template with common styling
    ├── login.html        # Login page
    ├── dashboard.html    # Main dashboard
    ├── add_cashier.html  # Add new cashier form
    ├── new_transaction.html    # Transaction entry form
    ├── view_transactions.html  # Transaction listing
    └── login_history.html     # Login history tracking

Installation & Setup

  1. Clone or download the project files

  2. Install Python dependencies:

    pip install -r requirements.txt
  3. Run the setup script:

    python setup.py
  4. Start the application:

    python app.py
  5. Access the application: Open your browser and navigate to http://127.0.0.1:5000

Default Login Credentials

After running the setup script, you can use these credentials:

  • Admin User:

    • ID: ADMIN001
    • Password: admin123
  • Sample Cashier:

    • ID: CASH001
    • Password: cashier123

Database Schema

Cashiers Table

  • id (Primary Key)
  • cashier_id (Unique)
  • name
  • mobile
  • address
  • email
  • password (Hashed)
  • created_at

Transactions Table

  • id (Primary Key)
  • transaction_id (Unique)
  • cashier_id (Foreign Key)
  • amount
  • date
  • time
  • created_at

Login History Table

  • id (Primary Key)
  • cashier_id (Foreign Key)
  • name
  • date
  • login_time
  • logout_time

Usage

1. Login

  • Use your cashier ID and password to log in
  • The system will record your login time automatically

2. Dashboard

  • Access all main functions from the dashboard
  • Navigate between different modules easily

3. Add Cashier

  • Register new cashiers with complete profile information
  • Each cashier gets a unique ID and encrypted password

4. Record Transactions

  • Enter transaction amounts quickly
  • System automatically generates transaction IDs
  • Records date, time, and cashier information

5. View Transactions

  • Filter transactions by cashier
  • View complete transaction history
  • Export-ready table format

6. Login History

  • Track when cashiers log in and out
  • Filter by specific cashiers
  • Monitor system usage patterns

Security Features

  • Password Hashing: All passwords are stored using SHA-256 encryption
  • Session Management: Secure session handling with automatic logout
  • Access Control: Protected routes require authentication
  • SQL Injection Prevention: Parameterized queries throughout

Customization

Adding New Features

  1. Add new routes in app.py
  2. Create corresponding HTML templates
  3. Update the database schema if needed

Styling Changes

  • Modify the CSS in templates/base.html
  • All templates extend from the base template
  • Responsive design principles already implemented

Database Configuration

  • SQLite is used by default for simplicity
  • Can be easily changed to PostgreSQL, MySQL, etc.
  • Update the connection string in app.py

Troubleshooting

Common Issues

  1. Module Import Errors:

    pip install flask
  2. Database Not Found:

    python setup.py
  3. Port Already in Use: Change the port in app.py:

    app.run(debug=True, port=5001)
  4. Template Not Found: Ensure the templates/ directory exists and contains all HTML files

License

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

Support

For issues or questions:

  1. Check the troubleshooting section
  2. Review the code comments
  3. Ensure all dependencies are installed correctly

Contributing

Feel free to fork this project and submit pull requests for improvements!


Built by MB-T using Python Flask

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published