Aarogyam Documentation
Everything you need to know about the Aarogyam health platform: APIs, structure, tech stack, and how to contribute.
Project Overview
Aarogyam is a Next.js (TypeScript) health information platform for medicine search, disease insights, and drug pricing in India. It uses a modern component structure (shadcn/ui), Tailwind CSS, and context providers for state management.
Tech Stack
- Next.js (App Router, TypeScript)
- shadcn/ui & Tailwind CSS
- Lucide React Icons
- Context Providers (Language, User Mode)
- Custom API Endpoints (OpenFDA, local DB)
- Modern, accessible UI/UX
API Endpoints
/api/search– Search for medicines or diseases.
Query params:q(string, required),type("medicine" | "disease")/api/search/medicines– Search for medicines using OpenFDA and fallback data.
Query param:q(string, required)/api/search/diseases– Search for diseases from the local database.
Query param:q(string, required)/api/medicine/[id]– Get detailed info for a specific medicine by ID.
How to Use the APIs
- To call an API from the client, use
fetch('/api/route')in your React component or page. - To add a new API, create a new file in
/app/api/following Next.js API route conventions.
Component Structure
- UI components:
/components/ui/ - Context providers:
/contexts/ - API logic:
/lib/api.ts
Contributing
- Fork the repo and create a feature branch.
- Follow the code style and structure of existing components.
- Open a pull request with a clear description of your changes.
- For questions or collaboration, contact vishwanathkoliwad@gmail.com.