can you code to make ai app for doctors online consultation ?
continue
continue
file
File ·
| File | Purpose |
|---|---|
package.json | All dependencies (Next.js 14, Prisma, NextAuth v5, OpenAI, Pusher, Zod, Tailwind) |
prisma/schema.prisma | Full DB schema — 10 models |
prisma/seed.ts | 5 demo doctors + 1 patient |
.env.example | All required environment variables |
tailwind.config.js, tsconfig.json, postcss.config.js | Project config |
User → PatientProfile / DoctorProfile → Consultation → Message → Appointment → SymptomCheck → Notification| Route | What it does |
|---|---|
/ | Marketing landing page with stats, features, CTA |
/login | Email + Google OAuth sign in |
/register | Register as Patient or Doctor |
/dashboard | Role-aware — doctor sees queue/patients; patient sees quick actions |
/symptom-checker | AI symptom triage — tags, duration, severity → GPT-4o analysis |
/doctors | Browse/search doctors, filter by specialty, start consultation |
/consultation | List all consultations |
/consultation/[id] | Real-time chat room + AI summary panel |
/appointments | Upcoming/past appointments |
/profile | User profile settings |
| Route | What it does |
|---|---|
POST /api/auth/register | Create patient or doctor account |
GET/POST /api/consultations | List or create consultations |
GET/PATCH /api/consultations/[id] | Fetch chat + update status/diagnosis |
POST /api/messages | Send message + trigger Pusher real-time event |
GET/POST /api/appointments | Manage appointments |
GET /api/doctors | Search verified doctors |
POST /api/ai/symptom-check | GPT-4o triage + save to DB |
POST /api/ai/chat | Streaming AI medical assistant |
POST /api/ai/summarize | Generate SOAP clinical note from transcript |
cd medconsult-ai
cp .env.example .env.local # fill in DB, OpenAI, Pusher keys
npm install
npm run db:push
npm run db:seed
npm run dev
patient@demo.com / password123dr.carter@demo.com / password123send code
medconsult ai.tar
Archive · GZ
tar -xzf medconsult-ai.tar.gz
cd medconsult-ai
cp .env.example .env.local # fill in your keys
npm install
npm run db:push
npm run db:seed
npm run dev
how to. open it on Mac?
.tar.gz file in Finder — it auto-extracts to a folder called medconsult-ai.tar -xzf ~/Downloads/medconsult-ai.tar.gz -C ~/Downloads
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install node
node -v → should show v18+brew install postgresql@15
brew services start postgresql@15
createdb medconsult
cd ~/Downloads/medconsult-ai
code .
Ifcodecommand not found: open VS Code →Cmd+Shift+P→ type "Shell Command: Install 'code' command"
cp .env.example .env.local
.env.local and fill in:DATABASE_URL="postgresql://YOUR_MAC_USERNAME@localhost:5432/medconsult"
NEXTAUTH_SECRET="any-random-string-here"
NEXTAUTH_URL="http://localhost:3000"
OPENAI_API_KEY="sk-..." # from platform.openai.com
PUSHER_APP_ID="" # free account at pusher.com
PUSHER_KEY=""
PUSHER_SECRET=""
PUSHER_CLUSTER="us2"
NEXT_PUBLIC_PUSHER_KEY=""
NEXT_PUBLIC_PUSHER_CLUSTER="us2"
To find your Mac username: runwhoamiin Terminal
npm install
npm run db:generate
npm run db:push
npm run db:seed
npm run dev
| Step | Command |
|---|---|
| Extract | Double-click the file |
| Install Node | brew install node |
| Install Postgres | brew install postgresql@15 |
| Create DB | createdb medconsult |
| Install packages | npm install |
| Setup DB | npm run db:push && npm run db:seed |
| Start app | npm run dev |
patient@demo.com / password123dr.carter@demo.com / password123