How trandongthanh/sepfa26 works
LanCare Hub is a backend API for matching customers with plant-care providers and managing care services. Its core workflow runs from provider discovery and profile/package management through order submission, negotiation, agreement, payment, handover, and ongoing care reports. Authentication supports customer/provider accounts and role-based access; adjacent capabilities include disputes, video calls, customer/provider verification, and document uploads. The tree and controller excerpts establish API-to-service calls; service internals were not sampled, so uncertain cross-service wiring is omitted.
Main entry points: main.ts LanCare API · orders.controller.ts Order API · providers.service.ts Provider service · webhooks.controller.ts SePay webhook
Components 27
Identity and profiles
- Authentication API
BE/src/auth/auth.controller.ts - Authentication service
BE/src/auth/auth.service.ts - Account management
BE/src/accounts/accounts.controller.ts - Customer profiles
BE/src/customers/customers.controller.ts
Provider marketplace
- Provider profiles
BE/src/providers/providers.controller.ts - Provider approval
BE/src/providers/admin-providers.controller.ts - Provider service
BE/src/providers/providers.service.ts
Order lifecycle
- Order API
BE/src/orders/orders.controller.ts - Order service
BE/src/orders/orders.service.ts - Handover service
BE/src/orders/handover.service.ts - Dispute handling
BE/src/orders/disputes.controller.ts
Care and communication
- Care report API
BE/src/care-reports/care-reports.controller.ts - Care reports
BE/src/care-reports/care-reports.service.ts - Video call API
BE/src/video-calls/video-calls.controller.ts - Video call service
BE/src/video-calls/video-calls.service.ts
Payments and media
- Payment processing
BE/src/payments/payments.service.ts - SePay webhook
BE/src/payments/webhooks.controller.ts - Document uploads
BE/src/uploads/uploads.controller.ts - Upload service
BE/src/uploads/uploads.service.ts
Other components
- Customer
- Provider
- Administrator
- LanCare API
BE/src/main.ts - SePay
- GetStream
- Cloudinary
- Application database
BE/src/config/typeorm.config.ts
Connections 30
- Customer → LanCare API: uses
- Provider → LanCare API: uses
- Administrator → LanCare API: uses
- LanCare API → Authentication API: routes
- LanCare API → Account management: routes
- LanCare API → Customer profiles: routes
- LanCare API → Provider profiles: routes
- LanCare API → Provider approval: routes
- LanCare API → Order API: routes
- LanCare API → Dispute handling: routes
- LanCare API → SePay webhook: routes
- LanCare API → Care report API: routes
- LanCare API → Video call API: routes
- LanCare API → Document uploads: routes
- Authentication API → Authentication service: calls
- Account management → Authentication service: calls
- Customer profiles → Application database: reads/writes
- Provider profiles → Provider service: calls
- Provider approval → Provider service: calls
- Provider service → Application database: reads/writes
- Order API → Order service: calls
- Order API → Handover service: calls
- Dispute handling → Application database: reads/writes
- SePay webhook → Payment processing: calls
- SePay → SePay webhook: sends event
- Care report API → Care reports: calls
- Video call API → Video call service: calls
- Video call service → GetStream: integrates
- Document uploads → Upload service: calls
- Upload service → Cloudinary: uploads