A full-stack civic engagement platform built with Next.js + Supabase that enables citizens of Nashik to report grievances, submit anonymous crime reports, and explore tourism/spiritual destinations β all within a secure, role-based system.
The Nashik Smart City Management Portal is designed to digitally connect citizens with municipal services. It ensures:
- Transparent grievance tracking
- Secure anonymous crime reporting
- Tourism & spiritual destination discovery
- Role-based admin management
- Dark mode with modern UI
This project follows modern full-stack best practices with strong emphasis on security, performance, and scalability.
- Next.js 16 (App Router)
- React 19
- TypeScript
- Tailwind CSS v4
- shadcn/ui + Radix UI
- Lucide React Icons
- Supabase
- PostgreSQL
- Row Level Security (RLS)
- Supabase Auth (Email/Password)
- Role-Based Access Control (User/Admin)
- React Hook Form
- Zod
- Recharts
- React Day Picker
- next-themes
- OKLCH color system
- Secure Sign-Up / Sign-In
- Persistent sessions
- Role-based redirection
- Admin & User dashboards
- Title, description, category
- Optional photo upload
- Location with coordinates
- Status tracking
- Admin review + notes
- Submit incidents anonymously
- Media upload support
- Location tracking
- Investigation status updates
- Admin-only visibility via RLS
- Categorized locations
- Visiting hours & entry fees
- Google Maps integration (No API key required)
- Event listings
- Directions & map view buttons
- View all grievances & crime reports
- Update status
- Add review notes
- View user profiles
- Tab-based management interface
- System preference detection
- Persistent theme storage
- OKLCH-based accessible colors
- Fully theme-aware UI components
| Table | Purpose |
|---|---|
profiles |
User role & metadata |
grievances |
Citizen complaints |
crime_reports |
Anonymous crime submissions |
tourism_places |
Public tourism data |
events |
Public event listings |
- Users can access only their own data
- Admins can access all data
- Tourism & events are public read-only
- All security enforced at database level
app/
βββ page.tsx
βββ sign-in/
βββ sign-up/
βββ grievance-reporting/
βββ crime-reporting/
βββ tourism-spiritual/
βββ tourism-explorer/
βββ admin/dashboard/
βββ my-submissions/
components/
βββ theme-provider.tsx
βββ theme-toggle.tsx
βββ user-menu.tsx
βββ ui/
lib/
βββ supabase.ts
βββ maps.ts
βββ utils.ts
Create a .env.local file:
NEXT_PUBLIC_SUPABASE_URL=
NEXT_PUBLIC_SUPABASE_ANON_KEY=
SUPABASE_SERVICE_ROLE_KEY=
POSTGRES_URL=
POSTGRES_PASSWORD=
POSTGRES_USER=
POSTGRES_DATABASE=
POSTGRES_HOST=
npm installnpm run devnpm run buildnpm start- Database-level Row Level Security (RLS)
- Role-based access control
- Zod input validation
- Supabase session management
- HTTPS enforced via Vercel
- Strict TypeScript typing
- Server Components (Next.js App Router)
- Tailwind CSS purge optimization
- Indexed database queries
- CDN delivery via Vercel
- Efficient Supabase queries
- Hosting: Vercel
- Database: Supabase
- CI/CD: GitHub β Vercel auto-deploy
- Environment: Production & Preview builds
Form β Zod Validation β Supabase Insert β RLS Check
β Admin Dashboard β Status Update β User Notification
- PostgreSQL supports large-scale data
- Indexed queries for fast filtering
- Cloud-managed infrastructure
- Ready for file storage expansion (Vercel Blob / Supabase Storage)
- Push notifications
- Real-time updates
- SMS/email alerts
- Analytics dashboard for city authorities
- Mobile app integration
- AI-powered grievance categorization
This project is built for educational and municipal digital transformation purposes.
-
Danny (Om Desale) - Initial development
-
Contributors welcome!
-
Built as a Smart City civic-tech initiative for Nashik, India.