Aethera is a premium, high-fidelity, real-time healthcare clinic management system. It provides patients with an elegant online appointment scheduler, gives physicians a digital vitals and prescription desk, displays a live token waitlist board in waiting rooms, and equips administrative staff with a pixel-perfect, dynamic Rx prescription printing studio.
The application is engineered with a modern, glassmorphic design language featuring deep clinical teals (#0B2C24), premium gold accents (#C8A96B), and fluid typography utilizing Google Fonts (Instrument Serif and Outfit/Inter).
The suite operates on a multi-role pipeline synchronized instantly via Server-Sent Events (SSE) telemetry. When a patient schedules a visit or a physician completes a consultation, waiting-room monitors, front-desks, and booking queues reflect the status change instantly.
graph TD
%% Roles & Ports
P[Patient / Guest] -->|Book Appointment| B[Schedule Scheduler]
B -->|PostgreSQL Record| DB[(aethera DB)]
DB -->|Fetch Roster| DR[Doctor Workspace]
DR -->|Log Vitals & Rx| DB
DR -->|SSE Queue Broadcast| SSE[SSE Telemetry Hub]
SSE -->|Real-time Token Sync| LQ[Live Waitlist Board]
SSE -->|Roster Sync| AD[Admin Reception Dashboard]
AD -->|Auto-populates Rx| PS[Rx Slip Printing Studio]
- Visual Calendar Scheduling: Browse visiting times of medical specialists (General Physicians, Pediatricians, Orthopedics, Gynecologists, and Dermatologists).
- Smart Token System: Appointments are systematically assigned consecutive token numbers for each doctor and date.
- Estimated Wait-Time Engine: Calculates and displays estimated check-in times to minimize crowded lobbies.
- Dynamic Wait Board: Shows currently serving token numbers, total booked counts, and active patient listings.
- Flashing Status Cards: Visually highlights active patient tokens to alert visitors waiting in the lobby.
- Queue Roster Sidebar: Doctors can view their active queues and review histories.
- Case Sheet: Access patient specifics, reason for visit, and booking reference codes.
- Vitals Terminal: Input key telemetry: Blood Pressure (mmHg), Temperature (Β°F), Pulse Rate (bpm), and SpO2 (%).
- Custom Rx Formulator: Interactive row builder to configure medication names, strengths, intake schedules, and lengths.
- Instant Wait-Time Sync: Saving updates transitions the booking status to
Completedand broadcasts SSE telemetry to receptionist screens.
- Clinic Customizer: Update clinic name, address, phone number, and announcements.
- Split-pane Rx Studio:
- Interactive Builder (Left): Real-time editor to update patient age, name, and modify medications.
- Aesthetic Preview (Right): Visualizes the printed layout containing serif-styled clinic letters, patient particulars, vitals, doctor notes, and dynamic signature blocks.
- Native Print Driver: Triggers high-fidelity CSS media query printing.
| Component | Technology | Description |
|---|---|---|
| Frontend Core | React 18, TypeScript, Vite | Ultra-fast SPA scaffolding with HMR. |
| Styling | Tailwind CSS | Sleek custom panels and layouts. |
| Database ORM | Prisma | Schema definitions and migrations. |
| Backend Core | Node.js, Express, TypeScript | RESTful routes with TSX watch engines. |
| Database | PostgreSQL | Relational transactional database. |
| Real-time Sync | Server-Sent Events (SSE) | Unidirectional event telemetry. |
| Validation | Zod | Robust frontend & backend request validation. |
βββ server/ # Node.js Express Backend
β βββ prisma/
β β βββ schema.prisma # Prisma database schemas
β β βββ seed.ts # Database seed script
β βββ src/
β β βββ lib/
β β β βββ prisma.ts # Instantiated Prisma Client
β β β βββ sse.ts # SSE queue broadcast manager
β β βββ middleware/
β β β βββ auth.ts # JWT and Admin privilege checks
β β βββ routes/
β β β βββ auth.ts # Signup / Login / Me endpoints
β β β βββ bookings.ts # Clinical consultations & printing routes
β β β βββ doctors.ts # Specialist directories
β β β βββ queue.ts # SSE event client registrations
β β β βββ settings.ts # Clinic configurations
β β βββ index.ts # App entrypoint
β βββ package.json
β βββ tsconfig.json
β
βββ src/ # React TypeScript Frontend
βββ assets/ # Media files and global CSS
βββ components/
β βββ ui/ # UI controls (cards, banners)
β βββ Navbar.tsx # Unified navigation header
βββ lib/
β βββ api.ts # Axios HTTP client configuration
βββ pages/
β βββ admin/
β β βββ AdminLayout.tsx # Administrative sidebar & security check
β β βββ Bookings.tsx # Prescription Print Modal & appointment roster
β β βββ Dashboard.tsx # Analytics charts and serving tokens
β β βββ Doctors.tsx # Specialist rosters
β β βββ Availability.tsx # Calendar schedules
β β βββ Settings.tsx # Clinic name & announcement controls
β βββ doctor/
β β βββ DoctorLayout.tsx # Physician dashboard frame & security check
β β βββ Dashboard.tsx # Interactive vitals, diagnosis, and Rx writer
β βββ About.tsx # Specialist profiles & WhatsApp CTAs
β βββ Booking.tsx # Multi-step scheduler
β βββ Contact.tsx # Dynamic support page
β βββ Home.tsx # Fullscreen cinematic hero landing
β βββ LiveQueue.tsx # Lobby waiting-room board
β βββ Login.tsx # Split-screen auth form
β βββ Signup.tsx # Patient sign-up page
βββ App.tsx # Page router
βββ main.tsx # SPA entry point
- Node.js: v16.x or newer
- PostgreSQL Database: Running locally or hosted on an external server
- Create a local PostgreSQL database named
aethera. - Navigate to the
serverdirectory:cd server - Create a
.envfile in theserverroot:PORT=5000 DATABASE_URL="postgresql://postgres:yourpassword@127.0.0.1:5432/aethera?schema=public" JWT_SECRET="aethera_super_secret_jwt_token_key_2026"
Navigate to the server folder, install backend packages, push the database schema, and seed the database with initial clinical data:
# Install server packages
npm install
# Push database schema & generate Prisma Client
npx prisma db push
# Seed database with initial clinics, doctors, and active bookings
npm run prisma:seed
# Start Node.js Express server
npm run devThe server will boot and run at http://localhost:5000.
Open a new terminal window in the project root directory:
# Install frontend packages
npm install
# Start Vite React server
npm run devOpen your browser and navigate to http://localhost:5173.
Use these seeded accounts to test the clinic workspace:
| Role | Password | Details | |
|---|---|---|---|
| Super Admin | admin@aethera.com |
adminpassword |
Full receptionist dashboard, active token adjustments, and printed prescription slips. |
| Physician Desk | doctor@aethera.com |
doctorpassword |
Assigned to Dr. Robert Chen (General Physician). Access to vitals records, case notes, and Rx formulator. |
| Patient Profile | patient@aethera.com |
patientpassword |
Renders a personalized profile dashboard where users can check booked appointments. |
All endpoints are prefixed with /api. All protected endpoints require a Bearer token in the Authorization header (Authorization: Bearer <JWT_TOKEN>).
POST /auth/signup: Create a new account.POST /auth/login: Authenticate credentials and get JWT token + role.GET /auth/me(Protected): Retrieve logged-in user profile details.
GET /bookings(Admin only): Fetch all appointment bookings.GET /bookings/my(Protected): Fetch logged-in user's personal bookings.GET /bookings/doctor(Doctor only): Retrieve bookings assigned to the logged-in doctor.POST /bookings(Protected): Schedule a new appointment slot.PUT /bookings/:id/status(Admin only): Manually toggle status (Pending|Completed|Cancelled).PUT /bookings/:id/prescription(Doctor only): Commit clinical vitals, diagnosis notes, and medication JSON checklists to a patient's database record.POST /bookings/:id/cancel(Protected): Allows a patient to cancel their own appointment slot.
GET /queue/sse: Initiates a Server-Sent Events stream connecting clients for real-time wait-list syncs.GET /queue/status: Fetch active serving token indexes and wait totals.
GET /settings: Load system-wide clinic titles, addresses, and banner announcements.PUT /settings(Admin only): Update clinic details.