TheraLink
Speech therapy appointment marketplace for Malaysia
72
API Endpoints
18
DB Models
Yes
Built Solo
The Problem
Patients in Malaysia had no efficient way to find and book licensed Speech-Language Pathologists (SLPs). The process involved word-of-mouth referrals, phone calls, and manual scheduling. Therapists, on the other hand, lacked digital tools to manage their practice, availability, and client relationships.
The Solution
I solo-built TheraLink — a full-stack appointment marketplace connecting patients with speech therapists. The platform handles the entire journey from therapist discovery to session completion.
What I Built
As the sole developer on a client contract, I owned every layer of the system:
- Appointment Marketplace — Browse therapists by specialty, location, language, and availability. Book center visits, home visits, or virtual sessions.
- Token-Based Credit System — Patients purchase token packages (with bulk discounts) to book sessions. Automatic refund calculations based on cancellation timing.
- Calendly-Inspired Availability — Therapists set weekly recurring schedules with one-time overrides. Buffer time, minimum notice, and booking window rules.
- Guardian-Dependent System — Parents manage appointments for multiple children with shared credit balance but separate medical histories.
- Virtual Sessions — Google Meet links auto-generated for virtual appointments.
- Payment Integration — Billplz (Malaysian payment gateway) with webhook verification.
- Medical Records — AES-256-GCM encrypted patient medical history.
- Admin Panel — Therapist approval workflow, transaction auditing, content management.
Technical Architecture
Built on a strict 4-layer architecture: Presentation → API → Service → Repository.
- 72 RESTful API endpoints organized by resource
- 18 database models with Prisma + PostgreSQL
- 211 TypeScript files with full type safety
- Zod validation on all API inputs
- Snapshot system — Immutable copies of therapist data captured at booking time
- Transaction audit trail — Every credit change tracked with before/after balances
Stack
- Frontend: Next.js 15 (App Router), TypeScript, Tailwind CSS, shadcn/ui
- Backend: Next.js API routes, Prisma ORM
- Database: PostgreSQL
- Runtime: Bun
- Integrations: Billplz (payments), Google Meet (virtual sessions), Resend (email), Cloudinary (file storage)
- Security: NextAuth 5.0, AES-256-GCM encryption
The Impact
- 72 API endpoints powering the full marketplace
- 18 database models with enterprise-grade schema design
- 7 languages supported for multilingual matching
- Production-ready at 92/100 health score
- Live at theralink.my
Lessons Learned
Building TheraLink solo taught me the value of strict architectural discipline. The 4-layer separation (presentation → API → service → repository) kept the codebase maintainable even as it grew to 211 files. The snapshot system for appointment data was a non-obvious but critical decision — without it, therapist profile changes would silently corrupt historical appointment data.