Sustain Hub (Visit) is a comprehensive web platform designed to empower citizens to report and track public facility issues within their local community while earning reward points. The platform provides an intuitive interface that makes it easy for users to pinpoint problems and submit detailed reports with photos and precise location data. Local authorities can efficiently track, manage, and resolve reported issues through a dedicated admin dashboard.
| Section | Screenshot |
|---|---|
| Admin Dashboard | ![]() |
| Issue Details | ![]() |
| User Dashboard | ![]() |
| Issue History | ![]() |
Explore the platform's main features visually. Each section below demonstrates a key part of the user or admin experience.
- User Registration & Authentication - Secure account creation and login system
- Issue Reporting - Report problems with category selection, detailed descriptions, and photo uploads
- Automatic Location Detection - GPS-based location tagging for precise issue positioning
- Reward System - Earn points for reporting issues (10 points per verified report)
- Leaderboard - Compete with other users and see your ranking based on reward points earned for reporting and resolving issues. Top contributors are highlighted to encourage community participation.
- Profile Management - Update personal information and track reward points
- Real-time Status Updates - Track the progress of reported issues
- Admin Dashboard - Comprehensive overview of all reported issues
- Interactive Map Interface - Visual representation of issues using Geoapify maps
- Issue Management - Update issue status (Pending β In Progress β Resolved)
- Detailed Issue Views - Access complete information including photos and reporter details
- Status-based Color Coding - Visual indicators for issue priorities and status
- Responsive Design - Mobile-friendly interface using Bootstrap
- Secure Authentication - JWT-based authentication with role-based access control
- Image Storage - Cloudinary integration for reliable image hosting
- Database Security - MongoDB with proper data validation and sanitization
- API Documentation - RESTful API endpoints with proper error handling
- React 18 - Modern JavaScript library for building user interfaces
- Bootstrap 5 - Responsive CSS framework
- React Bootstrap - Bootstrap components for React
- Axios - HTTP client for API requests
- Node.js - JavaScript runtime environment
- Express.js - Web application framework
- MongoDB - NoSQL database for data storage
- JWT (JSON Web Tokens) - Secure authentication
- bcryptjs - Password hashing
- Multer - File upload handling
- Cloudinary - Cloud-based image storage
- Geoapify API - Interactive maps and geocoding services
- Browser Geolocation API - Automatic location detection
- nodemon - Development server with auto-restart
- dotenv - Environment variable management
- express-validator - Input validation and sanitization
SustainHub/
βββ frontend/ # React frontend application
β βββ public/ # Static assets
β βββ src/
β β βββ components/ # Reusable React components
β β βββ pages/ # Page components (Home, Dashboard, etc.)
β β βββ context/ # React context for state management
β β βββ App.js # Main application component
β β βββ index.js # Application entry point
β βββ package.json # Frontend dependencies
β βββ .env # Frontend environment variables
β
βββ backend/ # Node.js backend application
β βββ models/ # MongoDB models (User, Issue)
β βββ routes/ # API route handlers
β βββ middleware/ # Authentication middleware
β βββ server.js # Express server setup
β βββ package.json # Backend dependencies
β βββ .env # Backend environment variables
β
βββ LICENSE # MIT License
βββ README.md # Project documentation
POST /api/auth/register- User registrationPOST /api/auth/login- User login
GET /api/users/profile- Get user profilePUT /api/users/profile- Update user profileGET /api/users/:id- Get user by ID (admin)
POST /api/issues- Create new issueGET /api/issues/admin/all- Get all issues (admin)GET /api/issues/admin/map- Get map data for adminGET /api/issues/:id- Get issue detailsGET /api/issues/user/my-issues- Get user's issuesPUT /api/issues/:id/status- Update issue status (admin)
POST /api/upload/image- Upload issue image
- Node.js (v14 or higher)
- npm or yarn package manager
- MongoDB Atlas account (or local MongoDB installation)
- Cloudinary account for image storage
- Geoapify API key
Create .env files in both frontend and backend directories:
PORT=5000
MONGODB_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret_key
CLOUDINARY_CLOUD_NAME=your_cloudinary_cloud_name
CLOUDINARY_API_KEY=your_cloudinary_api_key
CLOUDINARY_API_SECRET=your_cloudinary_api_secretREACT_APP_API_BASE_URL=http://localhost:5000/api
REACT_APP_GEOAPIFY_API_KEY=your_geoapify_api_key-
Clone the repository
git clone https://github.com/kushal7201/SustainHub cd SustainHub -
Install Backend Dependencies
cd backend npm install -
Install Frontend Dependencies
cd ../frontend npm install -
Set up Environment Variables
- Create
.envfiles in bothbackend/andfrontend/directories - Add the required environment variables as shown above
- Create
-
Start the Development Servers
Backend (Terminal 1):
cd backend npm run devFrontend (Terminal 2):
cd frontend npm start -
Access the Application
- Frontend: http://localhost:3000
- Backend API: http://localhost:5000
- Register/Login - Create an account or sign in
- Report Issues - Click "Report a Problem" and fill out the form
- Add Details - Select category, add description, and upload a photo
- Submit - Your location will be automatically detected and the issue submitted
- Track Progress - View your profile to see reward points and issue status
- Admin Login - Use admin credentials to access the admin dashboard
- View Map - See all reported issues on the interactive map
- Manage Issues - Click on markers to view detailed information
- Update Status - Change issue status from Pending β In Progress β Resolved
- Monitor Progress - Track community issues and response effectiveness
- Fork the repository
- Create a feature branch (
git checkout -b feature/new-feature) - Commit your changes (
git commit -am 'Add new feature') - Push to the branch (
git push origin feature/new-feature) - Create a Pull Request
- JWT Authentication - Secure token-based authentication
- Password Hashing - bcrypt for secure password storage
- Input Validation - Server-side validation for all inputs
- CORS Protection - Configured cross-origin resource sharing
- Environment Variables - Sensitive data stored securely
- Role-based Access - Different permissions for users and admins
This project is licensed under the MIT License - see the LICENSE file for details.
For support, issues, or feature requests, please:
- Open an issue on GitHub
- Contact the development team
Made with β€οΈ for building better communities



