Skip to content

Jeevan Cure

Year
2024
Role
Engineering
Status
Archived

Appointments and paperwork

Jeevan Cure started as a Hack This Fall project. I built an appointment calendar, document uploads and account controls in one healthcare dashboard. It remains an archived prototype.

The application uses Next.js, PostgreSQL and Prisma. Better Auth handles sign-in, password resets, session management and two-factor authentication.

How it works

Appointment records and uploaded document bytes take separate paths.

Appointment action

The server action checks required fields and resolves the session. It takes the user ID from the session, writes through Prisma and revalidates the dashboard.

Select another component to read its notes.
All implementation notes

Appointments and files

Healthcare dashboard
The dashboard combines an appointment calendar, document uploads and account controls. This is an archived prototype.
Appointment action
The server action checks required fields and resolves the session. It takes the user ID from the session, writes through Prisma and revalidates the dashboard.
PostgreSQL
PostgreSQL stores users, appointments and authentication records. Better Auth handles sessions, password resets and two-factor authentication.
File API
A separate file API uses the AWS S3 SDK against R2. Uploaded objects retain their content type.
Cloudflare R2
Cloudflare R2 stores document bytes separately from appointment records. Clinical permissions, retention and integrations were outside the prototype scope.
  • Healthcare dashboard: submits appointment details (Appointment action).
  • Appointment action: creates an appointment for the session’s user (PostgreSQL).
  • Healthcare dashboard: uploads and lists documents (File API).
  • File API: stores and lists objects (Cloudflare R2).

Engineering decisions

  • Take identity from the session. The appointment action checks required fields and uses the authenticated user ID rather than trusting the form. It writes through Prisma and revalidates the dashboard.
  • Keep bytes out of appointment records. A file API uses the S3 SDK against Cloudflare R2, retaining the uploaded object’s content type.
  • Keep the scope honest. The prototype demonstrates appointments, documents and account controls. Clinical permissions, retention policy and healthcare integrations need their own design and verification.

Open the Jeevan Cure site (opens in a new tab) or browse the source (opens in a new tab).