Skip to content

Gourab2005/FiltAI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ₯ FiltAI – AI-powered Medical API SaaS Platform

Screenshot 2025-04-20 114233

πŸ“‘ Table of Contents


πŸ“ Description

FiltAI is a SaaS platform offering AI-powered APIs to enhance medical service delivery and doctor-patient matchmaking. Admins can:

  • Add hospitals and register doctors
  • Generate secure API keys
  • Use APIs to fetch predictions, recommend doctors, and suggest remedies
  • Track API usage, performance, and subscriptions

🚨 Problem Statement

The healthcare system lacks real-time, symptom-based solutions for patients and hospitals. Finding the right doctor or diagnosis often involves delays and manual effort, which could be optimized with AI-powered APIs.


πŸ’‘ Solution

FitAI offers:

  • A fast, secure backend for managing hospitals and doctors
  • AI-powered API for disease prediction and doctor matching
  • Multi-language support for symptoms
  • API key system for integration into any frontend or mobile platform
  • Subscription handling and analytics for admins

🧭 User Workflow

Here's how an admin can use the FitAI platform step-by-step:

  1. πŸ” Login to the Platform

    • Navigate to the FitAI dashboard.
    • Log in using your admin credentials.
  2. πŸ”‘ Generate API Key

    • Go to the API Settings section.
    • Click Generate API Key – this is required before any API calls or subscriptions.
  3. πŸ₯ Add Hospitals

    • Go to the Hospitals section.
    • Add a new hospital by providing name, location, head doctor, and contact.
  4. πŸ‘¨β€βš•οΈ Add Doctors under Hospitals

    • Select a hospital.
    • Add doctors by providing specialization, availability, contact info, etc.
  5. πŸ“‘ Use API Endpoint

    • Now that hospitals and doctors are added, use the AI API:
      GET /api/service/AgentResponse?hospitalId=<HOSPITAL_ID>
      
    • Pass the API key in the header:
      x-api-key: <YOUR_API_KEY>
      
  6. πŸ—οΈ Integrate Into Frontend

    • You can now plug this API into any hospital’s website or frontend.
    • Patients enter symptoms β†’ AI suggests doctor + remedy.
  7. πŸ’³ Subscribe to Premium

    • Head over to the Subscription section on the dashboard.
    • You must generate an API key before subscribing.
    • Choose a plan and complete payment via Cashfree.
  8. πŸ“Š Monitor Usage

    • View how many API calls have been made.
    • Track remaining calls, renew subscriptions, and upgrade plans.

🧠 The AI works hospital-wise, so each hospital's doctors are matched separately.

Screenshot 2025-04-20 114311 Screenshot 2025-04-20 114413 Screenshot 2025-04-19 183750


βš™οΈ Technical Setup

πŸ§ͺ Backend Setup

# Go to the backend folder
cd backend

# Install backend dependencies
npm install

πŸ“ .env File Configuration

Create a .env file in the backend root directory and paste the following:

PORT=3000
WT_SECRET=your_jwt_secret
CASHFREE_APP_ID=your_cashfree_app_id
CASHFREE_SECRET_KEY=your_cashfree_secret_key
GEMINI_API_KEY=your_gemini_api_key
GEMINI_ENDPOINT=your_gemini_endpoint_url

πŸš€ Start the Backend Server

npm run start

🌐 Ngrok for Webhook Testing

Use ngrok to expose your local server for webhook testing.

ngrok http 3000

Set the webhook URL in your Cashfree dashboard like this:

https://your-ngrok-url/api/cashfree/webhook

Example:

https://abcd1234.ngrok.io/api/cashfree/webhook

🧱 Tech Stack

Layer Technology
Frontend React (Vite), Tailwind CSS
Backend Node.js, Express.js
Database MongoDB
Authentication JWT
Payments Cashfree Gateway
AI Engine Gemini AI API
Tools Postman, Ngrok

πŸ“‘ API Overview

πŸ” All secure routes require a JWT token in the header:

Authorization: <JWT_TOKEN>

πŸ”‘ For diagnosis API calls, use:

x-api-key: <YOUR_API_KEY>

✨ Endpoints Summary

Method Endpoint Description
POST /api/user/signup Register new admin
POST /api/user/login Login admin and get JWT
GET /api/user/profile View admin profile
POST /api/user/addHospital Add a hospital
POST /api/user/adddoctor Add a doctor to a hospital
POST /api/service/generate-api Generate API key
POST /api/service/subscribe Cashfree subscription
GET /api/service/AgentResponse?hospitalId= AI-powered diagnosis + doctor match

🧠 Diagnosis API Example

GET /api/service/AgentResponse?hospitalId=68026da649ad1088d5a30603

Headers:
x-api-key: d8c4fbbd51cc66878c127e0687ced573252b49317f9e7dbc2d60f63bf1cfce4f

Sample Response:

{
  "message": "API call successful",
  "success": true,
  "data": {
    "predicted_disease": "Migraine",
    "remedy": "Rest in a dark, quiet room.",
    "doctor": {
      "id": "680280e0863bec04d582b0f2",
      "name": "Dr. Gourab Das",
      "speciality": "ophthalmologist"
    }
  }
}

πŸ“¦ Use Cases

  • βœ… Symptom-based diagnosis & doctor suggestion
  • πŸ” Smart filtering in search systems
  • πŸ“Š Hospital-specific usage analytics
  • πŸ“ˆ Business insights based on API usage
  • πŸ’Ό Integrate in existing hospital management software
  • πŸ“² web application support
  • πŸ” Multi-department queries like Cardiology, Pediatrics, etc.
  • Example integartion : Screenshot 2025-04-20 115825

πŸš€ Future Improvements

  • πŸ“Š Advanced dashboards for hospital owners
  • πŸ“ Location-aware doctor recommendation
  • πŸ“ˆ Growth analytics and trends visualization
  • πŸ“ Custome AI Model support with picture based anyalisis
  • πŸ”” API usage alerts & subscription notifications
  • πŸ”„ Integration with EMRs and patient history
  • πŸ’¬ AI chatbot for first-level support

πŸ‘¨β€βš•οΈ Contributors

  • Gourab Das
  • Sagnik Sarkar
  • Dipayan Sinha

Built with ❀️ to bridge the gap between AI and Healthcare.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors