How thaemine92/stageagentai works
Agent de rendez-vous IA combines a professional/patient web portal with an Express API and SQLite persistence. Users enter through the React application; professionals manage patients and appointments, while patients use their space and the conversational assistant can interpret appointment requests and invoke appointment or patient operations. The README also describes triage, multichannel access, privacy, reminders, analytics and operational logging; some of these capabilities have no sampled implementation, so they are shown as documented subsystems without speculative call paths. Edges reflect shown imports/calls or README claims.
Main entry points: server.ts Express server · App.tsx React app and routes · aiController.ts Conversational agent · db.ts SQLite database
Components 30
Web application
- React app and routes
src/App.tsx - Sign-in and registration
src/pages - Professional dashboard
src/pages/DashboardPage.tsx - Patient management
src/pages/PatientsPage.tsx - Patient space
src/pages/PatientSpacePage.tsx - Chat interface
src/components/Chatbot.tsx - Client observer hook
src/hooks/UseClients.tsx - Client observer store
src/models/ClientObserver.tsx
API and workflows
- Express server
src/server.ts - Authentication routes
src/routes/authRoutes.ts - Client routes
src/routes/clientRoutes.ts - Appointment routes
src/routes/appointmentRoutes.ts - AI routes
src/routes/aiRoutes.ts - Service routes
src/routes/serviceRoutes.ts - Account and recovery
src/controllers/authController.ts
Scheduling domain
- Patient records
src/controllers/clientController.ts - Appointment operations
src/controllers/appointmentController.ts - Conversational agent
src/controllers/aiController.ts - Service catalog
src/controllers/serviceController.ts - Client domain
src/models/Clients.ts - Appointment domain
src/models/RendezVous.ts - Professional account
src/models/CompteProfessionnel.ts - Agent configuration
src/models/ConfigurationAgentAI.ts - Service reference
src/models/ReferentielServices.ts
Persistence and monitoring
- Interaction and error logs
src/models/LogSysteme.ts - SQLite database
src/database/db.ts - Schema initialization
src/database/initDb.ts
External services
- Mistral AI API
- Phone, SMS, WhatsApp
Other components
- Professional or patient
Connections 31
- Professional or patient → React app and routes: uses
src/App.tsx - React app and routes → Sign-in and registration: routes to
src/App.tsx - React app and routes → Professional dashboard: routes to
src/App.tsx - React app and routes → Patient management: routes to
src/App.tsx - React app and routes → Patient space: routes to
src/App.tsx - React app and routes → Chat interface: renders
src/App.tsx - Client observer hook → Client observer store: subscribes to
src/hooks/UseClients.tsx - Express server → Authentication routes: mounts
src/server.ts - Express server → Client routes: mounts
src/server.ts - Express server → Appointment routes: mounts
src/server.ts - Express server → AI routes: mounts
src/server.ts - Express server → Service routes: mounts
src/server.ts - Express server → SQLite database: initializes
src/server.ts - Express server → Schema initialization: runs initialization
src/server.ts - Authentication routes → Account and recovery: dispatches to
src/routes/authRoutes.ts - Client routes → Patient records: dispatches to
src/routes/clientRoutes.ts - Appointment routes → Appointment operations: dispatches to
src/routes/appointmentRoutes.ts - AI routes → Conversational agent: dispatches to
src/routes/aiRoutes.ts - Service routes → Service catalog: dispatches to
src/routes/serviceRoutes.ts - Account and recovery → SQLite database: queries
src/controllers/authController.ts - Patient records → SQLite database: queries
src/controllers/clientController.ts - Appointment operations → SQLite database: reads and writes
src/controllers/appointmentController.ts - Conversational agent → Appointment operations: invokes operations
src/controllers/aiController.ts - Conversational agent → Patient records: invokes operations
src/controllers/aiController.ts - Conversational agent → Mistral AI API: requests completions
src/controllers/aiController.ts - Conversational agent → Agent configuration: uses configuration
src/controllers/aiController.ts - Appointment operations → Appointment domain: handles records
src/controllers/appointmentController.ts - Patient records → Client domain: handles records
src/controllers/clientController.ts - Account and recovery → Professional account: uses account type
src/controllers/authController.ts - Schema initialization → SQLite database: creates schema
src/database/initDb.ts - Phone, SMS, WhatsApp → Conversational agent: supports access