Professional platform for an Egyptian agricultural export company built with Django and Tailwind CSS.
- Dynamic product catalog with fresh/IQF handling
- Monthly seasonality charts per product/variety
- Modular, component-based frontend
- Admin dashboard for full content control
- Responsive design for all device sizes
- SEO-optimized
- Advanced user management system
- Python 3.12+
- Django 4.2.7
- PostgreSQL
- Tailwind CSS
- Vanilla JavaScript
- HTML5 & Django Templates
- Clone the repository
git clone https://github.com/MWHEBA/Egyland.git
cd Egyland- Create and activate virtual environment
python -m venv venv
source venv/bin/activate # Linux/Mac
venv\Scripts\activate # Windows- Install dependencies
pip install -r requirements.txt- Setup database
- Create a PostgreSQL database
- Configure database connection in
config/.env
- Run migrations and create superuser
python manage.py migrate
python manage.py createsuperuser- Run the development server
python manage.py runserver- Access the website at http://127.0.0.1:8000/
apps/: Module applicationscore/: Main site pages and functionalityproducts/: Product catalog and detail pagesdashboard/: Custom admin dashboardaccounts/: User accounts managementuser_management/: Advanced user management systeminquiries/: Contact and inquiry handlingbranches/: Company branches
config/: Project configurationtemplates/: HTML templatesstatic/: Static assets (CSS, JS, images)media/: User-uploaded contentlogs/: Application logsscripts/: Utility scripts
The site is fully managed through the admin interface at /admin. Key content sections:
-
Products
- Add/edit products and their details
- Manage seasonality, counts, sizes, packaging
-
Inquiries
- View and manage contact messages
- Handle quote requests
The project includes a comprehensive image processor script (scripts/image_processor.py) that:
- Automatically compresses images while maintaining quality
- Converts images to WebP format for better performance
- Updates HTML templates with
<picture>elements for WebP support - Can be integrated with Django signals for automatic processing
# Process all images in static/img
python scripts/image_processor.py
# Process only a specific image or directory
python scripts/image_processor.py --path static/img/products/apple.jpgFor more details, see the Image Processing Documentation.
The system supports an enhanced packaging management approach:
-
Packaging Types
- Reusable packaging types with images (e.g., "Wooden boxes - 30pcs")
- Each type has a key word (e.g., "boxes") for dynamic labeling
- Types can be marked for Fresh products, IQF products, or both
-
Product Packaging Types
- Associates products with packaging types
- Configurable specifications:
- Items per pallet (using the key word)
- Pallets per container
- Net weight and units
- Display options (e.g., show "Fresh" label)
The platform includes a comprehensive user management system that offers:
-
Role-Based Access Control
- Create custom roles with specific permissions
- Assign roles to users
- Control access to different parts of the system
-
User Activity Tracking
- Monitor login/logout events
- Track password changes and profile updates
- Record all user actions with timestamps and IP addresses
-
Security Features
- Account status management (active, inactive, suspended, locked)
- Login attempt tracking to detect suspicious activity
- Security questions for account recovery
- Session tracking and management
-
Administrative Tools
- User statistics and analytics
- Comprehensive user reports
- Bulk user operations
- User verification management
Access the user management dashboard at /user-management/dashboard/ with admin credentials. From there you can:
- View user statistics and recent activities
- Add, edit, and manage users
- Create and assign roles
- Generate user activity reports
- Manage account statuses
This module integrates with the existing accounts app and enhances it with advanced management capabilities.
- Use modular templates with base.html and blocks
- Use includes for reusable components
- Keep HTML separate from CSS/SCSS
- Follow snake_case in Python, camelCase in JS
- Validate all user input
- Update README.md with structural changes
Egyland now uses a locally compiled version of Tailwind CSS instead of the CDN. This is the recommended approach for production environments.
- Make sure Node.js and npm are installed on your system
- Install the required packages:
npm install
- Build the CSS file:
npm run build:css
- For development with auto-refresh:
npm run dev
The compiled CSS file will be at static/css/tailwind.min.css and is already configured in the templates.
We welcome contributions! Please follow these steps:
- Open an issue to discuss the proposed change
- Fork the repository
- Create a new branch for your feature (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License.
For more information, please contact:
- User: MWHEBA
- Email: [email protected]
Developed by MWHEBA.