How joaoptoaldo/somdiabetes works
SOMDiabetes is a Django diabetes-monitoring application for clients and health professionals. Users register and access personal and clinical records, log meals and physical activity, and consult health-related data; staff manage reference catalogs and send notices. Reports can be generated from natural-language descriptions using an LLM to produce and run SQL. The graph retains the README’s major domain capabilities. Some subsystem details and URL routing were not sampled, so undocumented wiring is omitted; LLM-to-provider integration is shown as unverified.
Main entry points: appcliente/views.py Client Portal · decorators.py Access Controls · aviso/views.py Notice Delivery · usuario/views.py Registration and Login
Components 26
Users and Access
- User Accounts
projeto/usuario/models.py - Registration and Login
projeto/usuario/views.py - Client Portal
projeto/appcliente/views.py - Client Forms
projeto/appcliente/forms.py
Health Monitoring
- Clinical Records
projeto/dado_clinico/models.py - Clinical Record Views
projeto/dado_clinico/views.py - Meal Records
projeto/registro_refeicao/models.py - Meal Logging
projeto/registro_refeicao/views.py - Meal Recognition
projeto/registro_refeicao/templates/registro_refeicao/jsRecognition.js - Activity Records
projeto/registro_atividade/models.py - Activity Logging
projeto/registro_atividade/views.py
Clinical Catalogs
- Food Catalog
projeto/alimento/models.py - Food Management
projeto/alimento/views.py - Exercise Catalog
projeto/exercicio/models.py - Exercise Management
projeto/exercicio/views.py - Medication Catalog
projeto/medicamento/models.py - Medication Management
projeto/medicamento/views.py
Communication and Reports
- Notices
projeto/aviso/models.py - Notice Delivery
projeto/aviso/views.py - Report Records
projeto/relatorio/models.py - Report Generation
projeto/relatorio/views.py - LLM and SQL
projeto/utils/conecta_llm.py
Shared Services
- Access Controls
projeto/utils/decorators.py
Other components
- Gemini API
- Email Service
- System User
Connections 27
- System User → Registration and Login: registers or signs in
- Registration and Login → User Accounts: creates and activates
projeto/usuario/views.py - Registration and Login → Email Service: sends activation email
projeto/usuario/views.py - System User → Client Portal: uses client portal
- Client Portal → Clinical Records: manages records
projeto/appcliente/views.py - Client Portal → Meal Records: manages meal logs
projeto/appcliente/views.py - Client Portal → Activity Records: manages activity logs
projeto/appcliente/views.py - Client Portal → User Accounts: reads account data
projeto/appcliente/views.py - Client Portal → Client Forms: uses forms
projeto/appcliente/views.py - Clinical Record Views → Clinical Records: creates and queries
projeto/dado_clinico/views.py - Meal Logging → Meal Records: creates and queries
projeto/registro_refeicao/views.py - Activity Logging → Activity Records: creates and queries
projeto/registro_atividade/views.py - Food Management → Food Catalog: manages catalog
projeto/alimento/views.py - Exercise Management → Exercise Catalog: manages catalog
projeto/exercicio/views.py - Medication Management → Medication Catalog: manages catalog
projeto/medicamento/views.py - Clinical Record Views → Access Controls: requires login
projeto/dado_clinico/views.py - Activity Logging → Access Controls: requires login
projeto/registro_atividade/views.py - Food Management → Access Controls: requires login
projeto/alimento/views.py - Exercise Management → Access Controls: requires login
projeto/exercicio/views.py - Medication Management → Access Controls: requires login
projeto/medicamento/views.py - Notice Delivery → Notices: manages notices
projeto/aviso/views.py - Notice Delivery → User Accounts: selects recipients
projeto/aviso/views.py - Notice Delivery → Email Service: sends notice
projeto/aviso/views.py - Report Generation → Report Records: saves report
projeto/relatorio/views.py - Report Generation → LLM and SQL: generates and runs SQL
projeto/relatorio/views.py - LLM and SQL → Gemini API: requests generation
- Meal Recognition → Meal Logging: supports meal entry