A modern, feature-rich full-stack web application that enables residents to report local community issues (potholes, water leakage, waste pickup delays, broken streetlights) and allows admins to track, respond, and update their resolution status with real-time notifications.
- Dark Mode Support - Beautiful light/dark theme toggle
- Real-time Comments - Two-way communication between admins and reporters
- WhatsApp-Style Notifications - Never miss a response with smart notification badges
- Modern UI/UX - Smooth animations, gradients, and contemporary design
- Fully Responsive - Optimized for all devices
- Fast & Efficient - Built with performance in mind
- Features
- Tech Stack
- Screenshots
- Prerequisites
- Quick Start
- Environment Variables
- Database Setup
- API Documentation
- Project Structure
- Deployment
- Future Enhancements
- Submit Issues - Report community problems with detailed descriptions
- Photo Upload - Attach evidence photos (up to 5MB)
- Interactive Map - Pick exact locations using Leaflet maps
- Contact Info - Optional name, email, and phone for updates
- Categorization - Electricity, Roads, Water, Waste, Safety
- View All Issues - See all community reports in beautiful cards
- Advanced Filtering - Filter by category, status, or search keywords
- Comment & Reply - Communicate with admins about your issues
- Get Notified - See when admins respond with WhatsApp-style badges
- Mobile Friendly - Access from any device
- Statistics Dashboard - Real-time issue counts and metrics
- Visual Charts - Category-wise distribution with Chart.js
- Smart Filters - Quick access to pending/in-progress issues
- CSV Export - Export all data for reports
- Update Status - Change from Pending to In-Progress to Resolved
- Respond to Issues - Add official admin comments
- Delete Issues - Remove spam or duplicate reports
- View Reporter Info - Contact details when provided
- Notification System - See new comments from reporters
- Dark Mode - Toggle between light and dark themes
- Secure Authentication - JWT-based admin login
- Real-time Updates - Instant UI updates without page refresh
- Beautiful UI - Modern design with smooth animations
- Two-way Chat - Admins and reporters can communicate
- WhatsApp-Style Badges - Green pulsing notifications for new messages
- Unread Tracking - Separate notification counts for admins and reporters
- Auto-clear Notifications - Badges disappear when you view the issue
- Comment History - Full conversation thread in issue details
- Framework: React 18 with Hooks
- Build Tool: Vite (Lightning fast)
- Styling: TailwindCSS with custom theme
- Routing: React Router v6
- HTTP Client: Axios
- Maps: Leaflet + React-Leaflet
- Charts: Chart.js + React-Chartjs-2
- State Management: Context API
- Runtime: Node.js 18
- Framework: Express.js
- ORM: Prisma
- Database: PostgreSQL (Supabase)
- Authentication: JWT (jsonwebtoken)
- Password Hashing: bcryptjs
- File Upload: Multer
- Storage: Supabase Storage
- CORS: CORS middleware
- Issues - Core issue tracking with reporter info
- Comments - Threaded comments with author tracking
- Admins - Admin authentication and management
- Notifications - Last view timestamps for notification tracking
Modern card-based layout with filters and WhatsApp-style notification badges
Multi-section form with photo upload, location picker, and reporter info
Comprehensive statistics with colorful gradient cards and charts
Before you begin, ensure you have:
- Node.js v18+ - Download
- npm v9+ - Comes with Node.js
- Git - Download
- Supabase Account - Sign up free
# Clone the repository
git clone <your-repo-url>
cd community-issue-tracker
# Install backend dependencies
cd backend
npm install
# Install frontend dependencies
cd ../frontend
npm installBackend (.env)
cd backend
cp .env.example .env
# Edit .env with your Supabase credentialsDATABASE_URL="postgresql://user:password@host:port/database"
JWT_SECRET="your-super-secret-jwt-key-change-in-production"
SUPABASE_URL="https://your-project.supabase.co"
SUPABASE_KEY="your-supabase-anon-key"
SUPABASE_BUCKET="issue-photos"
PORT=5000
NODE_ENV="development"
FRONTEND_URL="http://localhost:5173"Frontend (.env)
cd frontend
cp .env.example .envVITE_API_URL=http://localhost:5000cd backend
# Generate Prisma Client
npx prisma generate
# Run migrations (creates all tables including comments)
npx prisma migrate dev --name init
# Seed database with sample data
npm run seedDefault Admin Credentials:
- Email:
admin@community.com - Password:
admin123
Terminal 1 - Backend:
cd backend
npm run dev
# Server runs on http://localhost:5000Terminal 2 - Frontend:
cd frontend
npm run dev
# App runs on http://localhost:5173Open http://localhost:5173 in your browser!
| Variable | Description | Required |
|---|---|---|
DATABASE_URL |
PostgreSQL connection string from Supabase | Yes |
JWT_SECRET |
Secret key for JWT tokens (use strong random string) | Yes |
SUPABASE_URL |
Your Supabase project URL | Yes |
SUPABASE_KEY |
Supabase anon/public key | Yes |
SUPABASE_BUCKET |
Storage bucket name (create as issue-photos) |
Yes |
PORT |
Server port (default: 5000) | No |
NODE_ENV |
Environment: development/production | No |
FRONTEND_URL |
Frontend URL for CORS | Yes |
| Variable | Description | Required |
|---|---|---|
VITE_API_URL |
Backend API URL | Yes |
-
Create Project
- Go to Supabase Dashboard
- Click "New Project"
- Choose name, password, and region
-
Get Database URL
- Settings → Database → Connection string (URI)
- Replace
[YOUR-PASSWORD]with your password
-
Create Storage Bucket
- Go to Storage section
- Create bucket named
issue-photos - Make it PUBLIC
-
Get API Keys
- Settings → API
- Copy Project URL and anon/public key
-- Issues table (with reporter info and notification tracking)
issues:
- id, title, description, category, location
- photoUrl, status
- reporterName, reporterEmail, reporterPhone
- lastAdminView, lastReporterView (for notifications)
- createdAt, updatedAt
-- Comments table (for two-way communication)
comments:
- id, issueId, authorName, authorType (admin/reporter)
- content, createdAt
-- Admins table
admins:
- id, email, password, name, createdAtAdmin login
Request:
{
"email": "admin@community.com",
"password": "admin123"
}Response:
{
"message": "Login successful",
"token": "jwt-token",
"admin": { "id": 1, "email": "...", "name": "..." }
}Get all issues with unread comment counts
Query Params:
status- Pending, In-Progress, Resolvedcategory- Electricity, Roads, Water, Waste, Safetysearch- Search in title, description, location
Response:
[
{
"id": 1,
"title": "Broken Streetlight",
"description": "...",
"category": "Electricity",
"location": "Main Street #45",
"photoUrl": "https://...",
"status": "Pending",
"reporterName": "John Doe",
"reporterEmail": "john@example.com",
"reporterPhone": "+1234567890",
"totalComments": 3,
"unreadAdminComments": 1,
"unreadReporterComments": 0,
"createdAt": "2025-01-15T10:30:00Z",
"updatedAt": "2025-01-15T10:30:00Z"
}
]Get single issue with all comments
Create new issue (multipart/form-data)
Form Data:
title(required)description(required)category(required)location(required)reporterName(optional)reporterEmail(optional)reporterPhone(optional)photo(optional file)
Update status (Admin only)
{ "status": "In-Progress" }Delete issue (Admin only)
Get all comments for an issue
Add a comment
{
"content": "Working on this issue now",
"authorName": "Admin",
"authorType": "admin"
}Mark issue as viewed (clears notifications)
{
"viewerType": "admin"
}Get dashboard statistics
Export to CSV (Admin only)
community-issue-tracker/
├── backend/
│ ├── config/
│ │ └── supabase.js # Supabase client
│ ├── controllers/
│ │ ├── authController.js # Authentication
│ │ └── issueController.js # Issues + Comments + Notifications
│ ├── middleware/
│ │ └── auth.js # JWT middleware
│ ├── prisma/
│ │ ├── schema.prisma # Database schema (Issues, Comments, Admins)
│ │ ├── migrations/ # Database migrations
│ │ └── seed.js # Sample data seeder
│ ├── routes/
│ │ ├── authRoutes.js
│ │ └── issueRoutes.js
│ ├── utils/
│ │ └── fileUpload.js
│ ├── .env # Environment variables
│ ├── package.json
│ └── server.js
│
├── frontend/
│ ├── src/
│ │ ├── components/
│ │ │ ├── CategoryChart.jsx # Chart.js visualization
│ │ │ ├── CommentsSection.jsx # Comment thread UI
│ │ │ ├── FilterBar.jsx # Advanced filters
│ │ │ ├── IssueCard.jsx # With notification badges
│ │ │ ├── IssueDetailsModal.jsx # Full issue view + comments
│ │ │ ├── LoadingSpinner.jsx # Improved spinner
│ │ │ ├── LocationPicker.jsx # Leaflet map
│ │ │ ├── Navbar.jsx # With dark mode toggle
│ │ │ ├── StatsWidget.jsx # Gradient stat cards
│ │ │ └── ThemeToggle.jsx # Dark mode switch
│ │ ├── context/
│ │ │ ├── AuthContext.jsx
│ │ │ └── ThemeContext.jsx # Dark mode state
│ │ ├── pages/
│ │ │ ├── AdminDashboard.jsx # Enhanced dashboard
│ │ │ ├── Home.jsx # With modal integration
│ │ │ ├── Login.jsx # Beautiful redesign
│ │ │ └── ReportIssue.jsx # Multi-section form
│ │ ├── services/
│ │ │ └── api.js # API client
│ │ ├── utils/
│ │ │ └── helpers.js
│ │ ├── App.jsx
│ │ ├── index.css # Dark mode + animations
│ │ └── main.jsx
│ ├── .env
│ ├── tailwind.config.js # Custom theme + animations
│ └── package.json
│
└── README.md
- Primary: Warm red-orange gradients (#f04a3f to #de3024)
- Accent: Orange tones (#f0730a to #e15800)
- Dark Mode: Deep grays (#0f172a to #1e293b)
- Fade-in entrance animations
- Slide-up card reveals
- Smooth transitions on all interactions
- Pulsing notification badges
- Hover effects with scale transforms
- Gradient text for headings
- Clear hierarchy with font weights
- Professional iconography
- Push to GitHub
- Connect repository to Netlify
- Build settings:
- Base directory:
frontend - Build command:
npm run build - Publish directory:
frontend/dist
- Base directory:
- Add env var:
VITE_API_URL= your backend URL
- Connect repository to Render
- Create Web Service:
- Root Directory:
backend - Build:
npm install && npx prisma generate && npx prisma migrate deploy - Start:
npm start
- Root Directory:
- Add all environment variables
- Run seed:
npm run seed(in Render shell)
- Dark Mode - Complete light/dark theme with persistence
- Comments System - Full two-way communication
- WhatsApp Notifications - Smart unread message badges
- Reporter Contact Info - Optional contact details
- Issue Details Modal - Beautiful full-screen view
- CSV Export - Download all data
- Interactive Map - Leaflet location picker
- Data Visualization - Chart.js analytics
- Advanced Filtering - Search + category + status
- Responsive Design - Mobile-first approach
- Smooth Animations - Modern UX with transitions
- Production Ready - Full deployment setup
- Email/SMS notifications for updates
- Resident registration system
- Issue voting/upvoting
- Priority levels (Low/Medium/High/Critical)
- Multiple admin roles with permissions
- Geolocation auto-detection
- Multi-language support (i18n)
- Mobile app (React Native)
- AI-powered issue categorization
- Social media integration
- Advanced analytics and reporting
- Issue templates for common problems
- Bulk actions for admins
- Activity feed/timeline
-
Report an Issue
- Click "Report Issue"
- Fill in details (title, description, category, location)
- Optionally add your contact info
- Upload a photo if available
- Submit
-
Track Your Issues
- View all issues on home page
- Filter to find yours
- Click to see details
- Add comments if you have updates
- Get notified when admin responds (green badge)
-
Login
- Click "Admin Login"
- Use credentials: admin@community.com / admin123
-
Manage Issues
- View dashboard with statistics
- See all issues with notification badges
- Click issue to view full details
- Update status as you progress
- Respond to reporters via comments
- Delete spam/duplicates if needed
-
Export Data
- Click "Export CSV" to download all issues
- Use for reports or external analysis
This project was built as part of the ProU Technology Full-stack Development Assessment (Track 3).
MIT License - Free to use for learning and development.
Built for ProU Technology Assessment
- Track: Full-stack Development (Track 3)
- Date: November 2025
- ProU Technology for the opportunity
- Supabase for excellent cloud services
- The open-source community for amazing tools
If you found this project helpful, please give it a star!
Made for the community