{"id":35188351,"url":"https://github.com/yashitanamdeo/janmat","last_synced_at":"2026-04-07T16:32:28.649Z","repository":{"id":327399059,"uuid":"1055627671","full_name":"yashitanamdeo/janmat","owner":"yashitanamdeo","description":"🏛️ Modern citizen complaint management system with real-time tracking, analytics, and role-based workflows. Built with React, TypeScript, Node.js, and PostgreSQL.","archived":false,"fork":false,"pushed_at":"2025-12-05T08:52:05.000Z","size":2486,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-31T21:58:06.585Z","etag":null,"topics":["axios","customer-complaints","government-innovation","janmat","leaflet","neondb","nodejs","postgresql","prisma-orm","react","render","swagger-ui","tailwind-css","typescript","vercel"],"latest_commit_sha":null,"homepage":"https://janmat-beta.vercel.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yashitanamdeo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-12T14:48:30.000Z","updated_at":"2025-12-05T08:56:55.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/yashitanamdeo/janmat","commit_stats":null,"previous_names":["yashitanamdeo/janmat"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/yashitanamdeo/janmat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yashitanamdeo%2Fjanmat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yashitanamdeo%2Fjanmat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yashitanamdeo%2Fjanmat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yashitanamdeo%2Fjanmat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yashitanamdeo","download_url":"https://codeload.github.com/yashitanamdeo/janmat/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yashitanamdeo%2Fjanmat/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31520518,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T16:28:08.000Z","status":"ssl_error","status_checked_at":"2026-04-07T16:28:06.951Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["axios","customer-complaints","government-innovation","janmat","leaflet","neondb","nodejs","postgresql","prisma-orm","react","render","swagger-ui","tailwind-css","typescript","vercel"],"created_at":"2025-12-29T05:22:22.528Z","updated_at":"2026-04-07T16:32:28.633Z","avatar_url":"https://github.com/yashitanamdeo.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# 🏛️ JanMat - Citizen Complaint Management System\n\n### *Empowering Citizens, Transforming Governance*\n\n[![Live Demo](https://img.shields.io/badge/demo-live-success?style=for-the-badge\u0026logo=vercel)](https://janmat-beta.vercel.app)\n[![Backend API](https://img.shields.io/badge/API-live-blue?style=for-the-badge\u0026logo=render)](https://janmat-backend-r51g.onrender.com)\n[![License](https://img.shields.io/badge/license-MIT-purple?style=for-the-badge)](LICENSE)\n\n![JanMat Banner](./frontend/src/assets/Janmat-logo-main.png)\n\n**A modern, full-stack platform revolutionizing how citizens interact with government departments through transparent, efficient complaint management.**\n\n[Features](#-features) • [Tech Stack](#-tech-stack) • [Getting Started](#-getting-started) • [Architecture](#-architecture) • [API Docs](#-api-documentation) • [Contributing](#-contributing)\n\n\u003c/div\u003e\n\n---\n\n## 📋 Table of Contents\n\n- [Overview](#-overview)\n- [Key Features](#-key-features)\n- [Tech Stack](#-tech-stack)\n- [System Architecture](#-system-architecture)\n- [Getting Started](#-getting-started)\n- [Environment Setup](#-environment-setup)\n- [Deployment](#-deployment)\n- [API Documentation](#-api-documentation)\n- [User Roles](#-user-roles)\n- [Screenshots](#-screenshots)\n- [Contributing](#-contributing)\n- [License](#-license)\n\n---\n\n## 🌟 Overview\n\n**JanMat** is a comprehensive citizen complaint management system designed to bridge the gap between citizens and government departments. Built with modern web technologies, it provides a seamless experience for filing, tracking, and resolving civic issues.\n\n### Why JanMat?\n\n- 🎯 **Citizen-Centric**: Easy-to-use interface for filing and tracking complaints\n- 🚀 **Real-Time Updates**: Live notifications and status tracking via WebSockets\n- 📊 **Data-Driven**: Advanced analytics and performance metrics\n- 🔒 **Secure**: JWT authentication with role-based access control\n- 📱 **Responsive**: Works flawlessly on desktop, tablet, and mobile\n- 🌍 **Scalable**: Microservices architecture with message queuing\n\n---\n\n## ✨ Key Features\n\n### For Citizens 👥\n\n- **Easy Complaint Filing**: Submit complaints with location, category, and attachments\n- **Real-Time Tracking**: Monitor complaint status with live updates\n- **Feedback System**: Rate and review resolved complaints\n- **Interactive Map**: Visualize complaints on an interactive map\n- **Notification Center**: Get instant updates on complaint progress\n- **Profile Management**: Manage personal information and complaint history\n\n### For Officers 👮\n\n- **Complaint Assignment**: View and manage assigned complaints\n- **Status Updates**: Update complaint status with detailed comments\n- **Timeline Tracking**: Add updates to complaint resolution timeline\n- **Attendance System**: Check-in/check-out with automated tracking\n- **Leave Management**: Apply for and track leave requests\n- **Performance Dashboard**: View personal performance metrics\n\n### For Administrators 🔧\n\n- **Department Management**: Create and manage government departments\n- **Officer Management**: Assign officers to departments and complaints\n- **Analytics Dashboard**: Comprehensive insights into system performance\n- **User Management**: Manage citizens, officers, and their permissions\n- **Feedback Monitoring**: Review and analyze citizen feedback\n- **Advanced Search**: Filter and search complaints with multiple criteria\n- **Attendance Oversight**: Monitor officer attendance across departments\n- **Leave Approval**: Approve or reject leave requests\n\n---\n\n## 🛠️ Tech Stack\n\n### Frontend\n\n- **Framework**: React 19 with TypeScript\n- **State Management**: Redux Toolkit\n- **Routing**: React Router v7\n- **Styling**: Tailwind CSS with custom design system\n- **UI Components**: Headless UI, Heroicons\n- **Maps**: Leaflet \u0026 React-Leaflet\n- **Charts**: Recharts\n- **Animations**: Framer Motion\n- **Forms**: React Hook Form with Zod validation\n- **HTTP Client**: Axios\n- **Real-Time**: Socket.IO Client\n\n### Backend\n\n- **Runtime**: Node.js with Express.js\n- **Language**: TypeScript\n- **Database**: PostgreSQL with Prisma ORM\n- **Authentication**: JWT (JSON Web Tokens)\n- **Real-Time**: Socket.IO\n- **Caching**: Redis (Upstash)\n- **Message Queue**: RabbitMQ (CloudAMQP)\n- **Email**: Nodemailer\n- **File Upload**: Multer\n- **API Documentation**: OpenAPI/Swagger\n- **Validation**: Zod\n\n### DevOps \u0026 Infrastructure\n\n- **Frontend Hosting**: Vercel\n- **Backend Hosting**: Render\n- **Database**: Neon (Serverless PostgreSQL)\n- **Redis**: Upstash\n- **Message Queue**: CloudAMQP\n- **File Storage**: Cloudinary\n- **Version Control**: Git \u0026 GitHub\n\n---\n\n## 🏗️ System Architecture\n\n```\n┌─────────────────────────────────────────────────────────────┐\n│                     Frontend (React)                        │\n│  ┌──────────┐  ┌──────────┐  ┌──────────┐  ┌──────────┐   │\n│  │ Citizens │  │ Officers │  │  Admins  │  │   Maps   │   │\n│  └──────────┘  └──────────┘  └──────────┘  └──────────┘   │\n│         │              │              │              │      │\n│         └──────────────┴──────────────┴──────────────┘      │\n│                          │                                  │\n│                    Socket.IO \u0026 REST API                     │\n└─────────────────────────┬───────────────────────────────────┘\n                          │\n┌─────────────────────────┴───────────────────────────────────┐\n│                  Backend (Express.js)                       │\n│  ┌──────────────┐  ┌──────────────┐  ┌──────────────┐     │\n│  │     Auth     │  │  Complaints  │  │   Analytics  │     │\n│  │  Controller  │  │  Controller  │  │  Controller  │     │\n│  └──────────────┘  └──────────────┘  └──────────────┘     │\n│         │                  │                  │            │\n│  ┌──────┴──────────────────┴──────────────────┴──────┐    │\n│  │              Prisma ORM                            │    │\n│  └────────────────────┬───────────────────────────────┘    │\n└───────────────────────┼────────────────────────────────────┘\n                        │\n        ┌───────────────┼───────────────┐\n        │               │               │\n┌───────┴──────┐ ┌─────┴──────┐ ┌─────┴──────┐\n│  PostgreSQL  │ │   Redis    │ │  RabbitMQ  │\n│    (Neon)    │ │  (Upstash) │ │(CloudAMQP) │\n└──────────────┘ └────────────┘ └────────────┘\n```\n\n### Key Architectural Patterns\n\n- **MVC Pattern**: Separation of concerns with controllers, services, and models\n- **Repository Pattern**: Data access abstraction through Prisma\n- **Microservices**: Background workers for notifications and scheduled tasks\n- **Event-Driven**: RabbitMQ for asynchronous task processing\n- **Caching**: Redis for session management and performance optimization\n- **Real-Time Communication**: WebSocket connections for live updates\n\n---\n\n## 🚀 Getting Started\n\n### Prerequisites\n\n- Node.js 18+ and npm\n- PostgreSQL database\n- Redis instance (optional for local development)\n- RabbitMQ instance (optional for local development)\n\n### Local Development Setup\n\n1. **Clone the repository**\n   ```bash\n   git clone https://github.com/yashitanamdeo/janmat.git\n   cd janmat\n   ```\n\n2. **Backend Setup**\n   ```bash\n   cd backend\n   npm install\n   \n   # Copy environment template\n   cp .env.example .env\n   \n   # Update .env with your credentials\n   # Run database migrations\n   npx prisma migrate dev\n   \n   # Seed the database\n   npx prisma db seed\n   \n   # Start development server\n   npm run dev\n   ```\n\n3. **Frontend Setup**\n   ```bash\n   cd frontend\n   npm install\n   \n   # Start development server\n   npm run dev\n   ```\n\n4. **Access the application**\n   - Frontend: http://localhost:5173\n   - Backend API: http://localhost:3000\n   - API Docs: http://localhost:3000/docs\n\n---\n\n## 🔐 Environment Setup\n\n### Backend Environment Variables\n\nCreate a `.env` file in the `backend` directory:\n\n```env\n# Database\nDATABASE_URL=\"postgresql://user:password@localhost:5432/janmat\"\n\n# JWT\nJWT_SECRET=\"your-super-secret-jwt-key-change-this\"\n\n# Server\nPORT=3000\nNODE_ENV=development\n\n# CORS\nCORS_ORIGIN=http://localhost:5173\nFRONTEND_URL=http://localhost:5173\n\n# Redis (Optional)\nREDIS_URL=\"redis://localhost:6379\"\n\n# RabbitMQ (Optional)\nRABBITMQ_URL=\"amqp://localhost\"\n\n# Email (Optional)\nSMTP_HOST=smtp.gmail.com\nSMTP_PORT=587\nSMTP_USER=your-email@gmail.com\nSMTP_PASS=your-app-password\n```\n\n### Frontend Environment Variables\n\nCreate a `.env.production` file in the `frontend` directory:\n\n```env\nVITE_API_URL=http://localhost:3000/api\n```\n\n---\n\n\n\n## 📚 API Documentation\n\n### Authentication Endpoints\n\n```\nPOST   /api/auth/register          Register new user\nPOST   /api/auth/login             Login user\nPOST   /api/auth/verify-email      Verify email\nGET    /api/auth/me                Get current user\n```\n\n### Complaint Endpoints\n\n```\nGET    /api/complaints             Get all complaints\nPOST   /api/complaints             Create complaint\nGET    /api/complaints/:id         Get complaint by ID\nPATCH  /api/complaints/:id         Update complaint\nDELETE /api/complaints/:id         Delete complaint\nPOST   /api/complaints/:id/assign  Assign complaint to officer\n```\n\n### Department Endpoints\n\n```\nGET    /api/departments            Get all departments\nPOST   /api/departments            Create department\nGET    /api/departments/:id        Get department by ID\nPATCH  /api/departments/:id        Update department\nDELETE /api/departments/:id        Delete department\n```\n\n### Analytics Endpoints\n\n```\nGET    /api/analytics/department-performance    Department stats\nGET    /api/analytics/trends                    Complaint trends\nGET    /api/analytics/officer-performance       Officer performance\n```\n\n**Full API Documentation**: Available at `/docs` endpoint when running the backend server.\n\n---\n\n## 👥 User Roles\n\n### Role Permissions\n\n| Feature | Citizen | Officer | Admin |\n|---------|---------|---------|-------|\n| File Complaints | ✅ | ✅ | ✅ |\n| View Own Complaints | ✅ | ✅ | ✅ |\n| Update Complaint Status | ❌ | ✅ | ✅ |\n| Assign Complaints | ❌ | ❌ | ✅ |\n| Manage Departments | ❌ | ❌ | ✅ |\n| Manage Officers | ❌ | ❌ | ✅ |\n| View Analytics | ❌ | ✅ | ✅ |\n| Approve Leaves | ❌ | ❌ | ✅ |\n\n---\n\n\n## 🎯 Project Structure\n\n```\njanmat/\n├── backend/\n│   ├── prisma/\n│   │   ├── schema.prisma          # Database schema\n│   │   ├── migrations/            # Database migrations\n│   │   └── seed.ts                # Database seeding\n│   ├── src/\n│   │   ├── config/                # Configuration files\n│   │   ├── controllers/           # Route controllers\n│   │   ├── middleware/            # Express middleware\n│   │   ├── routes/                # API routes\n│   │   ├── services/              # Business logic\n│   │   ├── utils/                 # Utility functions\n│   │   ├── workers/               # Background workers\n│   │   ├── app.ts                 # Express app setup\n│   │   └── server.ts              # Server entry point\n│   └── package.json\n│\n├── frontend/\n│   ├── public/                    # Static assets\n│   ├── src/\n│   │   ├── assets/                # Images, fonts, etc.\n│   │   ├── components/            # React components\n│   │   │   ├── admin/             # Admin components\n│   │   │   ├── analytics/         # Analytics components\n│   │   │   ├── auth/              # Auth components\n│   │   │   ├── complaint/         # Complaint components\n│   │   │   ├── officer/           # Officer components\n│   │   │   └── ui/                # Reusable UI components\n│   │   ├── pages/                 # Page components\n│   │   ├── store/                 # Redux store\n│   │   │   └── slices/            # Redux slices\n│   │   ├── utils/                 # Utility functions\n│   │   ├── App.tsx                # Root component\n│   │   └── main.tsx               # Entry point\n│   └── package.json\n│\n└── README.md\n```\n\n---\n\n## 🔧 Development\n\n\n### Code Quality\n\n```bash\n# Lint backend\ncd backend\nnpm run lint\n\n# Lint frontend\ncd frontend\nnpm run lint\n```\n\n### Database Management\n\n```bash\n# Create a new migration\nnpx prisma migrate dev --name migration_name\n\n# Reset database\nnpx prisma migrate reset\n\n# Open Prisma Studio\nnpx prisma studio\n```\n\n---\n\n## 🤝 Contributing\n\nWe welcome contributions! Please follow these steps:\n\n1. Fork the repository\n2. Create a feature branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n### Contribution Guidelines\n\n- Follow the existing code style\n- Write meaningful commit messages\n- Add tests for new features\n- Update documentation as needed\n- Ensure all tests pass before submitting PR\n\n---\n\n## 📝 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n---\n\n## 🙏 Acknowledgments\n\n- **Design Inspiration**: Modern government portals and civic tech platforms\n- **Icons**: Heroicons\n- **Maps**: OpenStreetMap contributors\n- **Community**: All contributors and users of JanMat\n\n---\n\n## 📞 Support\n\n- **Email**: support@janmat.com\n- **Issues**: [GitHub Issues](https://github.com/yashitanamdeo/janmat/issues)\n- **Discussions**: [GitHub Discussions](https://github.com/yashitanamdeo/janmat/discussions)\n\n---\n\n## 🗺️ Roadmap\n\n- [ ] Mobile app (React Native)\n- [ ] Multi-language support\n- [ ] Advanced analytics with ML predictions\n- [ ] Integration with government APIs\n- [ ] SMS notifications\n- [ ] Voice complaint filing\n- [ ] Chatbot support\n- [ ] Public complaint dashboard\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\n### Made with ❤️ for better governance\n\n**[⬆ back to top](#-janmat---citizen-complaint-management-system)**\n\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyashitanamdeo%2Fjanmat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyashitanamdeo%2Fjanmat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyashitanamdeo%2Fjanmat/lists"}