🌱 Ecologic - Public Issue Reporting System
A beautiful, modern Django web application for reporting and managing public issues in communities. Citizens can report issues like broken streetlights, garbage problems, water issues, and more, while staff members can efficiently manage and resolve these reports.
✨ Features
For Citizens
- Easy Registration & Login - Quick account creation with role-based authentication
- Issue Reporting - Report issues with photos, descriptions, and location details
- Real-time Tracking - Monitor the status of reported issues (Pending → In Progress → Resolved)
- Personal Dashboard - View statistics and manage all your reported issues
- Mobile Responsive - Works perfectly on all devices
For Staff
- Custom Staff Dashboard - Comprehensive overview with statistics and charts
- Issue Management - View, filter, and manage all reported issues
- Quick Status Updates - One-click status changes with AJAX functionality
- Assignment System - Assign issues to specific staff members
- Priority Management - Set and manage issue priorities
- Detailed Reporting - Track resolution times and category breakdowns
Technical Features
- Beautiful UI - Modern design with Bootstrap 5 and custom styling
- Image Upload - Automatic image resizing and optimization
- Advanced Filtering - Filter issues by status, category, and search terms
- Role-based Access - Secure separation between citizen and staff functionality
- Responsive Design - Mobile-first approach with beautiful animations
- Real-time Updates - AJAX-powered status updates without page refresh
🚀 Quick Start
Prerequisites
- Python 3.8 or higher
- pip (Python package installer)
Installation
- Clone or download the project ```bash # If using git git clone cd ecologic
# Or extract the downloaded files and navigate to the directory
2. **Run the setup script**
```bash
python setup.py
This will:
- Install all required dependencies
- Create database migrations
- Set up static files
- Generate a secure secret key
- Optionally create a superuser account
Start the development server
python manage.py runserverOpen your browser Navigate to
http://127.0.0.1:8000
📱 Usage Guide
Getting Started as a Citizen
- Visit the homepage and click "Register"
- Fill out the registration form (you'll automatically be assigned the "Citizen" role)
- After registration, you'll be redirected to your citizen dashboard
- Click "Report New Issue" to submit your first issue report
- Track your issues from "My Issues" page
Setting Up Staff Users
- Access the Django admin panel at
/admin/ - Login with your superuser account
- Go to "Users" and create new users
- Set their role to "Staff" in the user profile
- Staff users will see the staff dashboard when they log in
Managing Issues (Staff)
- Login as a staff user
- Use the staff dashboard to see overview statistics
- Click "View All Issues" to see the complete list
- Use filters to find specific issues
- Click on any issue to view details and update status
- Use quick action buttons for fast status updates
🎨 Customization
Styling
- Custom CSS is located in
static/css/custom.css - The app uses Bootstrap 5 with custom color schemes
- Modify CSS variables in the base template for theme changes
Categories
To add new issue categories:
- Edit
issues/models.py- updateCATEGORY_CHOICES - Update the category icons in the
category_iconproperty - Run migrations:
python manage.py makemigrations && python manage.py migrate
Email Notifications (Optional)
Configure email settings in .env file to enable notifications:
EMAIL_HOST=smtp.gmail.com
EMAIL_PORT=587
EMAIL_USE_TLS=True
EMAIL_HOST_USER=your-email@gmail.com
EMAIL_HOST_PASSWORD=your-app-password
🏗️ Project Structure
ecologic/
├── ecologic/ # Main project settings
├── accounts/ # User authentication and management
├── issues/ # Issue reporting and management
├── templates/ # HTML templates
├── static/ # CSS, JavaScript, and images
├── media/ # User uploaded files
├── requirements.txt # Python dependencies
├── manage.py # Django management script
└── setup.py # Project setup script
🔧 Configuration
Environment Variables
Copy .env.example to .env and configure:
SECRET_KEY- Django secret key (auto-generated by setup script)DEBUG- Set to False in production- Database settings (SQLite used by default)
- Email configuration (optional)
Production Deployment
For production deployment:
- Set
DEBUG=Falsein.env - Configure
ALLOWED_HOSTSin settings - Set up a proper database (PostgreSQL recommended)
- Configure a web server (nginx + gunicorn)
- Set up SSL certificates
- Configure email for notifications
🛠️ Development
Running Tests
python manage.py test
Creating Migrations
python manage.py makemigrations
python manage.py migrate
Collecting Static Files
python manage.py collectstatic
Creating Sample Data
Use the Django admin panel to create sample issues and users for testing.
📊 Models
User Model
- Extends Django's AbstractUser
- Adds role field (Citizen/Staff)
- Additional fields: phone_number, address
Issue Model
- Complete issue tracking with status workflow
- Image upload with automatic resizing
- Priority and category classification
- Staff assignment and notes
- Comprehensive timestamps
🎯 Key Features Explained
Role-based Authentication
- Citizens: Can report and track their own issues
- Staff: Can view and manage all issues
- Automatic dashboard redirection based on role
Status Workflow
- Pending - Newly reported issue
- In Progress - Staff is working on the issue
- Resolved - Issue has been fixed
AJAX Functionality
- Quick status updates without page refresh
- Real-time dashboard updates
- Smooth user experience
🤝 Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
📄 License
This project is open source and available under the MIT License.
🆘 Support
If you encounter any issues:
- Check the console for error messages
- Ensure all dependencies are installed
- Verify database migrations are applied
- Check file permissions for media uploads
🌟 Screenshots
The application features:
- Beautiful landing page with feature highlights
- Intuitive citizen dashboard with statistics
- Comprehensive staff management interface
- Mobile-responsive design
- Modern UI with smooth animations
Made with ❤️ for better communities
Log in or sign up for Devpost to join the conversation.