A comprehensive web-based cashier management system built with Python Flask, designed to manage cashiers, transactions, and login histories efficiently.
- 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
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
-
Clone or download the project files
-
Install Python dependencies:
pip install -r requirements.txt
-
Run the setup script:
python setup.py
-
Start the application:
python app.py
-
Access the application: Open your browser and navigate to
http://127.0.0.1:5000
After running the setup script, you can use these credentials:
-
Admin User:
- ID:
ADMIN001 - Password:
admin123
- ID:
-
Sample Cashier:
- ID:
CASH001 - Password:
cashier123
- ID:
id(Primary Key)cashier_id(Unique)namemobileaddressemailpassword(Hashed)created_at
id(Primary Key)transaction_id(Unique)cashier_id(Foreign Key)amountdatetimecreated_at
id(Primary Key)cashier_id(Foreign Key)namedatelogin_timelogout_time
- Use your cashier ID and password to log in
- The system will record your login time automatically
- Access all main functions from the dashboard
- Navigate between different modules easily
- Register new cashiers with complete profile information
- Each cashier gets a unique ID and encrypted password
- Enter transaction amounts quickly
- System automatically generates transaction IDs
- Records date, time, and cashier information
- Filter transactions by cashier
- View complete transaction history
- Export-ready table format
- Track when cashiers log in and out
- Filter by specific cashiers
- Monitor system usage patterns
- 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
- Add new routes in
app.py - Create corresponding HTML templates
- Update the database schema if needed
- Modify the CSS in
templates/base.html - All templates extend from the base template
- Responsive design principles already implemented
- SQLite is used by default for simplicity
- Can be easily changed to PostgreSQL, MySQL, etc.
- Update the connection string in
app.py
-
Module Import Errors:
pip install flask
-
Database Not Found:
python setup.py
-
Port Already in Use: Change the port in
app.py:app.run(debug=True, port=5001)
-
Template Not Found: Ensure the
templates/directory exists and contains all HTML files
This project is open source and available under the MIT License.
For issues or questions:
- Check the troubleshooting section
- Review the code comments
- Ensure all dependencies are installed correctly
Feel free to fork this project and submit pull requests for improvements!
Built by MB-T using Python Flask