Back
In Progress

Niti

A multi-tenant healthcare platform with Indian regulatory compliance and AI-powered clinical workflows.

Start Date
Mar 2026
End Date
Ongoing
Status
In Progress
Team
1 member

Technologies

ReactNestJSPostgreSQLTypeORMTurborepoAnt DesignTanStack QueryZustandRedisClaude AIOpenAIViteZodPassport JWT

About this project

India's healthcare digitization push requires even the smallest clinics to adopt compliant software. But most solutions are either enterprise-priced, needlessly complex, or ignore Indian-specific requirements like ABHA IDs, DISHA consent management, and lakhs/crores currency formatting. Niti is built from scratch for this gap — a full clinic management platform that's regulation-compliant by default, not as an afterthought.

Architecture

The system is a Turborepo monorepo with a React frontend, NestJS backend, and a shared @niti/shared package that enforces identical types, Zod validators, and constants across both sides — zero type drift. The database is PostgreSQL with multi-tenant isolation via tenant_id on every table. Every query is tenant-scoped; cross-tenant access is impossible by design. Schema changes only happen through reviewed migration files — TypeORM's synchronize is disabled everywhere. Primary keys use UUID v7 for time-sorted index performance.

What's Inside

18 backend modules and 11 frontend features covering the full clinic workflow: patient registration, appointments, doctor schedules, vitals tracking with trend charts, prescriptions with a medicine catalog, medical records, insurance claims, and consent management. Auth uses JWT access tokens with httpOnly refresh cookies, token family rotation, and theft detection. Every state-changing operation is logged in a tamper-evident hash-chain audit trail.

AI Integration

Doctors can generate one-click patient summaries powered by Claude (Anthropic) with automatic OpenAI fallback. Each summary tracks actual token cost in USD, enforces rate limits (5/user/day with remaining count in UI), and maintains a versioned history. This isn't a demo — it's production AI with cost controls and reliability baked in.

Compliance & Indian Localization

DISHA/DPDPA compliance is structural, not cosmetic: explicit consent recording for data processing and sharing (revocable anytime), AES-256-GCM encryption at rest for phone numbers, ABHA IDs, and Aadhaar numbers, and RBAC with default-deny on every endpoint. Indian-specific validations cover 10-digit mobile numbers (starting 6-9), 6-digit pincodes, 14-digit ABHA IDs, and GSTIN formats. Currency renders in lakhs/crores throughout — ₹10,00,000, not ₹10,000,000.

By the Numbers

~29,000 lines of TypeScript, 243 passing tests across 16 test suites, 18 backend modules, fully responsive with dark mode, and a frontend that degrades gracefully — sidebar becomes a drawer, tables hide columns, drawers go full-screen on mobile.

Live at niti.diwakarit.com.

Team

Abhishek Diwakar

Abhishek Diwakar

Software Engineer