How clinicacentrodosorrisosc-code/-cs-3.0 works
This is a clinic-management application combining a staff-facing web workspace with server APIs and external integrations. Staff sign in and work across CRM, appointments, clinical records, finance, documents, and operations; the server also receives integration events and runs synchronization or automation. The graph retains major product areas visible in the tree and source index. Several domain modules were not sampled, so their internal call relationships are omitted rather than inferred.
Main entry points: App.tsx Web application · server.ts API server · crmModel.ts CRM workspace · pipelineSync.ts Clinica Experts sync
Components 21
Application
- Web application
src/App.tsx - API server
server.ts
Clinic Workspace
- Appointments
src/components/agenda-calendar/AgendaCalendarPage.tsx - Clinical records
src/components/clinical/ClinicalModule.tsx - Patient portal
src/components/patient-portal/PatientPortal.tsx - Patient documents
src/components/documents/DocumentsModule.tsx - Financial management
src/components/Financial.tsx - Lab and orthodontics
src/components/LabWork.tsx
Messaging and CRM
- CRM workspace
src/components/crm-workspace/crmModel.ts - CRM automation
integrations/crmAutomation.ts - Messaging inbox
integrations/inboxHttp.ts - WhatsApp campaigns
integrations/whatsappBulkCampaignsHttp.ts - Meta webhooks
integrations/metaWebhookHttp.ts
External Integrations
- Clinica Experts sync
integrations/clinica-experts/pipelineSync.ts - Clinica Experts API
integrations/clinica-experts/client.ts - Google Drive
integrations/googleDriveHttp.ts - AI assistant
integrations/ai/assistant.ts
Data and Services
- CRM persistence
src/lib/crmWorkspaceStorage.ts - Supabase client
src/supabaseClient.ts - CRM records store
src/lib/crmWorkspaceStorage.ts
Other components
- Clinic staff
Connections 22
- Clinic staff → Web application: uses
src/App.tsx - Web application → CRM workspace: renders
src/App.tsx - Web application → Appointments: renders
src/App.tsx - Web application → Clinical records: renders
src/App.tsx - Web application → Financial management: renders
src/App.tsx - Web application → Patient portal: renders
- Web application → Patient documents: renders
src/App.tsx - Web application → Lab and orthodontics: renders
src/App.tsx - API server → Clinica Experts sync: dispatches
server.ts - Clinica Experts sync → Clinica Experts API: calls
integrations/clinica-experts/pipelineSync.ts - Clinica Experts sync → CRM automation: processes queue
integrations/clinica-experts/pipelineSync.ts - API server → CRM automation: routes requests
- API server → Messaging inbox: routes requests
server.ts - API server → WhatsApp campaigns: routes requests
server.ts - API server → Meta webhooks: routes events
server.ts - API server → Google Drive: routes requests
server.ts - API server → AI assistant: routes requests
- CRM workspace → CRM persistence: syncs records
src/components/crm-workspace/hooks/useCrmWorkspaceSync.ts - CRM persistence → Supabase client: queries
src/lib/crmWorkspaceStorage.ts - CRM persistence → CRM records store: reads records
src/lib/crmWorkspaceStorage.ts - CRM workspace → CRM automation: triggers
- Meta webhooks → Messaging inbox: creates conversations
integrations/metaWebhookHttp.ts