Swasth AI is a modern, responsive web application designed to empower rural health workers with AI-driven diagnostic assistance and patient management tools. Built with Next.js and powered by Google's Gemini model through Genkit, this app provides a comprehensive suite of features to aid in preliminary diagnosis, patient tracking, and health education.
- 📊 Interactive Dashboard: Get a quick overview of daily activities, including patients seen, high-risk alerts, and recent activities.
- 👥 Patient Management System:
- Register New Patients: A comprehensive form to capture patient details, symptoms, and consent.
- Persistent Storage: Patient data is saved to the browser's local storage, ensuring no data is lost on reload.
- Patient List & Details: View all registered patients with their risk levels, and click to see a detailed profile for each one.
- 🤖 AI-Powered Diagnostic Suite:
- Symptom Analysis: Get AI-suggested diagnoses based on reported symptoms.
- Multi-Lingual Triage: Generate triage responses in English, Hindi, or Assamese to communicate effectively with patients.
- Personalized Recommendations: On the patient detail page, generate personalized health advice, complete with links to reputable medical sources (e.g., WHO, CDC).
- 💬 AI Assistant Chatbot:
- Conversational Interface: Ask complex medical questions about symptoms, treatments, or health topics.
- Rich Content Responses: The chatbot delivers well-formatted Markdown responses, including tables, lists, images, and embedded YouTube videos for comprehensive explanations.
- 💡 Health Education Tips: Instantly generate AI-powered health tips on crucial topics like Nutrition, Hygiene, and Maternal Care.
- 📱 Fully Responsive Design: A mobile-first interface that works beautifully on desktops, tablets, and smartphones, making it perfect for use in the field.
This project is built with a modern, production-ready tech stack, prioritizing performance, developer experience, and scalability.
| Category | Tools |
|---|---|
| Core Framework | Next.js (with App Router) |
| Language | TypeScript (90%) · Python (8%) · CSS (2%) |
| AI Integration | Google Gemini, Genkit |
| UI Library | React |
| Styling | Tailwind CSS, ShadCN UI, Lucide React |
| State Management | Zustand |
| Forms & Validation | React Hook Form, Zod |
To get a local copy up and running, follow these simple steps.
- Node.js (v18 or newer recommended)
- npm or yarn
-
Clone the repository:
git clone https://github.com/your-username/your-repo-name.git cd your-repo-name -
Install NPM packages:
npm install
-
Set up Environment Variables:
- Create a new file named
.envin the root of your project. - Add your Google Gemini API key to this file.
GOOGLE_API_KEY=YOUR_API_KEY_HERE
- You can get a free API key from Google AI Studio.
- Create a new file named
-
Run the development server:
npm run dev
Open http://localhost:9002 with your browser to see the result.
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.
