How rafanonato/saas-nutrition works
TalkNutri is a multi-tenant clinical nutrition SaaS. The primary workflow moves from clinician sign-in and patient selection through consultation and assessment, diet prescription, then clinician-approved document delivery; clinic administration, compliance, billing, and patient WhatsApp support are additional capabilities. The graph combines shown frontend/backend routing and calls with documented product relationships. Several domain implementations were not sampled, so uncertain implementation-level connections are omitted.
Main entry points: App.tsx Workspace shell · app.ts Express API routing · EditorDieteticoView.tsx Diet editor · metaWhatsApp.service.ts WhatsApp messaging
Components 26
Clinical workspace
- Workspace shell
src/App.tsx - Sign-in and 2FA
src/context/AuthContext.tsx - Clinic and patient management
src/services/tenantService.ts
Clinical assessment
- Consultation workflow
src/components/views/AnamneseView.tsx - Clinical audio capture
src/components/assessment/ConsultationAudioRecordingModal.tsx - Recording storage
src/utils/audioRecordingStorage.ts - Exam OCR
src/services/ocrService.ts - Physical assessment
src/components/views/AvaliacaoFisicaView.tsx - Metabolic calculator
src/utils/metabolicCalculator.ts
Diet prescription
- Diet editor
src/components/views/EditorDieteticoView.tsx - HiGHS optimizer
src/server/services/highsSolver.service.ts - Food and template data
src/data/foodDatabase.ts - DRI references
src/data/driTables.ts - Review and signature
src/components/views/FinalizacaoView.tsx
Platform services
- LGPD compliance
src/server/services/compliance.service.ts - SaaS billing
src/server/services/billing.service.ts - Express API routing
src/server/app.ts - Clinical API controllers
src/server/controllers - Persistent data access
src/server/db/client.ts
Patient delivery
- PDF document service
src/server/services/mealPlanDocument.service.ts - Background queue
src/server/services/queue.service.ts - WhatsApp messaging
src/server/services/metaWhatsApp.service.ts - Clinical AI copilot
src/server/controllers/copilot.controller.ts
Other components
- Nutritionist
- Patient
- Meta Cloud API
Connections 28
- Nutritionist → Workspace shell: uses workspace
README.md - Workspace shell → Sign-in and 2FA: checks session
src/App.tsx - Workspace shell → Consultation workflow: routes to
src/App.tsx - Workspace shell → Physical assessment: routes to
src/App.tsx - Workspace shell → Diet editor: routes to
src/App.tsx - Workspace shell → Review and signature: routes to
src/App.tsx - Workspace shell → Clinic and patient management: loads and updates
src/App.tsx - Consultation workflow → Clinical audio capture: opens capture
src/components/views/AnamneseView.tsx - Consultation workflow → Exam OCR: opens exam OCR
src/components/views/AnamneseView.tsx - Clinical audio capture → Recording storage: reads and saves
src/components/assessment/ConsultationAudioRecordingModal.tsx - Physical assessment → Metabolic calculator: calculates metabolism
src/components/views/AvaliacaoFisicaView.tsx - Diet editor → HiGHS optimizer: optimizes portions
README.md - Diet editor → Food and template data: uses food data
README.md - Diet editor → DRI references: checks adequacy
README.md - Review and signature → PDF document service: generates approved plan
README.md - PDF document service → Background queue: dispatches work
src/server/services/mealPlanDocument.service.ts - Patient → WhatsApp messaging: messages
README.md - WhatsApp messaging → Meta Cloud API: sends messages
- WhatsApp messaging → PDF document service: requests plan document
src/server/controllers/whatsapp.controller.ts - WhatsApp messaging → Patient: delivers plan and replies
README.md - Workspace shell → Clinical AI copilot: opens copilot
README.md - Workspace shell → Express API routing: calls REST API
README.md - Express API routing → Clinical API controllers: routes requests
src/server/app.ts - Express API routing → Sign-in and 2FA: applies authentication
src/server/app.ts - Clinical API controllers → Persistent data access: accesses records
src/server/controllers/auth.controller.ts - Express API routing → LGPD compliance: routes consent operations
src/server/app.ts - Express API routing → SaaS billing: routes billing operations
README.md - Persistent data access → Patient: stores clinical records
README.md