Empowering ASHA workers with a free, offline-capable anemia screening tool that delivers results in under 5 minutes.
- About The Project
- The Problem
- Screenshots
- Architecture
- Tech Stack
- Features
- Getting Started
- Environment Variables
- Database Setup
- Project Structure
- API Reference
- Contributing
- Feature Roadmap
- License
- Contact
- Acknowledgements
Arogya Assam is a healthcare platform built to tackle the silent crisis of anemia in rural Assam, India. Designed for ASHA (Accredited Social Health Activist) workers, it provides a WHO-aligned symptom-based screening tool accessible from any smartphone — no internet required for screening.
Patients can also locate nearby hospitals using pincode-based search powered by OpenStreetMap, and access their results through a secure, authenticated portal.
Mission: Make anemia screening accessible, free, and fast for every village in Assam.
| Statistic | Detail |
|---|---|
| 50%+ | Women in Assam are anemic (NFHS-5) |
| 67% | Children under 5 are anemic |
| Limited | Access to diagnostic labs in rural areas |
| Low | Awareness about anemia symptoms |
Traditional screening requires blood tests, lab equipment, and trained technicians — resources scarce in rural Assam. Arogya Assam bridges this gap with a digital-first, symptom-based approach.
┌─────────────────────────────────────────────────────────────────┐
│ CLIENT (Browser) │
│ │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌───────────────┐ │
│ │ Landing │ │ Screening│ │ Auth │ │ Hospital │ │
│ │ Page │ │ Tool │ │ Pages │ │ Finder │ │
│ └──────────┘ └──────────┘ └──────────┘ └───────────────┘ │
│ │ │ │ │ │
└───────┼──────────────┼─────────────┼───────────────┼────────────┘
│ │ │ │
▼ ▼ ▼ ▼
┌─────────────────────────────────────────────────────────────────┐
│ NEXT.JS 16 SERVER │
│ │
│ ┌─────────────────────────────────────────────────────────┐ │
│ │ Middleware Layer │ │
│ │ (Route Protection & Auth Guards) │ │
│ └─────────────────────────────────────────────────────────┘ │
│ │ │
│ ┌──────────────┐ ┌────────┴────────┐ ┌──────────────────┐ │
│ │ Better Auth │ │ API Routes │ │ Server Actions │ │
│ │ Handler │ │ /api/auth/* │ │ │ │
│ └──────┬───────┘ └────────┬────────┘ └─────────┬────────┘ │
│ │ │ │ │
└─────────┼───────────────────┼─────────────────────┼─────────────┘
│ │ │
▼ ▼ ▼
┌──────────────────┐ ┌───────────────┐ ┌─────────────────────┐
│ PostgreSQL │ │ OpenStreetMap│ │ External Auth │
│ (Neon DB) │ │ Nominatim + │ │ ┌───────┐ ┌──────┐ │
│ │ │ Overpass API │ │ │Google │ │GitHub│ │
│ ┌────────────┐ │ └───────────────┘ │ │ OAuth │ │OAuth │ │
│ │ Users │ │ │ └───────┘ └──────┘ │
│ │ Sessions │ │ ┌───────────────┐ └─────────────────────┘
│ │ Accounts │ │ │ Resend │
│ │Verification│ │ │ (Email API) │
│ └────────────┘ │ └───────────────┘
└──────────────────┘
User Request
│
▼
┌──────────┐ ┌──────────────┐ ┌─────────────┐
│ Next.js │ ───> │ Middleware │───>│ Page/API │
│ Router │ │ (Auth Check) │ │ Handler │
└──────────┘ └──────────────┘ └──────┬──────┘
│
┌───────────────────────┬┘
▼ ▼
┌─────────────┐ ┌──────────────┐
│ Prisma ORM │ │ OpenStreetMap│
│ (Database) │ │ APIs │
└─────────────┘ └──────────────┘
Start Screening
│
▼
┌──────────────┐
│ 10 Clinical │
│ Questions │
│ (EN + AS) │
└──────┬───────┘
│
▼
┌──────────────┐
│ Risk Score │
│ Calculation │
│ (0 - 100) │
└──────┬───────┘
│
├── Score ≤ 30 ──▶ 🟢 Low Risk
│
├── Score 31-60 ──▶ 🟡 Medium Risk
│
└── Score > 60 ──▶ 🔴 High Risk
│
▼
┌──────────────┐
│ Recommend │
│ Nearby │
│ Hospitals │
└──────────────┘
| Technology | Purpose |
|---|---|
| React Framework (App Router) | |
| UI Library | |
| Type Safety | |
| Styling | |
| Component Library | |
| Data Visualization | |
| Icons |
| Technology | Purpose |
|---|---|
| Authentication Framework | |
| Database ORM | |
| Database | |
| Schema Validation | |
| Password Hashing |
| Technology | Purpose |
|---|---|
| Hospital Geolocation | |
| Navigation Links | |
| Email Service | |
| Rate Limiting |
| Technology | Purpose |
|---|---|
| Serverless PostgreSQL | |
| Code Linting | |
| Dev Server Bundler |
| Feature | Description | Status |
|---|---|---|
| Anemia Screening | 10-question WHO-aligned symptom assessment | ✅ Live |
| Bilingual Support | English + Assamese (অসমীয়া) | ✅ Live |
| Risk Scoring | Clinical scoring algorithm (0-100 scale) | ✅ Live |
| Hospital Finder | Pincode-based nearby hospital search | ✅ Live |
| Navigation | Google Maps integration for directions | ✅ Live |
| Authentication | Email/password + Google & GitHub OAuth | ✅ Live |
| Responsive Design | Mobile-first UI for smartphone users | ✅ Live |
| Offline Screening | Screening works without internet | ✅ Live |
- Age group classification
- Fatigue level assessment (1-5 scale)
- Breathlessness detection
- Dizziness/lightheadedness check
- Pica/unusual cravings indicator
- Heart palpitation assessment
- Pallor severity (none/mild/severe)
- Iron-rich food intake frequency
- Menstrual bleeding assessment
- Recent blood loss history
- Node.js >= 18.x
- npm >= 9.x (or yarn/pnpm/bun)
- PostgreSQL database (or a Neon account)
- Google OAuth credentials (Google Cloud Console)
- GitHub OAuth credentials (GitHub Developer Settings)
# 1. Clone the repository
git clone https://github.com/YASHSHARMAOFFICIALLY/Argoya_Assam.git
cd arogya-assam
# 2. Install dependencies
npm install
# 3. Set up environment variables
cp .env.example .env
# Edit .env with your credentials (see Environment Variables section)
# 4. Set up the database
npx prisma generate
npx prisma db push
# 5. Start the development server
npm run devOpen http://localhost:3000 in your browser.
npm run build
npm startCreate a .env file in the root directory with the following variables:
# ──────────────── Database ────────────────
DATABASE_URL="postgresql://user:password@host:5432/arogya_assam"
# ──────────────── Authentication ────────────────
BETTER_AUTH_SECRET="your-secret-key-min-32-chars"
BETTER_AUTH_URL="http://localhost:3000"
# ──────────────── Google OAuth ────────────────
GOOGLE_CLIENT_ID="your-google-client-id"
GOOGLE_CLIENT_SECRET="your-google-client-secret"
# ──────────────── GitHub OAuth ────────────────
GITHUB_CLIENT_ID="your-github-client-id"
GITHUB_CLIENT_SECRET="your-github-client-secret"
# ──────────────── Email (Optional) ────────────────
RESEND_API_KEY="your-resend-api-key"
# ──────────────── App URLs ────────────────
NEXT_PUBLIC_APP_URL="http://localhost:3000"
NEXT_PUBLIC_BETTER_AUTH_URL="http://localhost:3000"⚠ Important: Never commit your
.envfile. It is already included in.gitignore.
model User {
id String @id
name String
email String @unique
emailVerified Boolean
image String?
sessions Session[]
accounts Account[]
}
model Session {
id String @id
token String @unique
expiresAt DateTime
ipAddress String?
userAgent String?
userId String → User
}
model Account {
id String @id
provider String // google, github, credential
accessToken String?
refreshToken String?
userId String → User
}
model Verification {
id String @id
identifier String
value String
expiresAt DateTime
}# Generate Prisma client
npx prisma generate
# Push schema to database
npx prisma db push
# Open Prisma Studio (GUI)
npx prisma studio
# Create a migration
npx prisma migrate dev --name initarogya-assam/
├── app/
│ ├── layout.tsx
│ ├── favicon.ico
│ ├── page.tsx
│ ├── loading.tsx
│ ├── globals.css
│ ├── screen/
│ │ └── page.tsx
│ ├── result/
│ │ └── page.tsx
│ ├── hospitals/
│ │ └── page.tsx
│ ├── dashboard/
│ │ └── page.tsx
│ ├── signin/
│ │ └── page.tsx
│ ├── signup/
│ │ └── page.tsx
│ ├── soon/
│ │ └── page.tsx
│ ├── chat/
│ │ └── page.tsx
│ ├── forgot-password/
│ │ └── page.tsx
│ └── api/
│ └── auth/
│ └── [...all]/route.ts
│
├── components/
│ ├── theme-provider.tsx
│ ├── landing/
│ │ ├── navbar.tsx
│ │ ├── hero.tsx
│ │ ├── problem.tsx
│ │ ├── solution.tsx
│ │ ├── mode-toggle.tsx
│ │ ├── faq.tsx
│ │ └── footer.tsx
│ ├── shared/
│ │ ├── button.tsx
│ │ └── design-system.tsx
│ ├── layout/
│ │ └── navbar.tsx
│ └── ui/
│ ├── button.tsx
│ ├── card.tsx
│ ├── input.tsx
│ └── ...
│
├── lib/
│ ├── auth.ts
│ ├── auth-client.ts
│ ├── db.ts
│ ├── openstreetmap.ts
│ ├── password.ts
│ ├── token.ts
│ ├── validators.ts
│ ├── email.ts
│ └── utils.ts
│
├── hooks/
│ └── use-mobile.ts
│
├── prisma/
│ └── schema.prisma
│
├── public/
│ ├── types/
│ │ └── bcrypt.d.ts
│ ├── file.svg
│ ├── globe.svg
│ ├── icon-192x192.png
│ ├── icon-512x512.png
│ ├── manifest.json
│ └── window.svg
│
├── .gitignore
├── components.json
├── Contributing.md
├── eslint.config.mjs
├── LICENSE
├── middleware.ts
├── next.config.ts
├── package-lock.json
├── package.json
├── postcss.config.mjs
├── prisma.config.ts
└── tsconfig.json
All auth routes are handled by Better Auth at /api/auth/*:
| Method | Endpoint | Description |
|---|---|---|
POST |
/api/auth/sign-up/email |
Register with email/password |
POST |
/api/auth/sign-in/email |
Sign in with email/password |
GET |
/api/auth/sign-in/social?provider=google |
Google OAuth |
GET |
/api/auth/sign-in/social?provider=github |
GitHub OAuth |
POST |
/api/auth/sign-out |
Sign out |
GET |
/api/auth/session |
Get current session |
| Function | Description |
|---|---|
getPincodeCoordinate(pincode) |
Converts 6-digit Indian pincode to lat/lon |
getHospotialsNearby(coords, radius) |
Queries Overpass API for hospitals within radius |
formatHospitalData(hospitals, userCoords) |
Calculates distance & formats results |
calculateDistance(lat1, lon1, lat2, lon2) |
Haversine formula for distance |
Read the Contribution Guidelines before contributing to the Project. Follow the below mentioned steps to contribute.
- Fork the repository
- Clone your fork
git clone https://github.com/YASHSHARMAOFFICIALLY/Argoya_Assam.git
- Create a feature branch
git checkout -b feature/amazing-feature
- Make your changes and commit
git commit -m "feat: add amazing feature" - Push to your branch
git push origin feature/amazing-feature
- Open a Pull Request
Click Here to follow the commit conventions while committing code to this Project.
Click Here to read the Code Guidelines before contributing to the codebase.
Click Here to see the features that contributors can work on.
- Add unit tests (Jest + React Testing Library)
- Add E2E tests (Playwright)
- Set up CI/CD pipeline (GitHub Actions)
- Add rate limiting to API routes (Upstash Redis is ready)
- Implement proper error boundaries
- Add Sentry for error monitoring
- Docker containerization
Distributed under the MIT License. See LICENSE for more information.
Project Maintainer: Yash Sharma
- Twitter: @buildwithyash
- LinkedIn: Yash Sharma
- Email: yashsharmaofficially@gmail.com
Project Link: Argoya_Assam
Deployed: argoya-assam
- Next.js — React framework
- Better Auth — Authentication
- Prisma — Database ORM
- shadcn/ui — UI components
- OpenStreetMap — Geolocation data
- Tailwind CSS — Utility-first CSS
- Lucide Icons — Beautiful icons
- Neon — Serverless PostgreSQL
- Recharts — Charting library
- Vercel — Deployment platform
⭐ Star this repo if you found it useful!







