How bigpumpum001/toothtoday works
ToothToday is a dental appointment platform: patients browse services, register or sign in, book and manage appointments, and check daily queues; clinic staff manage appointments, doctors, and services. The repository pairs a Next.js interface with a Go API, PostgreSQL persistence, scheduled appointment jobs, and LINE notifications. The README documents these capabilities, but most backend implementations were not excerpted, so internal backend links are dashed where their exact calls could not be verified.
Main entry points: main.go ToothToday API · postgres.go PostgreSQL · appointment_handler.go Appointment handlers · appointment_job.go Appointment jobs
Components 25
Patient Web
- Home and discovery
frontend/src/app/page.tsx - Service listings
frontend/src/components/features/services/Allservices.tsx - Booking form
frontend/src/components/features/booking/BookingForm.tsx - Daily queue view
frontend/src/components/features/queue/DoctorSchedule.tsx - Account and profile
frontend/src/components/features/profile/Profile.tsx - Admin dashboard
frontend/src/app/dashboard/page.tsx
API Workflows
- Authentication handlers
backend/internal/handlers/auth_handler.go - Appointment handlers
backend/internal/handlers/appointment_handler.go - Booking and slot logic
backend/internal/services/appointment/appointment_slot.go - Account services
backend/internal/services/user_service.go - Service management
backend/internal/services/service_service.go - Doctor management
backend/internal/services/doctor_service.go - ToothToday API
backend/cmd/api/main.go
Persistence
- PostgreSQL
backend/internal/db/postgres.go - Appointment repository
backend/internal/repository/appointment_repository.go - User repository
backend/internal/repository/user_repository.go - Service repository
backend/internal/repository/service_repository.go - Doctor repository
backend/internal/repository/doctor_repository.go
Clinic Operations
- Appointment jobs
backend/internal/services/appointment_job.go - Job scheduler
backend/internal/jobs/scheduler.go - LINE notifications
backend/internal/services/line_service.go - LINE client
backend/internal/clients/line_service.go - Image storage client
backend/internal/clients/gcs_client.go
Other components
- Patient
- Clinic staff
Connections 29
- Patient → Home and discovery: browses
README.md - Patient → Service listings: views services
README.md - Patient → Booking form: books appointment
README.md - Patient → Daily queue view: checks queue
README.md - Patient → Account and profile: manages profile
README.md - Clinic staff → Admin dashboard: manages clinic
README.md - Home and discovery → Service listings: links to
frontend/src/app/page.tsx - Service listings → ToothToday API: requests listings
frontend/src/components/features/services/Allservices.tsx - Booking form → ToothToday API: submits booking
- Daily queue view → ToothToday API: loads queue
- Account and profile → ToothToday API: uses account endpoints
- Admin dashboard → ToothToday API: manages records
- ToothToday API → Authentication handlers: routes requests
- ToothToday API → Appointment handlers: routes requests
- Appointment handlers → Booking and slot logic: delegates booking
- Authentication handlers → Account services: delegates auth
- Booking and slot logic → Appointment repository: persists appointments
- Account services → User repository: accesses users
- Service management → Service repository: accesses services
- Doctor management → Doctor repository: accesses doctors
- Appointment repository → PostgreSQL: reads and writes
- User repository → PostgreSQL: reads and writes
- Service repository → PostgreSQL: reads and writes
- Doctor repository → PostgreSQL: reads and writes
- Job scheduler → Appointment jobs: runs jobs
- Appointment jobs → Appointment repository: updates appointments
- Appointment jobs → LINE notifications: sends reminders
- LINE notifications → LINE client: uses client
- Appointment handlers → Image storage client: uploads images