Skip to content

PREETH26/HealthCheck

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

HealthCheck AI

A full-stack health symptom checking application powered by AI. HealthCheck provides users with intelligent analysis of their symptoms, including possible causes, severity assessment, suggested remedies, and doctor visit recommendations.

Features

  • AI-Powered Symptom Analysis: Uses Groq's LLM API to analyze symptoms and provide structured medical insights
  • Comprehensive Results: Returns possible causes, severity levels (mild/moderate/severe), suggested remedies, and doctor visit recommendations
  • User Authentication: Secure sign-in powered by Clerk authentication
  • Dark/Light Theme Support: Toggle between dark and light modes for comfortable usage
  • Responsive Design: Modern UI built with React, optimized for various screen sizes
  • Safety First: Explicitly disclaims that it's not a replacement for professional medical advice
  • Real-time Processing: Fast symptom analysis with loading feedback

Tech Stack

Backend

  • Framework: Express.js
  • AI Engine: Groq SDK (using GPT-OSS-120B model)
  • Runtime: Node.js
  • Additional Libraries: CORS, dotenv, mongoose (installed but not actively used), GraphQL & Apollo Server (prepared for future use)

Frontend

  • Framework: React 19
  • Build Tool: Vite
  • Routing: React Router DOM
  • Authentication: Clerk
  • Styling: Custom CSS with inline styles
  • API Client: Apollo Client & GraphQL (prepared for future use)
  • Additional Libraries: ESLint for code quality

Project Structure

HealthCheck/
├── backend/
│   ├── server.js           # Express server with /api/check endpoint
│   ├── package.json        # Backend dependencies
│   ├── graphql/            # GraphQL setup (for future use)
│   ├── models/             # Database models (for future use)
│   └── services/           # Service layer (for future use)
├── Frontend/
│   ├── src/
│   │   ├── pages/
│   │   │   ├── Loading.jsx    # Splash screen
│   │   │   ├── Auth.jsx       # Clerk authentication page
│   │   │   └── Chat.jsx       # Main symptom checker interface
│   │   ├── components/        # Reusable components
│   │   ├── apollo/            # Apollo client setup
│   │   └── App.jsx            # Main app with routing
│   ├── vite.config.js
│   └── package.json
└── README.md

Getting Started

Prerequisites

  • Node.js (v16 or higher)
  • Groq API Key
  • Clerk API Keys

Backend Setup

  1. Navigate to the backend directory:
cd backend
  1. Install dependencies:
npm install
  1. Create a .env file in the backend directory:
GROQ_API_KEY=your_groq_api_key_here
  1. Start the server:
npm start

The backend will run on http://localhost:5175

Frontend Setup

  1. Navigate to the frontend directory:
cd Frontend
  1. Install dependencies:
npm install
  1. Create a .env file in the Frontend directory:
VITE_API_BASE_URL=http://localhost:5175
VITE_CLERK_PUBLISHABLE_KEY=your_clerk_publishable_key
  1. Start the development server:
npm run dev

The frontend will run on http://localhost:5173

API Endpoints

POST /api/check

Analyzes user symptoms and returns health insights.

Request Body:

{
  "symptoms": "Your symptom description here"
}

Response:

{
  "possible_causes": ["cause1", "cause2", "cause3"],
  "severity_level": "mild|moderate|severe",
  "suggested_remedies": ["remedy1", "remedy2", "remedy3"],
  "doctor_visit_recommendation": "yes|no"
}

GET /healthz

Health check endpoint.

Response:

{
  "status": "ok"
}

Usage

  1. Open the application in your browser
  2. Sign in with your credentials using Clerk authentication
  3. Describe your symptoms in detail on the Chat page
  4. Click "Check Health" to analyze symptoms
  5. View the results including severity level, possible causes, and suggested remedies
  6. Toggle between dark and light themes using the theme button in the header

Important Disclaimer

⚠️ HealthCheck is NOT a replacement for professional medical advice. Always consult with a qualified healthcare professional for:

  • Persistent or severe symptoms
  • Symptoms that worsen over time
  • Emergency medical situations

This tool is designed to provide general health information and guidance only.

Development

Running both servers concurrently

You can use npm scripts or tools like concurrently to run both frontend and backend:

Terminal 1 (Backend):

cd backend && npm start

Terminal 2 (Frontend):

cd Frontend && npm run dev

Build for Production

Backend: No build step required, use server.js directly.

Frontend:

npm run build

The built files will be in the dist/ directory.

Future Enhancements

  • GraphQL API integration (infrastructure is already in place)
  • MongoDB database integration for storing user records (mongoose is installed)
  • Medical records storage and management
  • Additional AI capabilities and specialized symptom analysis
  • Multi-language support

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors