Next.jsExpressMongoDBBetter AuthZodTypeScript

Paredes Clinic Management System

A custom clinic management system for Paredes Medical Clinic and Laboratory, digitizing patient records, appointments, inventory, payments, and reporting with permission-based access and RA 10173 data-privacy safeguards.

Paredes Clinic Management System

A custom clinic management web application built for Paredes Medical Clinic and Laboratory in Mati City, Davao Oriental. Architected as a pnpm monorepo, it pairs a Next.js 15 (React 19) frontend with an Express + MongoDB API and a shared Zod schema package that keeps validation consistent across the stack. The system covers the clinic's full operational workflow — patients, appointments, inventory, services, payments, daily logs, and reporting — behind permission-based access control, with data-privacy safeguards designed around the Philippine Data Privacy Act (RA 10173).

The clinic relied on paper-based and manual processes for patient records, scheduling, inventory, and billing — slow to search, hard to audit, and difficult to keep compliant with patient-data privacy requirements. Intake also needed to continue during unstable connectivity, and different staff roles required different levels of access to sensitive information. The challenge was to digitize the entire clinic workflow in one secure system without a public sign-up, while protecting patient PII and maintaining a reliable audit trail.

Built as a pnpm monorepo with a Next.js 15 / React 19 frontend and an Express API backed by MongoDB Atlas, sharing a single package of Zod schemas so the frontend and backend validate data the same way. Better Auth provides permission-based RBAC with system roles plus admin-created custom roles, and there is intentionally no public sign-up — admins provision staff accounts. Unfinished patient-intake forms are stored in an encrypted, auto-expiring IndexedDB (Dexie) store so intake can continue offline. Data-privacy safeguards — audit logging, query-string stripping on access logs, and auth-gated PII endpoints — are built in to align with RA 10173.

  • 01 Patient records, profiles, history, and full-text search
  • 02 Staff-managed appointment scheduling with list and day views
  • 03 Inventory of products (adjust-only stock ledger) and services with low-stock alerts
  • 04 Payments with void, CSV export, and printable receipts
  • 05 Daily logs timeline combining automatic events with manual notes
  • 06 Role-aware dashboard and admin analytics (revenue, commission, top items)
  • 07 Permission-based RBAC with admin-created custom roles
  • 08 Offline-first patient-intake drafts in encrypted, auto-expiring local storage
  • 09 Audit trail and data-privacy controls aligned with RA 10173
Next.js 15 React 19 Express.js MongoDB Better Auth Zod TypeScript pnpm Workspaces Dexie Docker

Deployed in production for Paredes Medical Clinic and Laboratory, replacing paper-based recordkeeping with a single secure system for patient records, scheduling, inventory, and billing. Permission-based access, an audit trail, and encrypted offline drafts keep sensitive patient data protected and the clinic's daily operations running even during connectivity gaps.