A focused medical chatbot designed to answer only health-related questions, providing relevant and meaningful interactions.
Click the preview below to watch the demo. Use Ctrl + Click or open in a new tab if needed.
- Medical-only chat experience with deterministic domain and safety guardrails.
- Friendly non-medical fallback responses with suggested medical follow-ups.
- Persistent conversations with local SQLite storage through Prisma.
- Groq-powered medical educational answers with server-side API boundaries.
- Chat sidebar with search, saved conversations, and auto-generated titles.
- Input validation, normalization, and basic rate limiting.
- First-party email/password registration and login with signed HTTP-only session cookies.
- Next.js
- TypeScript
- Tailwind CSS + DaisyUI
- Prisma + SQLite
- Groq API
- Install dependencies with
pnpm install. - Copy
.env.exampleto.env. - Set
GROQ_API_KEYand optionallyGROQ_MODEL. - Generate Prisma client with
pnpm prisma:generate. - Run the local SQLite migration with
pnpm prisma:migrate. - Start the app with
pnpm dev. - Open
http://localhost:3000. - Start chatting in the local workspace.
- Run unit, component, and integration tests with
pnpm test. - Run lint checks with
pnpm lint. - Run a production build check with
pnpm build. - Use
pnpm test && pnpm lint && pnpm buildas the final local QA gate.
- Keep Groq credentials server-side only. Do not expose
GROQ_API_KEYto the client. - This project uses SQLite for local development. For production, use durable storage and ensure Prisma migrations are applied before serving traffic.
- The current rate limiter is in-memory and process-local, which is fine for local and simple single-instance deployments but should be replaced with shared storage for multi-instance production use.
- Health, safety, and medical-domain guardrails are enforced in app code before the Groq call. Preserve that order when extending the system.
pnpm devpnpm buildpnpm startpnpm lintpnpm typecheckpnpm formatpnpm testpnpm test:allpnpm prisma:generatepnpm prisma:migrate
Required variables are documented in .env.example.