NimittHIS is a Thai hospital appointment tracking system with no-show detection, patient timeline history, and role-based operational dashboards.
- Backend foundation is implemented with Express, Prisma, JWT auth, RBAC, patient CRUD, appointment CRUD, timeline CRUD, no-show tracking, analytics, notifications, and cron scheduler.
- Frontend foundation is implemented with React, Vite, TailwindCSS, React Query, Zustand, login flow, route guard, and application shell.
- Backend and frontend TypeScript type-check both pass.
- Frontend: React 18, TypeScript, Vite, TailwindCSS, React Router, Zustand, TanStack Query, React Hook Form, Zod
- Backend: Node.js, Express, TypeScript, Prisma, PostgreSQL, Redis, JWT
- Dev tooling: npm workspaces, Docker Compose, Prisma seed data
npm install --workspacesIf workspace installs are unstable on Windows, install each package separately:
cd backend && npm install
cd ../frontend && npm installYou need:
- PostgreSQL running on
localhost:5432 - Redis running on
localhost:6379
This repository includes docker-compose.yml, but Docker was not available in the current environment used to build the app. If Docker is available on your machine:
docker compose up -d postgres redis- Root
.envis already prepared for local development defaults. - Frontend can use frontend/.env.example if you want to override
VITE_API_URL.
npm run db:generate
npm run db:push
npm run seedIn terminal 1:
npm run dev:backendIn terminal 2:
npm run dev:frontendFrontend runs at http://localhost:5173
Backend runs at http://localhost:3001
nurse01 / nurse123doctor01 / doctor123manager01 / mgr123admin01 / admin123
The project is now being aligned toward:
- Frontend: Vercel
- Database: Supabase Postgres
- Future backend direction: migrate backend responsibilities away from the current long-running Express + Redis architecture into a Vercel + Supabase-friendly setup
At this checkpoint, the frontend is ready to deploy on Vercel, and the repository is ready to continue refactoring toward a Vercel + Supabase-only stack.
- frontend/vercel.json: SPA rewrite config for React Router on Vercel
- frontend/.env.production.example: frontend production env template
From your screenshot, the Vercel import is currently using:
- Root Directory:
./ - Preset:
Other
For this repository, those should be changed to:
- Root Directory:
frontend - Framework Preset:
Vite
This is important because the deployable frontend app lives under frontend/, not the repository root.
The included frontend/vercel.json rewrites all routes to index.html so React Router routes like /patients/:id work on refresh.
Frontend on Vercel should have:
VITE_API_URL
Right now, if you are deploying frontend only, this can temporarily point to a future backend URL. Once we migrate the data/auth layer deeper into Supabase, we may reduce or remove this dependency.
From your screenshot, the Supabase project is live and healthy. The project URL shown there will be used later when we wire:
- Supabase database access
- Supabase auth, if we replace custom JWT auth
- Supabase edge/server-side functions, if we move server work off Express
- Fix the Vercel project import settings to
frontend+Vite - Finish the first Vercel deploy
- Then refactor the app from Express/Redis assumptions toward Supabase-native auth/data flows
- The current backend code is still present in the repo because it contains business logic, schema, and seeded domain behavior we can migrate incrementally.
- Seed data is intended for demo/staging use. Do not run
npm run seedagainst a real production database unless you explicitly want demo records.