An intelligent AI Doctor Assistant built with Next.js (TypeScript), TailwindCSS, and NEON PostgreSQL, designed to provide voice-powered medical consultations.
Users can describe their symptoms, get AI-recommended doctors, and engage in real-time voice conversations with the assistant. After each consultation, the system automatically generates a medical report summarizing the patient's details, diagnosis, medicines, advice, and conversation history.
- 🤖 AI Doctor Recommendation — Uses LLM to find suitable doctors based on symptoms or health issues.
- 🎤 Voice Conversation — Interactive voice-based chat between user and AI.
- 🧾 Auto Medical Report Generation — Automatically creates detailed medical reports after each consultation.
- 🔐 User Authentication — Secure login/signup powered by Clerk.
- 🗄️ Database Integration — Uses NEON PostgreSQL for scalable cloud storage.
- 🌐 SaaS Ready — Built with modular architecture for growth and easy deployment.
| Category | Technology |
|---|---|
| Framework | Next.js 15 (App Router) |
| Language | TypeScript |
| Styling | TailwindCSS |
| Database | NEON PostgreSQL |
| ORM / Query Builder | Drizzle ORM |
| Authentication | Clerk |
| AI & Voice Engine | OpenRouter LLM + VAPI Voice Assistant |
| Package Manager | npm / yarn |
Create a .env file in the root directory and add the following:
# Database Connection
DATABASE_URL=
# Clerk Authentication
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=
CLERK_SECRET_KEY=
# Clerk Routes
NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in
NEXT_PUBLIC_CLERK_SIGN_IN_FALLBACK_REDIRECT_URL=/
NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up
NEXT_PUBLIC_CLERK_SIGN_UP_FALLBACK_REDIRECT_URL=/
# AI & Voice Assistant
OPEN_ROUTER_API_KEY=
NEXT_PUBLIC_VAPI_VOICE_ASSISTANT_ID=
NEXT_PUBLIC_VAPI_API_KEY=git clone https://github.com/sazzadadib/AI-Doctor-Agent.git
cd AI-Doctor-Agentnpm install
# or
yarn installAdd your .env file based on the keys above.
npx drizzle-kit pushnpm run devVisit http://localhost:3000 🌐
-
Symptom Input: The user describes symptoms using text or voice.
-
AI Doctor Suggestion: LLM analyzes the symptoms and suggests a matching doctor.
-
Voice Consultation: The user speaks with the AI in real-time using the voice engine.
-
Medical Report Generation: After the session, a full report is created including:
- Patient details
- Symptoms summary
- Medicines
- Doctor’s advice
- Full conversation transcript
ai-doctor-assistant/
│
├── app/
│ ├── _components/ # Homepage UI sections
│ │ ├── CTASection.tsx
│ │ ├── FeatureBentoGrid.tsx
│ │ ├── FeaturesSection.tsx
│ │ ├── Footer.tsx
│ │ ├── HeroSection.tsx
│ │ ├── HowItWorksSection.tsx
│ │ ├── Navbar.tsx
│ │ └── TestimonialsSection.tsx
│ │
│ ├── (auth)/ # Authentication pages using Clerk
│ │ ├── sign-in/[[...sign-in]]/
│ │ └── sign-up/[[...sign-up]]/
│ │
│ ├── (routes)/ # Main website routes
│ │ ├── contact/
│ │ ├── dashboard/
│ │ │ ├── _components/ # Dashboard widgets and dialogs
│ │ │ ├── history/
│ │ │ ├── medical-agent/[sessionId]/
│ │ │ ├── layout.tsx
│ │ │ └── page.tsx
│ │ ├── doctors/
│ │ ├── health-tips/
│ │ └── pricing/
│ │
│ ├── api/ # API routes (Next.js route handlers)
│ │ ├── medical-report/
│ │ ├── session-chat/
│ │ ├── suggest-doctors/
│ │ └── users/
│ │
│ ├── globals.css # Global TailwindCSS styles
│ ├── layout.tsx # Root layout
│ ├── page.tsx # Landing page
│ └── provider.tsx # App-wide providers
│
├── components/
│ ├── ui/ # Reusable UI components
│ │ ├── bento-grid.tsx
│ │ ├── button.tsx
│ │ ├── dialog.tsx
│ │ ├── sonner.tsx
│ │ ├── table.tsx
│ │ └── textarea.tsx
│ └── hero-section-demo-1.tsx
│
├── config/
│ ├── db.tsx # Database configuration (NEON + Drizzle)
│ ├── OpenAIModel.tsx # OpenRouter LLM model config
│ └── schema.tsx # Database schema definitions
│
├── context/
│ └── UserDetailContext.tsx # Global user context management
│
├── lib/
│ └── utils.ts # Utility functions
│
├── shared/
│ └── list.tsx # Shared constants or data lists
│
├── public/ # Static assets (images, icons, logos)
│
├── drizzle.config.ts # Drizzle ORM configuration
├── middleware.ts # Middleware for Clerk auth or routes
├── next.config.ts # Next.js configuration
├── postcss.config.mjs # PostCSS / Tailwind setup
├── components.json # shadcn/ui config
├── package.json
├── package-lock.json
├── tsconfig.json
└── README.md
- 🌍 Multi-language AI support
- 📊 Doctor dashboard with patient analytics
- 📱 Mobile-friendly and PWA version
📧 Contact: sazzadhossainadib@gmail.com
If you like this project, give it a ⭐ on GitHub to show your support!
Licensed under the MIT License — free for personal and commercial use.
🧠 “Empowering healthcare through AI-driven voice intelligence.”