How rain946/timan- works
TIMAN is a pet identification and care app for owners and veterinary clinics, backed by an Express API and MySQL. The owner workflow covers pet profiles and QR identification, lost-pet reporting, and health records/reminders; clinic workflows include authorization, veterinary records, schedules, and reports. The server mounts these API route modules and starts a reminder scheduler. Most UI-to-endpoint calls are not shown in the supplied excerpts, so those links are omitted; component groupings reflect the file tree, not inspected navigation behavior.
Main entry points: server.js HTTP server · db.js MySQL pool · api.ts API URL config · authMiddleware.js JWT authentication
Components 33
Mobile app
- Sign in / register
app/(auth)/login.tsx - Owner dashboard
app/(owner)/dashboard.tsx - Clinic dashboard
app/(clinic)/(tabs)/clinic-dashboard.tsx - API URL config
config/api.ts
Pet identity
- Pet profiles
app/(pets)/pet-profile.tsx - Lost pet report
app/(pets)/lost-pet.tsx - QR scanning
app/(scanner)/qr-scanner.tsx - Public pet page
app/(public)/public-pet.tsx
Clinic care
- Clinic authorization
app/(veterinary)/clinic-authorization.tsx - Veterinary records
app/(clinic)/(tabs)/vet-records.tsx - Care schedules
app/(veterinary)/schedules.tsx - Clinic reports
app/(clinic)/clinic-reports.tsx
API backend
- HTTP server
backend/server.js - Authentication routes
backend/routes/authRoutes.js - Pet routes
backend/routes/petRoutes.js - Public pet routes
backend/routes/publicRoutes.js - Lost pet routes
backend/routes/lostPetRoutes.js - Authorization routes
backend/routes/authorizationRoutes.js - Veterinary routes
backend/routes/vetRecordRoutes.js - Clinic dashboard routes
backend/routes/clinicDashboardRoutes.js - Clinic report routes
backend/routes/clinicReportRoutes.js - Profile routes
backend/routes/profileRoutes.js - Notification routes
backend/routes/notificationRoutes.js - Push-token routes
backend/routes/pushTokenRoutes.js - MySQL pool
backend/config/db.js - JWT authentication
backend/middleware/authMiddleware.js
Notifications
- Notifications
app/(owner)/notifications.tsx - Reminder scheduler
backend/services/reminderScheduler.js - Push delivery
backend/services/pushService.js
Other components
- Pet owner
- Clinic user
- Expo push service
- Device notifications
Connections 44
- Pet owner → Sign in / register: signs in
- Pet owner → Owner dashboard: uses
- Clinic user → Sign in / register: signs in
- Clinic user → Clinic dashboard: uses
- HTTP server → Authentication routes: mounts
backend/server.js - HTTP server → Pet routes: mounts
backend/server.js - HTTP server → Public pet routes: mounts
backend/server.js - HTTP server → Authorization routes: mounts
backend/server.js - HTTP server → Veterinary routes: mounts
backend/server.js - HTTP server → Clinic dashboard routes: mounts
backend/server.js - HTTP server → Clinic report routes: mounts
backend/server.js - HTTP server → Lost pet routes: mounts
backend/server.js - HTTP server → Profile routes: mounts
backend/server.js - HTTP server → Notification routes: mounts
backend/server.js - HTTP server → Push-token routes: mounts
backend/server.js - HTTP server → Reminder scheduler: starts at launch
backend/server.js - Authentication routes → MySQL pool: queries
backend/routes/authRoutes.js - Pet routes → MySQL pool: queries
backend/routes/petRoutes.js - Public pet routes → MySQL pool: queries
backend/routes/publicRoutes.js - Lost pet routes → MySQL pool: queries
backend/routes/lostPetRoutes.js - Authorization routes → MySQL pool: queries
backend/routes/authorizationRoutes.js - Veterinary routes → MySQL pool: queries
backend/routes/vetRecordRoutes.js - Clinic dashboard routes → MySQL pool: queries
backend/routes/clinicDashboardRoutes.js - Clinic report routes → MySQL pool: queries
backend/routes/clinicReportRoutes.js - Profile routes → MySQL pool: queries
backend/routes/profileRoutes.js - Notification routes → MySQL pool: queries
backend/routes/notificationRoutes.js - Push-token routes → MySQL pool: queries
backend/routes/pushTokenRoutes.js - Authorization routes → JWT authentication: authenticates requests
backend/routes/authorizationRoutes.js - Veterinary routes → JWT authentication: authenticates requests
backend/routes/vetRecordRoutes.js - Lost pet routes → JWT authentication: authenticates requests
backend/routes/lostPetRoutes.js - Notification routes → JWT authentication: authenticates requests
backend/routes/notificationRoutes.js - Push-token routes → JWT authentication: authenticates requests
backend/routes/pushTokenRoutes.js - Reminder scheduler → MySQL pool: queries
backend/services/reminderScheduler.js - Reminder scheduler → Push delivery: sends reminders
backend/services/reminderScheduler.js - Push delivery → MySQL pool: updates tokens
backend/services/pushService.js - Push delivery → Expo push service: sends push
backend/services/pushService.js - API URL config → HTTP server: configures API URL
- Pet profiles → API URL config: uses API config
app/(pets)/pet-profile.tsx - Lost pet report → API URL config: uses API config
app/(pets)/lost-pet.tsx - QR scanning → API URL config: uses API config
app/(scanner)/qr-scanner.tsx - Clinic authorization → API URL config: uses API config
app/(veterinary)/clinic-authorization.tsx - Care schedules → API URL config: uses API config
app/(veterinary)/schedules.tsx - Notifications → API URL config: uses API config
app/(owner)/notifications.tsx - Device notifications → Expo push service: delivers alerts