I built Setu as a GovTech MVP for SIH PS-26129: a consent-based, audited data-exchange platform for siloed government systems. Its Next.js full-stack monolith simulates microservices through isolated API routes.
My GovConnect_SIH-2026 repository is on GitHub, uses TypeScript, and is dated: Started 2026-08, last updated 2026-08.
The project is an MVP for SIH PS-26129, built for consent-based, audited data exchange between siloed government department systems (Revenue, Skills).
A citizen starts the fetch from /citizen/apply. The consent endpoint records a Consent row and audit entry; the gateway then authenticates and rate-limits the fetch request. Middleware checks that consent is active before the Adapter Service retrieves and normalizes department records.
A failed consent check returns 403 ConsentRequiredError.
The Adapter Service requests raw records from the Revenue and Skills mock-department endpoints, whose response shapes differ, and adapts them into a Canonical Data Record (CDM). It logs DATA_FETCH, returns the record to the browser, and the submitted application assembles it into Application.dataPayload.
Every path into mock-depts goes through the Adapter Service; nothing else in the app calls those endpoints directly.
My stack includes Next.js 16 (App Router), TypeScript strict, Tailwind CSS v4, PostgreSQL via Prisma 6, and NextAuth (Auth.js) v5.
The interface uses hand-built shadcn-style primitives in src/components/ui. Credentials authentication supports mock SSO with Aadhaar and password. State uses React hooks and fetch; Zustand is installed as an option if the project grows to need it.
I deliberately pinned Prisma to 6.19.3 instead of the newly-released 7.x.
The README describes Prisma 7 as bringing a generator-provider change from prisma-client-js to prisma-client, an explicit driver adapter such as @prisma/adapter-pg, ESM-only requirements, and a mandatory custom generator output path. I chose Prisma 6's prisma-client-js and direct DATABASE_URL setup as the documented, lower-risk choice for an MVP needed in days rather than weeks. The README frames a later Prisma 7 upgrade as a contained, opt-in migration after the MVP is stable.
During the build, prisma generate / prisma migrate dev could not be executed or verified while building this repo.
The sandbox network allowlist did not include binaries.prisma.sh, so the Prisma files were written by hand against the schema and Prisma's documented v6 API. The README asks the first person to run the Prisma toolchain to report back if anything does not line up; generation and migration remain unverified.
I used real citizen/ and official/ route segments, placing the portals at /citizen/* and /official/*, rather than using route groups that could collide on /dashboard.
My GovConnect_SIH-2026 repository is on @Sambit-Mondal's GitHub.
My Setu interface uses Tailwind CSS v4 + hand-built shadcn-style primitives.
My authentication stack uses NextAuth (Auth.js) v5, Credentials provider.
My mock SSO uses Aadhaar + password.
Zustand is installed if you grow into needing it.
I can use a pooled URL for app traffic as my DATABASE_URL.
I use a direct Postgres URL (port 5432) as DIRECT_URL for Prisma Migrate.
I set DATABASE_URL, DIRECT_URL, and AUTH_SECRET; I can generate the secret with openssl rand -base64 32.
npm install
cp .env.example .env
npx prisma generate
npx prisma migrate dev --name init
npm run db:seed
npm run dev
I run the local demo at http://localhost:3000.
My seed data contains 2 citizens, 2 department officials, 1 sample application.
The demo password for all four accounts is password123.
My demo accounts are Asha Patil and Rohan Deshmukh are citizens; Priya Kulkarni is Revenue Dept official; Sanjay More is Skills Dept official; Aadhaar values are redacted.
If Prisma Migrate reports P1001 against a Supabase pooler host on port 6543, I use the direct database host on port 5432 with sslmode=require.
My walkthrough audit events are CONSENT_GRANTED, DATA_FETCH (x2), APPLICATION_SUBMITTED, APPLICATION_STATUS_CHANGE, CONSENT_REVOKED.
I organize core services as src/services/adapters.ts: Adapter Service + Canonical Data Model registry; src/services/consent.ts: Consent Engine (grant / revoke / assert-active); src/services/audit.ts: centralized audit log writer.
My src/app/api/gateway/fetch-data provides API Gateway (auth boundary + rate limit).
My src/app/api/middleware/fetch-data/handler.ts is the single enforced code path for any cross-department fetch, using consent gate -> adapter -> audit.
I use a Mock Credentials provider for blueprint Phase 1; replace with real SSO/OIDC before real citizen data; other code reads role from session.
I note that in-memory rate limiting is fine for one process; needs Redis or similar behind a real load balancer.
No automated tests yet; checkDataQuality, adapters, and consent engine are plain functions written to be easy to unit test; tests are next to add.
My checkDataQuality official-portal scan fetches every citizen x every department on each dashboard load; fine for a demo dataset, not for production scale.
My Supabase direct database URL example is DIRECT_URL="postgresql://postgres.<project-ref>:<password>@db.<project-ref>.supabase.co:5432/postgres?sslmode=require".
I demonstrate fetching Revenue data from /api/mock-depts/revenue.