Skip to content

thrkingunknown/doomsday

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 

Repository files navigation

🏥 Nabhya (Project Doomsday)

Optimizing Medical Manpower & Resource Management in Nabha

License React Node Python Gemini

Nabhya is a cutting-edge medical management platform designed to address manpower shortages and optimize healthcare delivery in Nabha. By leveraging AI voice agents, predictive analytics, and real-time resource visualization, Nabhya bridges the gap between patients and medical facilities.


🌟 Key Features

🤖 AI Voice Booking Agent

  • Natural Language Interaction: Patients can book appointments simply by speaking to our AI agent.
  • Powered by Gemini 2.5: Utilization of Google's latest Gemini Flash model for ultra-low latency responses.
  • Real-Time Availability: The agent checks live doctor schedules from Supabase and books slots instantly.
  • Websocket Streaming: Seamless real-time audio communication.

📊 Pharmacy Stock Prediction

  • ML-Driven Forecasting: Analyzes historical sales data to predict future medicine demand.
  • Smart Reordering: Automatically suggests order quantities to prevent stockouts and reduce wastage.
  • Visual Analytics: Interactive charts to track trends.

Maps Medical Resource Heatmap

  • Interactive Map: Visualizes key medical locations across Nabha using OpenStreetMap data.
  • Location Search: Integrated Photon and Nominatim APIs for accurate location finding.
  • Resource Allocation: Helps identifying underserved areas.

💻 Comprehensive Dashboards

  • Doctor Dashboard: View daily schedules, patient history, and AI-summarized symptoms.
  • Patient Dashboard: Easy access to booking history and upcoming appointments.
  • Secure Authentication: Robust login system for all user roles.

🏗️ Tech Stack

Category Technologies
Frontend React 19, Vite, Tailwind CSS, Framer Motion, Material UI, Lucide React
Backend (API) Node.js, Express, Supabase Client
AI & Voice Service Python, FastAPI, WebSockets, Google GenAI (Gemini)
Data Science Pandas, NumPy (Stock Prediction)
Database Supabase (PostgreSQL)
Mapping OpenLayers, Photon API, Nominatim

🚀 Getting Started

Follow these instructions to set up the project locally.

Prerequisites

  • Node.js (v18 or higher)
  • Python (v3.9 or higher)
  • Supabase Account (for database)
  • Google Cloud Project (for Gemini API)

1. Clone the Repository

git clone https://github.com/thrkingunknown/doomsday.git
cd doomsday

2. Setup Backend (Node.js)

cd backend
npm install
  • Create a .env file in the backend/ directory (see .env.example):
    PORT=5000
    FRONTEND_URL=http://localhost:5174
    SUPABASE_URL=your_supabase_url
    SUPABASE_KEY=your_supabase_key
    GEMINI_API_KEY=your_gemini_key

3. Setup Voice Agent (Python)

cd backend/call
# Create virtual environment (optional but recommended)
python -m venv venv
# Windows: venv\Scripts\activate
# Mac/Linux: source venv/bin/activate

pip install -r requirements.txt
  • Ensure the same .env values are accessible or configured for the Python service.

4. Setup Frontend (React)

cd frontend
npm install
  • Create a .env file in the frontend/ directory (see .env.example):
    VITE_BACKEND_URL=http://localhost:5000
    VITE_WEBSOCKET_URL=ws://localhost:8000/ws
    VITE_PHOTON_API_URL=https://photon.komoot.io/api/
    VITE_NOMINATIM_API_URL=https://nominatim.openstreetmap.org/search
    VITE_MAIN_SITE_URL=http://localhost:5174

🏃 Running the Application

You need to run three terminals simultaneously:

Terminal 1: Node.js Backend

cd backend
npm start

Terminal 2: Python Voice Agent

cd backend/call
uvicorn server:app --host 0.0.0.0 --port 8000 --reload

Terminal 3: Frontend

cd frontend
npm run dev

Visit http://localhost:5174 (or the port shown in your terminal) to view the app.


📂 Project Structure

doomsday/
├── backend/                  # Server-side logic
│   ├── call/                 # Python Voice Agent (FastAPI + Gemini)
│   ├── models/               # Database Models
│   ├── Order pred/           # ML Stock Prediction Scripts
│   ├── server.js             # Main Express API
│   └── db_schema.sql         # Database Setup Script
├── frontend/                 # Client-side Application
│   ├── public/               # Static assets & Audio Worklets
│   └── src/
│       ├── components/       # React Components (Maps, Dashboards, etc.)
│       ├── utils/            # Helper functions
│       └── App.jsx           # Main App Entry
└── README.md                 # Project Documentation

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the project
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📜 License

This project is licensed under the MIT License - see the LICENSE file for details.


Made with ❤️ for Nabha

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Contributors