A comprehensive web application for managing agricultural equipment rentals, inventory, bookings and customer relationships. Built with Python Flask and MySQL.
- Equipment browsing and searching with detailed product information
- Shopping cart functionality with real-time availability checking
- Online booking and payment processing
- Account management and booking history
- Promotional code support
- Store locator with distance calculation
- Customer messaging system
- Equipment check-in/check-out management
- Real-time inventory tracking
- Equipment maintenance records
- Customer booking management
- Store-specific reporting
- Multi-store inventory management
- Staff and customer management
- Promotional campaign management
- Financial reporting
- Equipment utilization analytics
- Store performance monitoring
- Role-based access control (Customer, Staff, Local Manager, National Manager, Admin)
- Real-time availability checking
- Automated notifications
- Equipment maintenance tracking
- Multi-store support
- Responsive design
- Backend: Python Flask
- Database: MySQL
- Frontend: HTML5, CSS3, JavaScript
- Authentication: Flask-WTF with BCrypt
- Form Handling: WTForms
- Address Validation: Addy API
- Visualization: ECharts
- Additional Libraries:
- geopy (distance calculations)
- mysql-connector-python
- requests
- email_validator
- Python 3.x
- MySQL
- Git
- Clone the repository
git clone https://github.com/ChanMeng666/AgriHire-Solutions.git
- Create and configure database connection
Create
connect.py
undereoms
folder with your database configuration:
dbuser = "your_username"
dbpass = "your_password"
dbhost = "localhost"
dbport = "3306"
dbname = "agrihire"
- (Optional) Create a virtual environment
python -m venv venv
source venv/bin/activate # Linux/Mac
venv\Scripts\activate # Windows
- Install dependencies
pip install -r requirements.txt
- Create database
- Run
database/agrihire_db+data.sql
to create database schema and sample data - Disable Safe Updates mode in MySQL Workbench if needed
- Start the application
python run.py
Function | Admin/National Manager | Local Manager/Staff | Customer |
---|---|---|---|
View Financial Reports | Access all data | Store-specific data only | No access |
View Hire Status | Access all data | Store-specific data only | No access |
View Maintenance Records | Access all data | Store-specific data only | No access |
Stock/Order/Store Reports | Full access | View only | No access |
View Product Inventory | Access all data | Store-specific data only | View only |
View Customer Orders | Access all data | Store-specific data only | Own orders only |
View Store Distribution | Full access | No access | View only |
User Roles Distribution | Full access | No access | No access |
User Activity Distribution | Full access | No access | No access |
Equipment Management | Full access | Store-specific only | No access |
Staff Management | Full access | Store-specific only | No access |
Customer Management | Full access | View only | No access |
Promotion Management | Full access | Store-specific only | No access |
All accounts use the same password: Test1234!
Role | |
---|---|
cust1@email.com | customer |
cust2@email.com | customer |
cust3@email.com | customer |
cust4@email.com | customer |
cust5@email.com | customer |
Role | |
---|---|
staff1@agrihire.nz | staff |
staff2@agrihire.nz | staff |
staff3@agrihire.nz | staff |
staff4@agrihire.nz | staff |
staff5@agrihire.nz | staff |
staff6@agrihire.nz | staff |
Role | |
---|---|
lmanager1@agrihire.nz | local manager |
lmanager2@agrihire.nz | local manager |
lmanager3@agrihire.nz | local manager |
nmanager1@agrihire.nz | national manager |
admin1@agrihire.nz | system admin |
- User Authentication & Authorization
- Equipment Management
- Booking System
- Store Management
- Customer Relationship Management
- Reporting & Analytics
- Notification System
- Promotional System
Key tables include:
- user
- customer
- staff
- store
- machine
- product
- booking
- booking_item
- cart
- cart_item
- promotion
- service
- message
- Complete equipment lifecycle tracking
- Maintenance scheduling and history
- Real-time availability tracking
- Multi-store inventory management
- Equipment categorization and specification management
- Real-time availability checking
- Flexible rental period management
- Automatic price calculation
- Multi-item bookings
- Extension and cancellation handling
- Payment processing integration
- Self-service booking
- Account management
- Booking history
- Equipment recommendations
- Store locator with distance calculation
- Direct messaging with store staff
- Equipment check-in/check-out
- Customer management
- Booking management
- Maintenance recording
- Inventory management
- Store-specific reporting
- Multi-store oversight
- Staff management
- Performance analytics
- Financial reporting
- Promotion management
- System configuration
- Flexible discount rules
- Time-based promotions
- Product-specific promotions
- Store-specific promotions
- Promotional code management
agrihire/
├── eoms/
│ ├── model/ # Database models
│ ├── route/ # Route handlers
│ ├── form/ # Form definitions
│ ├── static/ # Static assets
│ └── templates/ # HTML templates
├── database/ # SQL scripts
└── requirements.txt # Dependencies
- Install MySQL Server and MySQL Workbench
- Configure MySQL Server:
- Disable safe updates mode
- Enable stored procedures
- Configure for larger result sets
- Set up Python development environment
- Configure IDE (recommended: VS Code)
- Authentication API
- Equipment Management API
- Booking Management API
- Store Management API
- Customer Management API
- Reporting API
Detailed API documentation is available in the project wiki.
- Python 3.8+
- MySQL 8.0+
- Modern web browser with JavaScript enabled
- Minimum 4GB RAM
- 10GB storage space
- Configure proper security measures
- Set up backup systems
- Implement monitoring
- Configure email system
- Set up SSL certificates
For support and questions, please:
- Check the documentation
- Raise an issue in the repository
- Contact the development team
- Create a new branch
git checkout -b feature/AmazingFeature
- Commit your changes
git commit -m 'Add some AmazingFeature'
- Push to the branch
git push origin feature/AmazingFeature
- Open a Pull Request
Distributed under the MIT License. See LICENSE
for more information.
Project Link: ChanMeng666/AgriHire-Solutions
Live Demo: Home