Empowering rural governance through digital connectivity
π Live Demo: https://team-smar.vercel.app
ReYog is a comprehensive digital platform designed to bridge the gap between rural citizens and their local government. It enables citizens to raise queries, track government services, and engage with panchayats and government offices in a transparent and efficient manner.
- Query Management: Submit and track queries about government services
- Location Services: Find nearby government offices with integrated maps
- Real-time Updates: Get notifications about query status and progress
- Rating & Reviews: Provide feedback on government services
- Emergency SOS: Quick access to emergency contacts and services
- Multi-language Support: Google Translate integration for accessibility
- Query Processing: Review, accept, and manage citizen queries
- Office Management: Manage multiple government offices and departments
- Progress Tracking: Update query status and provide progress reports
- Budget Management: Track budget allocation and spending
- Analytics Dashboard: View service statistics and performance metrics
- User Management: Manage citizens, panchayats, and system users
- System Oversight: Monitor platform usage and performance
- Data Analytics: Comprehensive reporting and insights
- Content Moderation: Review and moderate user-generated content
- Next.js 15 - React framework with App Router
- TypeScript - Type-safe development
- Tailwind CSS - Utility-first CSS framework
- Radix UI - Accessible component primitives
- Lucide React - Beautiful icons
- React Hook Form - Form management with validation
- Zod - Schema validation
- PostgreSQL - Primary database (hosted on Neon)
- Prisma - Database ORM and migrations
- NextAuth.js - Authentication system
- JWT - Token-based authentication
- Leaflet - Interactive maps
- React Leaflet - React components for Leaflet
- Google Maps API - Location services and geocoding
- Cloudinary - Image and file storage
- Vercel Blob - Additional file storage
- Google Translate - Multi-language support
- React Query - Data fetching and caching
- jsPDF - PDF generation for reports
- Node.js 18+
- PostgreSQL database
- Cloudinary account
- Google Maps API key (optional)
-
Clone the repository
git clone <repository-url> cd reyog
-
Install dependencies
npm install # or pnpm install -
Set up environment variables Create a
.envfile in the root directory:# Database DATABASE_URL="postgresql://username:password@localhost:5432/reyog" # Authentication JWT_SECRET="your-jwt-secret-key" JWT_REFRESH_SECRET="your-refresh-secret-key" # Cloudinary (for file uploads) NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME="your-cloud-name" NEXT_PUBLIC_CLOUDINARY_UPLOAD_PRESET="your-upload-preset" NEXT_PUBLIC_CLOUDINARY_API_KEY="your-api-key" CLOUDINARY_API_SECRET="your-api-secret" # Optional: Google Maps NEXT_PUBLIC_GOOGLE_MAPS_API_KEY="your-google-maps-key"
-
Set up the database
# Generate Prisma client npx prisma generate # Run database migrations npx prisma migrate dev # Seed the database with initial data npx prisma db seed
-
Start the development server
npm run dev # or pnpm dev -
Open your browser Navigate to http://localhost:3000
- VOTER - Regular citizens who can submit queries
- PANCHAYAT - Government staff who process queries
- ADMIN - System administrators with full access
For development and testing:
Admin Account:
- Email:
admin@reyog.gov.in - Password:
password123
Panchayat Accounts:
indore.staff@reyog.gov.inbhopal.staff@reyog.gov.injabalpur.staff@reyog.gov.ingwalior.staff@reyog.gov.inujjain.staff@reyog.gov.in- Password:
password123
reyog/
βββ app/ # Next.js App Router
β βββ api/ # API routes
β βββ auth/ # Authentication pages
β βββ dashboard/ # Role-based dashboards
β βββ offices/ # Office directory
β βββ globals.css # Global styles
βββ components/ # React components
β βββ admin/ # Admin-specific components
β βββ auth/ # Authentication components
β βββ dashboard/ # Dashboard components
β βββ layout/ # Layout components
β βββ maps/ # Map components
β βββ offices/ # Office components
β βββ ui/ # Reusable UI components
β βββ voter/ # Voter-specific components
βββ hooks/ # Custom React hooks
βββ lib/ # Utility libraries
βββ prisma/ # Database schema and migrations
βββ styles/ # Additional styles
# Development
npm run dev # Start development server
npm run build # Build for production
npm run start # Start production server
# Database
npx prisma generate # Generate Prisma client
npx prisma migrate # Run database migrations
npx prisma db seed # Seed database with test data
npx prisma studio # Open Prisma Studio
# Testing
npm run test:redis # Test Redis connection
npm run lint # Run ESLint- Connect your GitHub repository to Vercel
- Set environment variables in Vercel dashboard
- Deploy automatically on push to main branch
- Build the application:
npm run build - Set up PostgreSQL database
- Configure environment variables
- Run migrations:
npx prisma migrate deploy - Start the server:
npm start
- Fork the repository
- Create a feature branch:
git checkout -b feature/new-feature - Make your changes and commit:
git commit -m 'Add new feature' - Push to the branch:
git push origin feature/new-feature - Submit a pull request
- Follow TypeScript best practices
- Use Prettier for code formatting
- Write meaningful commit messages
- Test your changes thoroughly
- Update documentation as needed
POST /api/auth/login- User loginPOST /api/auth/register- User registrationPOST /api/auth/logout- User logout
GET /api/queries- Get user queriesPOST /api/queries- Create new queryPUT /api/queries/[id]- Update queryDELETE /api/queries/[id]- Delete query
GET /api/offices- Get nearby officesGET /api/departments- Get departmentsGET /api/panchayats- Get panchayats
- JWT-based authentication
- Role-based access control
- Input validation with Zod
- SQL injection prevention with Prisma
- CSRF protection
- Secure file uploads with Cloudinary
- Multi-language support via Google Translate
- Keyboard navigation support
- Screen reader compatibility
- High contrast mode support
- Mobile-responsive design
ReYog is fully responsive and optimized for mobile devices, ensuring citizens can access government services from anywhere.
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with Next.js and modern web technologies
- Maps powered by Leaflet and OpenStreetMap
- Icons by Lucide React
- UI components by Radix UI
- Hosted on Vercel with Neon PostgreSQL
ReYog - Connecting rural India with digital governance solutions.