MatdarSathi is an open-source, privacy-first civic utility application built to empower volunteers and citizens during electoral roll verification drives (such as India's Special Intensive Revision - SIR). It enables voters and grass-roots volunteers to search local rolls, detect unexpected deletions/transfers, locate nearby Booth Level Officers (BLOs), decode legacy voter IDs, and prepare Form 6, 7, and 8 applications without compromising individual personal data privacy.
The codebase is organized into four decoupled layers:
frontend/: Angular 17+ Standalone Application using Signals, RxJS, and TailwindCSS. Includes PWA capabilities and Capacitor wrappers for iOS (WKWebView) and Android (WebView) native deployment.backend/: C# ASP.NET Core 9/10 Web API following Clean Architecture, Native MIT CQRS pattern, FluentValidation, Serilog, rate-limiting middlewares, and PostgreSQL persistence.parser-service/: Python 3.11+ FastAPI Microservice usingpypdfandPyMuPDF(fitz) for secure, streaming extraction of electoral roll PDF documents.docker-compose.yml: Full multi-container orchestration for one-command deployment.
Anyone who clones or forks this repository can run the entire suite locally using either Docker or direct native execution.
If you have Docker Desktop installed:
# 1. Clone the repository
git clone https://github.com/nparvezten/MatdarSathi.git
cd MatdarSathi
# 2. Build and start all services (PostgreSQL, .NET API, Python Parser, Angular Frontend)
docker compose up --buildAccess the application in your browser:
- Web Dashboard & Public Utilities:
http://localhost:4200 - C# .NET API Backend:
http://localhost:5103 - Python Parser Service:
http://localhost:8000
If you prefer to run services manually on your local system:
- .NET 9.0/10 SDK: Download .NET
- Node.js 20+ & npm: Download Node.js
- Python 3.11+: Download Python
- PostgreSQL 15+ (Running locally on port
5432with username/passwordpostgres/postgres)
dotnet run --project backend/API/MatdarSathi.API.csproj --launch-profile http(The backend automatically runs EF Core migrations and seeds baseline test records on startup).
cd parser-service
python3 -m venv .venv
source .venv/bin/activate # On Windows use: .venv\Scripts\activate
pip install -r requirements.txt
uvicorn main:app --host 0.0.0.0 --port 8000cd frontend
npm install
npx ng serve --port 4200 --proxy-config proxy.conf.jsonThe application comes pre-loaded with sample baseline voter profiles and volunteer credentials for immediate testing:
- Email:
verifier@matdarsathi.org - Password:
SecurePassword123!
SLD1234567— Khan Saidnabi (Age 78, House42-A/1)SLD9876543— Ramesh Sawant (Age 45, House42-A/2)SLD2345678— Deepa Joshi (Age 29, House43)SLD5544332— Imran Shaikh (Age 42, House45/A)SLD6677889— Farida Begum (Age 38, House48)
MT/05/025/180293— Decodes state segment (MT/ Maharashtra), Lok Sabha 05, Assembly part 25, and Serial 180293 for historical searches.
To verify system integrity, run the automated pipeline script from the root directory:
./run-pipeline.shThis script automatically executes:
- Backend C# build,
dotnet formatstatic code analysis, and xUnit test suite. - Python pytest unit tests and Bandit SAST security analysis.
- Angular standalone production compilation.
- Native Capacitor iOS/Android asset synchronization.
To eliminate data leakage liability, MatdarSathi adheres to strict security standards:
- AES-256 Field Encryption: Cleartext names, phone numbers, and dates of birth are encrypted before database persistence.
- HMAC-SHA256 Blind Indexing: Verification lookups query one-way cryptographic hashes, preventing database exposure during SQL execution.
- Explicit Consent & Rate Limiting: All verification queries require user privacy consent and are rate-limited (
strict-limit) against web scrapers.
Distributed under the MIT License. See LICENSE for more information.