Chikit is an offline-first AI medical assistant and multi-hospital healthcare ERP platform designed to streamline healthcare operations, improve patient care, and facilitate seamless communication between hospitals, doctors, patients, and administrative staff. The platform integrates advanced AI capabilities with comprehensive hospital management features to create a unified healthcare ecosystem.
| 1. Universal Portal Selection | 2. Multi-Method Staff Authentication |
|---|---|
![]() |
![]() |
| 3. Staff Credentials Sign-In | 4. AIIMS Jodhpur Virtual Control Center |
|---|---|
![]() |
![]() |
- Aayush Lakhara - Full Stack Development & System Architecture
- Tarnnum Khan - Frontend Development & UI/UX Design
- Siddhant Patil - Backend Development & API Integration
- Framework: React 18 with Vite
- Language: TypeScript
- State Management: React Query (TanStack Query)
- UI Components: Radix UI primitives, Tailwind CSS
- Icons: Lucide React
- Forms: React Hook Form with Zod validation
- Charts: Recharts
- Notifications: Sonner
- Date Handling: date-fns
- HTTP Client: Fetch API / React Query
- Runtime: Node.js v24.x
- Framework: Express.js
- Language: TypeScript
- ORM: Drizzle ORM
- Database: PostgreSQL (development: SQLite)
- Authentication: JWT (JSON Web Tokens) with bcrypt hashing
- Validation: Zod
- HTTP Utilities: cross-env, tsx
- API Documentation: RESTful API design
- Package Manager: pnpm
- Code Quality: ESLint, Prettier
- Type Checking: TypeScript
- Build Tool: Vite (frontend), esbuild (backend)
- Version Control: Git/GitHub
- Multi-Hospital Architecture: Secure data isolation between hospitals
- Role-Based Access Control (RBAC): Fine-grained permissions for different user types
- Offline-First Design: Core functionality available without internet connectivity
- AI-Powered Assistance: Integrated AI features for clinical decision support
- Comprehensive Audit Logging: Full traceability of all system actions
- Real-Time Updates: Live data synchronization where applicable
- Admin: Full system access (user management, hospital configuration, reporting)
- Doctor: Patient management, prescriptions, medical records, appointments
- Nurse: Patient care tasks, vitals monitoring, medication administration
- Pharmacist: Pharmacy inventory, prescription dispensing, drug interactions
- Lab Technician: Test ordering, result entry, laboratory workflow
- Receptionist: Appointment scheduling, patient registration, front desk operations
- Patient: Personal health portal, appointment booking, medical records access
- Government Authority: Limited oversight for regulatory compliance
- Patient Search Endpoint: Efficient backend search with pagination (
/api/patients/search) - Patient Summary API: Concise Two-Minute Doctor view (
/api/patients/:id/summary) - PatientSummary React Component: Unified patient overview interface
- Integrated Summary Tab: Easy access to patient summary in detail views
- Role-Based Navigation: Dynamic menu generation based on user permissions
- Authentication System: Multi-factor authentication (email/password, OTP, Google OAuth, ABHA)
- Node.js v20+ (v24 recommended)
- pnpm v8+ (comes with Node.js v20+)
- PostgreSQL v14+ (for production) or SQLite (for development)
- Git v2.30+
-
Clone the Repository
git clone https://github.com/seyric/Chikit.git cd Chikit -
Install Dependencies
pnpm install
-
Configure Environment Variables Copy the example environment file and configure as needed:
cp .env.example .env
Edit
.envwith your configuration:# Server Configuration PORT=3100 # Database Connection (Development) DATABASE_URL="sqlite:///./dev.db" # Database Connection (Production - PostgreSQL Example) # DATABASE_URL="postgresql://username:password@localhost:5432/chikit_db" # JWT Security JWT_SECRET=your_jwt_secret_here_change_in_production # ABDM Configuration (Optional) ABDM_BASE_URL=https://abha.abdm.gov.in ABDM_API_KEY=your_abdm_api_key_here ABDM_API_SECRET=your_abdm_api_secret_here # MedGemma Offline AI Configuration (Optional) MEDGEMMA_INFERENCE_URL=http://localhost:8000 MEDGEMMA_MODEL_NAME=medgemma-4b-it
-
Initialize Database (Development) The SQLite database will be created automatically on first server start. For PostgreSQL, ensure the database exists and run migrations:
# For PostgreSQL production setup pnpm db:push # or your preferred migration command
-
Start Development Servers
# In one terminal - Backend API pnpm dev:api # In another terminal - Frontend Application pnpm dev:web
Or use the concurrent script:
pnpm dev # starts both servers
# Build and run with Docker Compose
docker-compose up --build
# Access the application
# Frontend: http://localhost:5175
# Backend API: http://localhost:3100| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
POST |
/api/auth/login |
Authenticate user (email/password) | No |
POST |
/api/auth/register |
Register new user | No |
POST |
/api/auth/send-otp |
Send OTP for phone verification | No |
POST |
/api/auth/verify-otp |
Verify OTP code | No |
POST |
/api/auth/google |
Google OAuth authentication | No |
GET |
/api/auth/me |
Get current user profile | Yes |
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
GET |
/api/patients/search |
Search patients with pagination, filtering, and sorting | Yes |
GET |
/api/patients/:id |
Get patient by ID | Yes |
GET |
/api/patients/:id/summary |
Get patient summary (Two-Minute Doctor feature) | Yes |
POST |
/api/patients |
Create new patient record | Yes |
PUT |
/api/patients/:id |
Update patient record | Yes |
DELETE |
/api/patients/:id |
Delete patient record | Yes |
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
GET |
/api/hospitals |
List hospitals (admin only) | Yes + Admin |
POST |
/api/hospitals |
Create new hospital | Yes + Admin |
GET |
/api/staff |
List hospital staff | Yes |
POST |
/api/staff |
Add new staff member | Yes |
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
GET |
/api/appointments |
List appointments with filtering | Yes |
POST |
/api/appointments |
Create new appointment | Yes |
PUT |
/api/appointments/:id |
Update appointment | Yes |
DELETE |
/api/appointments/:id |
Delete appointment | Yes |
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
GET |
/api/medical-records/:patientId |
Get patient's medical records | Yes |
POST |
/api/medical-records |
Create new medical record | Yes |
GET |
/api/lab-reports/:patientId |
Get patient's lab reports | Yes |
POST |
/api/lab-reports |
Create new lab report | Yes |
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
GET |
/api/prescriptions/:patientId |
Get patient's prescriptions | Yes |
POST |
/api/prescriptions |
Create new prescription | Yes |
PUT |
/api/prescriptions/:id |
Update prescription | Yes |
DELETE |
/api/prescriptions/:id |
Delete prescription | Yes |
Chikit/
├── .claude/ # Claude Code configurations and skills
├── artifacts/
│ ├── api-server/ # Backend API server
│ │ ├── src/
│ │ │ ├── lib/ # Backend utilities and services
│ │ │ │ ├── auth.ts # Authentication middleware and utilities
│ │ │ │ ├── patient-identity-service.ts # Patient identity management
│ │ │ │ ├── digi-locker-service.ts # DigiLocker integration
│ │ │ │ ├── verification-provider.ts # Aadhaar verification abstraction
│ │ │ │ └── consent-service.ts # Consent management
│ │ │ ├── routes/ # API route definitions
│ │ │ │ ├── auth.ts # Authentication routes
│ │ │ │ ├── patient-registration.ts # Patient registration flows
│ │ │ │ ├── patient-auth.ts # Patient-specific authentication
│ │ │ │ ├── identity-verification.ts # Identity verification endpoints
│ │ │ │ ├── patients.ts # Patient management (search, summary)
│ │ │ │ └── hospitals.ts # Hospital management
│ │ │ ├── index.ts # Server entry point
│ │ │ └── build.ts # Build script
│ │ ├── tsconfig.json # TypeScript configuration
│ │ └── package.json # Backend dependencies
│ └── chikit/ # Frontend application
│ ├── src/
│ │ ├── components/ # Reusable UI components
│ │ │ ├── layout.tsx # Application layout with role-based navigation
│ │ │ └── PatientSummary.tsx # Two-Minute Doctor patient summary component
│ │ ├── pages/ # Page components
│ │ │ ├── login.tsx # Authentication page
│ │ │ ├── register.tsx # User registration page
│ │ │ ├── patient-portal.tsx # Patient-specific interface
│ │ │ ├── doctors.tsx # Doctor dashboard
│ │ │ ├── medical-records.tsx # Medical records view
│ │ │ └── ai-assistant.tsx # AI assistant interface
│ │ ├── lib/ # Frontend utilities and hooks
│ │ │ ├── auth.tsx # Authentication context and utilities
│ │ │ ├── demoData.ts # Demo data for development
│ │ │ └── demoInterceptor.ts # Request/response interceptors
│ │ ├── App.tsx # Main application component
│ │ └── main.tsx # Application entry point
│ ├── index.html # HTML template
│ ├── tsconfig.json # TypeScript configuration
│ ├── vite.config.ts # Vite configuration with API proxy
│ └── package.json # Frontend dependencies
├── .env.example # Example environment variables
├── .gitignore # Git ignore rules
├── pnpm-workspace.yaml # PNPM workspace configuration
└── package.json # Root package.json
Chikit implements a secure JWT-based authentication system with multiple factors:
- Email/Password: Traditional authentication with demo credentials
- Phone OTP: One-time password sent via SMS (demo mode returns OTP in response)
- Google OAuth: Sign-in with Google account (simulated in development)
- ABHA Authentication: Ayushman Bharat Health Account integration (sandbox mode)
- JWT tokens stored in httpOnly cookies and localStorage
- Automatic token refresh mechanism
- Secure token transmission via HTTPS in production
- Role and permissions embedded in JWT payload
- Middleware:
requireAuth()andrequireRole(...) - Roles validated on every protected route
- Hospital-scoped data access (users only see data from their assigned hospital)
- Separate API namespaces for staff (
/api/*) and patient (/patient-auth/*) flows
| Role | Username | Password |
|---|---|---|
| Admin | admin@chikit.health |
admin123 |
| Doctor | dr.sharma@chikit.health |
doctor123 |
| (Register new users via the registration page) |
| Variable | Description | Example |
|---|---|---|
PORT |
Server port number | 3100 |
DATABASE_URL |
Database connection string | sqlite:///./dev.db |
JWT_SECRET |
Secret for JWT signing | your_strong_secret_here |
| Variable | Description | Example |
|---|---|---|
ABDM_BASE_URL |
ABDM API base URL | https://abha.abdm.gov.in |
ABDM_API_KEY |
ABDM API key | your_key_here |
ABDM_API_SECRET |
ABDM API secret | your_secret_here |
ABDM_HIP_ID |
Health Provider ID | your_hip_id |
MEDGEMMA_INFERENCE_URL |
MedGemma inference server URL | http://localhost:8000 |
MEDGEMMA_MODEL_NAME |
MedGemma model variant | medgemma-4b-it |
- Development: Uses SQLite database, enables debug features, uses demo credentials
- Production: Requires PostgreSQL, strong JWT secret, proper SSL/TLS configuration
# Install dependencies (first time only)
pnpm install
# Start both servers concurrently
pnpm dev
# Or start individually:
# Terminal 1: Backend API
pnpm dev:api
# Terminal 2: Frontend Application
pnpm dev:webThe application will be available at:
- Frontend: http://localhost:5175
- Backend API: http://localhost:3100
- API Documentation: http://localhost:3100/api-docs (if enabled)
# Build frontend for production
pnpm build:web
# Build backend for production
pnpm build:api
# Start production servers
pnpm start| Script | Description |
|---|---|
pnpm dev |
Start both servers in development mode |
pnpm dev:api |
Start only the backend API server |
pnpm dev:web |
Start only the frontend development server |
pnpm build:web |
Build frontend for production |
pnpm build:api |
Build backend for production |
pnpm start |
Start production servers |
pnpm test |
Run test suite |
pnpm lint |
Run ESLint for code quality |
pnpm format |
Format code with Prettier |
# Run all tests
pnpm test
# Run frontend tests only
pnpm test:web
# Run backend tests only
pnpm test:apiUse the demo credentials to test different user roles:
- Admin:
admin@chikit.health/admin123 - Doctor:
dr.sharma@chikit.health/doctor123 - Register new patients/users via the registration interface
# Build and run with Docker Compose
docker-compose up --build
# Access the application:
# Frontend: http://localhost:5175
# Backend API: http://localhost:3100- Build the application:
pnpm build
- Set production environment variables
- Start the servers:
pnpm start
- Configure reverse proxy (NGINX/Apache) for SSL termination and load balancing
- Set up process manager (PM2, systemd) for process management
- Passwords hashed using bcrypt with salt
- JWT tokens signed with HS256 algorithm
- Sensitive data encrypted at rest (where applicable)
- SQL injection prevention via parameterized queries (Drizzle ORM)
- XSS protection through proper output encoding
- CSRF protection for state-changing operations
- All endpoints require authentication (except public auth routes)
- Rate limiting on authentication endpoints
- Input validation and sanitization on all inputs
- CORS policy restricted to trusted origins
- Security headers implemented (Helmet.js equivalent)
- GDPR and HIPAA compliance considerations
- Patient data minimization principles
- Consent management for data sharing
- Right to erasure and data portability features
- Audit trails for all data access and modifications
We welcome contributions to improve Chikit! Please follow these guidelines:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit your changes:
git commit -m 'feat: add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
- Follow existing code style and conventions
- Write meaningful commit messages
- Add tests for new features and bug fixes
- Update documentation when necessary
- Ensure all tests pass before submitting PR
- Respect the project's Code of Conduct
This project is licensed under the MIT License - see the LICENSE file for details.
- Thanks to all contributors and contributors
- Built with ❤️ for improving healthcare accessibility
- Special thanks to the open-source community for amazing tools and libraries
- Inspired by the need for better healthcare technology in underserved communities
For questions, issues, or feature requests:
- Open an issue on GitHub
- Contact the development team
- Check the documentation for troubleshooting guides
Last updated: October 2026
Chikit - Empowering healthcare through technology



