An Electronic Health Record (EHR) web application built with Next.js.
Purpose: a focused interface for managing patients, appointments, visits, orders, and vitals used as a reference implementation and internal tool.
Status: active development on the dev branch. See the migrations/ folder for database schema history.
- Appointment scheduling and calendar views
- Patient management and quick search
- Visit records and vitals tracking
- Orders and labs workflow scaffolding
- Authentication and role-aware UI
- Frontend: Next.js + React + TypeScript
- Styling: global CSS & PostCSS (project uses component-driven UI)
- Backend / ORM: Prisma with PostgreSQL
- Auth: NextAuth
- Tooling: Node.js, npm, ESLint, PostCSS
Prerequisites:
- Node.js 18+ installed
- PostgreSQL (local or remote) for development
Typical setup:
# 1. Install dependencies
npm install
# 2. Set up environment variables
cp .env.example .env
# 3. Run database migrations and seed (if applicable)
npx prisma migrate dev --name init
npx prisma db seed
# 4. Start the dev server
npm run dev
# Open http://localhost:3000Notes:
- Generated Prisma client is in
src/generated/prisma(do not commit local engine files). - If you use a different package manager, replace
npmwithyarnorpnpm.
npm run dev— run the Next.js development servernpm run build— build the production appnpm run start— run the production buildnpx prisma generate— regenerate Prisma clientnpx prisma migrate dev— create/apply migrations
At minimum, set:
DATABASE_URL— Postgres connection stringNEXTAUTH_SECRET— secret for NextAuthNEXTAUTH_URL— (optional) canonical app URL for auth callbacks
There may be additional provider-specific variables required for OAuth providers configured in [...nextauth]/route.ts.
Schema and migrations are located in the prisma/ directory. Typical workflow:
npx prisma migrate dev --name descriptive_change_name
npx prisma generate
npx prisma db seedInspect the current schema in prisma/schema.prisma and the migration SQL files in prisma/migrations/.
- ESLint is configured in
eslint.config.mjs. Runnpm run lintif available. - Add tests and CI configuration as needed.
This app is ready to deploy to Vercel, Render, or any platform that supports Next.js + Node. Ensure the production database DATABASE_URL and NEXTAUTH_SECRET are set in the environment.
Recommended Vercel settings:
- Build command:
npm run build - Output directory: (Next.js default)
- Open an issue for bugs or feature requests.
- Create a branch named
feat/your-featureorfix/your-fixand submit a pull request againstdevormaindepending on workflow.
Please run linters and formatters before opening PRs.
- If Prisma complains about migration history, check
prisma/migrationsand ensure theDATABASE_URLpoints to the expected database. - For auth issues, verify
NEXTAUTH_URLand provider credentials.
Maintained by the repository owner. For questions or access, open an issue or contact the maintainer via the repository.
See the LICENSE file if present. If no license is included this repository is not publicly licensed — contact the maintainer for terms.