How catbouncexd/uas_frontend works
This is an E-Health/orthopaedic-center web application. The visible user workflow is public browsing, account registration or sign-in, then access to a protected dashboard and patient/resource areas. The repository also has surgery and visit-request routes, though their sampled pages are empty. Authentication is implemented with Better Auth and a Drizzle-backed database. Source evidence is strongest for authentication, the dashboard, patient data access, and resource cards; unsampled route behavior is not inferred.
Main entry points: index.ts Database client · ui Shared UI primitives · (auth) Login and signup · auth.ts Auth service
Components 21
Web experience
- Public pages
src/app/(public)/page.tsx - Protected layout
src/app/(protected)/layout.tsx - Public layout
src/app/(public)/layout.tsx - Navigation and footer
src/shared/components - Shared UI primitives
src/shared/components/ui
Identity
- Login and signup
src/app/(auth) - Auth client
src/lib/auth-client.ts - Auth API route
src/app/api/auth/[...all]/route.ts - Auth service
src/lib/auth.ts
Clinical areas
- Dashboard
src/app/(protected)/dashboard/page.tsx - Doctor card
src/features/doctors/components/DoctorCard.tsx - Patient data page
src/app/(protected)/pasien/page.tsx - Patient route
src/app/(protected)/patient/page.tsx - Resource page
src/app/(protected)/resource/page.tsx - Resource cards
src/features/resources/components - Surgery route
src/app/(protected)/surgery/page.tsx - Visit-request route
src/app/(protected)/visit-request/page.tsx
Data layer
- Database client
src/db/index.ts - Database schemas
src/db - Postgres database
Other components
- Visitor / patient
Connections 18
- Visitor / patient → Public pages: browses
src/app/(public)/page.tsx - Visitor / patient → Login and signup: registers or signs in
src/app/(auth)/register/page.tsx - Login and signup → Auth client: submits credentials
src/app/(auth)/register/page.tsx - Auth API route → Auth service: dispatches auth
src/app/api/auth/[...all]/route.ts - Auth service → Database client: uses adapter
src/lib/auth.ts - Database client → Database schemas: configures schema
src/db/index.ts - Database client → Postgres database: connects
src/db/index.ts - Protected layout → Auth service: checks session
src/app/(protected)/layout.tsx - Dashboard → Doctor card: renders
src/app/(protected)/dashboard/page.tsx - Patient data page → Database client: queries data
src/app/(protected)/pasien/page.tsx - Patient data page → Database schemas: uses schema
src/app/(protected)/pasien/page.tsx - Resource page → Resource cards: renders
src/app/(protected)/resource/page.tsx - Public layout → Navigation and footer: renders
src/app/(public)/layout.tsx - Protected layout → Navigation and footer: renders
src/app/(protected)/layout.tsx - Login and signup → Shared UI primitives: uses controls
src/app/(auth)/login/page.tsx - Public pages → Shared UI primitives: uses controls
src/app/(public)/page.tsx - Doctor card → Shared UI primitives: uses primitives
src/features/doctors/components/DoctorCard.tsx - Resource cards → Shared UI primitives: uses cards
src/features/resources/components/ArticleCard.tsx