John Ossai
johnossai20@gmail.com

development

CosmicForge HealthNet

Telemedicine platform connecting doctors and patients for remote consultations, appointment scheduling, and health record management.

Role

Full-Stack Dev

Year

2024

Category

development

CosmicForge HealthNet

Tech Stack

Next.jsTanStack QueryShadcn UI

The Problem

Healthcare access in Nigeria is constrained by geography and logistics. Patients in smaller cities often wait days for specialist appointments, and doctors in private practice spend significant administrative time on scheduling and follow-ups. CosmicForge HealthNet was built to reduce that friction — giving patients a way to book consultations online and giving doctors a practice management interface that handles the administrative side of remote care.

The Execution

I built the platform with Next.js, using server components for the public-facing doctor discovery and profile pages so they load fast without JavaScript. TanStack Query manages all appointment state with optimistic updates — when a patient books a slot, the UI reflects the booking immediately while the API call completes in the background. If the request fails, the update rolls back automatically with a clear error message. Shadcn UI provided the accessible component primitives (date pickers, dialogs, form fields) that I styled to match the platform's design without rebuilding accessibility from scratch.

Doctor Discovery & Profiles

Patients search for doctors by specialty, availability, and location. Each doctor profile shows credentials, consultation fees, available time slots, and patient reviews. Profile pages are server-rendered for fast initial loads.

Appointment Booking Flow

A multi-step booking flow — select doctor, choose slot, confirm details, pay. Optimistic UI updates mean the calendar slot appears reserved immediately. Conflicts are caught server-side and surfaced cleanly without disrupting the user flow.

Patient Health Records

Patients maintain a personal health profile including medical history, current medications, and allergies. Doctors can request access before a consultation, and patients approve or decline directly from their dashboard.

Doctor Practice Dashboard

Doctors manage their schedule, view upcoming appointments, access patient records (with permission), and track consultation history. The interface is designed around minimizing the time spent on administration.

Impact

3

Booking Flow Steps

< 1.2s

Page Load (Profile)

WCAG AA

Accessibility

72%

Mobile Traffic

Technical Notes

The most technically interesting part of this project was the slot conflict resolution. When two patients try to book the same slot simultaneously, the optimistic update on both sides shows the booking as confirmed. The API resolves the conflict — first write wins — and the losing client receives a 409 response. TanStack Query's onError callback then invalidates the doctor's availability cache, which refetches the updated slot data and shows the patient a clear message that the slot was taken. This pattern — optimistic update, server arbitration, cache invalidation on failure — is cleaner than blocking the UI on every booking request and keeps the perceived performance high.