Inspiration

We saw that many ophthalmology clinics still rely on desktop tools, spreadsheets and manual scheduling, resulting in fragmented data, appointment conflicts and limited reporting. We wanted to build a unified, web-based platform that would streamline clinical workflows, centralize patient records and offer seamless online booking via Cal.com.

What it does

EyeConsult SaaS Platform provides:

  • Multi-tenant patient management with secure, branch-aware data isolation.
  • Real-time search across patients, appointments, diagnostics and orders (debounced, accent-insensitive).
  • Role-based access control (admin, doctor, receptionist) backed by JWT and Supabase RLS.
  • Interactive calendar for scheduling, dragging and canceling appointments, synchronized bidirectionally with Cal.com.
  • Clinical workflows: patient registration, medical histories, vital signs (IMC calculation, risk classification), diagnoses (ICD-10 lookup), treatments, lab/auxiliary orders and follow-up appointments.
  • Reporting: date-filtered exports to Excel/PDF and dashboard indicators.

How we built it

  1. Backend: Node.js + Express.js (TypeScript), Prisma ORM for schema and migrations, Zod for request validation, Swagger/OpenAPI for docs.
  2. Database: PostgreSQL on Supabase with SQL migrations and finely tuned RLS policies for multi-branch isolation.
  3. Frontend: Vite + React + TypeScript, styled via Tailwind CSS; custom components for sidebar, navbar, modals and a FullCalendar view.
  4. Scheduling: Integrated Cal.com’s API to fetch and push bookings in real time, ensuring no duplicates or conflicts.
  5. DevOps: Docker Compose to spin up Supabase emulator, API server and React app; prepared Kubernetes manifests for production deployment; ESLint, Prettier and Husky for CI.

Challenges we ran into

  • Designing RLS policies that enforce strict tenant isolation yet allow aggregated reporting across branches.
  • Optimizing real-time search for large datasets while normalizing accents and casing.
  • Achieving reliable, bidirectional sync with Cal.com without race conditions or duplicate events.
  • Balancing depth of clinical features (histories, lab orders, diagnostics) with an intuitive user interface.

Accomplishments that we’re proud of

  • Fully automated end-to-end setup: database migrations, Prisma schema, Supabase client and Docker Compose bring everything up with a single command.
  • High-performance, debounced search that handles thousands of records seamlessly.
  • Robust calendar integration with drag-and-drop and live Cal.com synchronization.
  • Comprehensive role-based security and data isolation via Supabase RLS.

What we learned

  • Best practices for multi-tenant data modeling and RLS in Supabase.
  • Building reusable, accessible React components with Tailwind CSS and TypeScript.
  • Techniques for normalized text search (remove diacritics, lowercase) and debouncing.
  • Strategies to integrate third-party booking APIs in a stateful calendar UI.

What’s next for EyeConsult SaaS Platform

  • Add analytics and predictive insights (e.g., appointment no-show forecasting, treatment outcome tracking).
  • Develop a mobile companion app for clinicians and receptionists.
  • Integrate telemedicine video consultations and secure document uploads.
  • Expand reporting with custom dashboards and automated reminder/email campaigns.
  • Incorporate billing and invoicing modules with Sunat integration for Peruvian clinics.

Built With

  • express.js-tailwind-css-prisma
  • husky
  • kubernetes-manifests-eslint
  • node.js
  • prettier
  • react
  • typescript
  • vite
  • zod-supabase-(postgresql)-jwt-(role-based)-cal.com-swagger-/-openapi-docker-compose
Share this project:

Updates