# inah147/gris architecture

> Architecture diagram of the GitHub repository inah147/gris, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/inah147/gris
- Repository: https://github.com/inah147/gris

## Overview

Gris is a Frappe app that supplements Scout-group operations with membership, access management, projects, events, finance, reception, and communications. Users work through Desk and public portals; domain records and service modules implement the business stages. The sampled sources show concrete flows for Google Drive access, LLM-generated evaluations, event invitations/payments, project management, and associate-user provisioning. Other major domains are evident in the repository tree but were not sampled, so their internal links are omitted rather than inferred.

Main entry points: [`gris/api/llm/client.py`](https://github.com/inah147/gris/blob/main/gris/api/llm/client.py) (LLM client), [`gris/api/gestao_adultos/summary_service.py`](https://github.com/inah147/gris/blob/main/gris/api/gestao_adultos/summary_service.py) (Interview summaries), [`gris/festas/doctype/convite_festa/convite_festa.py`](https://github.com/inah147/gris/blob/main/gris/festas/doctype/convite_festa/convite_festa.py) (Event invitations), [`gris/gestao_de_projetos/doctype/projeto/projeto.py`](https://github.com/inah147/gris/blob/main/gris/gestao_de_projetos/doctype/projeto/projeto.py) (Project management)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and identity"]
  node_access_portal["Access portal<br/>[index.js]"]
  node_access_api["Access requests<br/>[solicitacoes.py]"]
  node_access_drives["Drive access manager<br/>[drives.py]"]
  node_google_access["Workspace access<br/>[access_manager.py]"]
  node_user_manager["Associate accounts<br/>[user_manager.py]"]
  node_associate_records["Associate records<br/>[associado.py]"]
end

subgraph group_projects["Projects and people"]
  node_project_records["Project management<br/>[projeto.py]"]
  node_project_drive["Project Drive<br/>[project_drive.py]"]
  node_project_review["Project evaluation"]
  node_project_summary["Project summaries"]
  node_adult_interview["Adult interviews"]
  node_adult_summary["Interview summaries<br/>[summary_service.py]"]
  node_adult_prompt["Interview prompt<br/>[prompt_builder.py]"]
end

subgraph group_events["Events and finance"]
  node_party_portal["Public invitations<br/>[convite_publico.py]"]
  node_party_invite["Event invitations<br/>[convite_festa.py]"]
  node_party_api["Invitation confirmation"]
  node_party_qr["Invitation QR<br/>[convite_qr.py]"]
  node_finance_charge["Payment charges"]
  node_checkout["Payment checkout"]
  node_party_review["Event evaluation"]
end

subgraph group_platform["Shared services"]
  node_llm_client["LLM client<br/>[client.py]"]
  node_whatsapp["WhatsApp messaging<br/>[whatsapp.py]"]
  node_contact_utils["Contact utilities<br/>[contato.py]"]
  node_phone_data["Phone country data<br/>[phone_countries.py]"]
  node_job_logger["Job logging<br/>[job_logger.py]"]
end

node_scout_user(("Scout group user"))
node_openrouter(("OpenRouter"))
node_google_drive(("Google Drive"))
node_infinitepay(("InfinitePay"))
node_evolution_api(("Evolution API"))

node_scout_user -.->|"uses"| node_access_portal
node_access_portal -.->|"requests access"| node_access_api
node_access_drives -->|"delegates"| node_google_access
node_google_access -.->|"manages permissions"| node_google_drive
node_user_manager -->|"provisions accounts"| node_associate_records
node_project_records -->|"uses project Drive"| node_project_drive
node_project_records -->|"uses evaluation"| node_project_review
node_project_review -.->|"summarizes"| node_project_summary
node_project_summary -->|"requests completion"| node_llm_client
node_adult_interview -->|"queues summary"| node_adult_summary
node_adult_summary -->|"builds prompt"| node_adult_prompt
node_adult_summary -->|"requests completion"| node_llm_client
node_party_portal -->|"confirms invitation"| node_party_api
node_party_portal -->|"uses invitation record"| node_party_invite
node_party_invite -->|"generates QR"| node_party_qr
node_party_invite -->|"creates charge"| node_finance_charge
node_finance_charge -->|"starts checkout"| node_checkout
node_checkout -.->|"initiates payment"| node_infinitepay
node_party_review -->|"requests completion"| node_llm_client
node_llm_client -->|"sends prompt"| node_openrouter
node_whatsapp -->|"sends messages"| node_evolution_api
node_contact_utils -->|"uses country data"| node_phone_data

click node_access_portal "https://github.com/inah147/gris/blob/main/gris/www/acessos/index.js"
click node_access_api "https://github.com/inah147/gris/blob/main/gris/api/acessos/solicitacoes.py"
click node_access_drives "https://github.com/inah147/gris/blob/main/gris/api/acessos/drives.py"
click node_google_access "https://github.com/inah147/gris/blob/main/gris/api/google_workspace/access_manager.py"
click node_user_manager "https://github.com/inah147/gris/blob/main/gris/api/users/user_manager.py"
click node_associate_records "https://github.com/inah147/gris/blob/main/gris/gris/doctype/associado/associado.py"
click node_project_records "https://github.com/inah147/gris/blob/main/gris/gestao_de_projetos/doctype/projeto/projeto.py"
click node_project_drive "https://github.com/inah147/gris/blob/main/gris/api/google_workspace/project_drive.py"
click node_project_review "https://github.com/inah147/gris/blob/main/gris/gestao_de_projetos/doctype/avaliacao_de_projeto/avaliacao_de_projeto.py"
click node_project_summary "https://github.com/inah147/gris/blob/main/gris/api/gestao_de_projetos/avaliacao_projeto_service.py"
click node_adult_interview "https://github.com/inah147/gris/blob/main/gris/gest%C3%A3o_de_adultos/doctype/entrevista_por_competencias/entrevista_por_competencias.py"
click node_adult_summary "https://github.com/inah147/gris/blob/main/gris/api/gestao_adultos/summary_service.py"
click node_adult_prompt "https://github.com/inah147/gris/blob/main/gris/api/gestao_adultos/prompt_builder.py"
click node_party_portal "https://github.com/inah147/gris/blob/main/gris/api/festas/convite_publico.py"
click node_party_invite "https://github.com/inah147/gris/blob/main/gris/festas/doctype/convite_festa/convite_festa.py"
click node_party_api "https://github.com/inah147/gris/blob/main/gris/api/festas/convite_confirmado.py"
click node_party_qr "https://github.com/inah147/gris/blob/main/gris/festas/utils/convite_qr.py"
click node_finance_charge "https://github.com/inah147/gris/blob/main/gris/financeiro/doctype/cobranca_infinitepay/cobranca_infinitepay.py"
click node_checkout "https://github.com/inah147/gris/blob/main/gris/api/financeiro/infinitepay_checkout.py"
click node_party_review "https://github.com/inah147/gris/blob/main/gris/api/festas/avaliacao_service.py"
click node_llm_client "https://github.com/inah147/gris/blob/main/gris/api/llm/client.py"
click node_whatsapp "https://github.com/inah147/gris/blob/main/gris/utils/whatsapp.py"
click node_contact_utils "https://github.com/inah147/gris/blob/main/gris/utils/contato.py"
click node_phone_data "https://github.com/inah147/gris/blob/main/gris/utils/phone_countries.py"
click node_job_logger "https://github.com/inah147/gris/blob/main/gris/utils/job_logger.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_access_portal,node_access_api,node_access_drives,node_google_access,node_user_manager,node_associate_records,node_scout_user toneBlue
class node_project_records,node_project_drive,node_project_review,node_project_summary,node_adult_interview,node_adult_summary,node_adult_prompt toneAmber
class node_party_portal,node_party_invite,node_party_api,node_party_qr,node_finance_charge,node_checkout,node_party_review,node_openrouter,node_evolution_api toneMint
class node_llm_client,node_whatsapp,node_contact_utils,node_phone_data,node_job_logger toneRose
class node_google_drive,node_infinitepay toneIndigo
```

## Components

### Access and identity

- [Access portal](https://github.com/inah147/gris/blob/main/gris/www/acessos/index.js): `gris/www/acessos/index.js`
- [Access requests](https://github.com/inah147/gris/blob/main/gris/api/acessos/solicitacoes.py): `gris/api/acessos/solicitacoes.py`
- [Drive access manager](https://github.com/inah147/gris/blob/main/gris/api/acessos/drives.py): `gris/api/acessos/drives.py`
- [Workspace access](https://github.com/inah147/gris/blob/main/gris/api/google_workspace/access_manager.py): `gris/api/google_workspace/access_manager.py`
- [Associate accounts](https://github.com/inah147/gris/blob/main/gris/api/users/user_manager.py): `gris/api/users/user_manager.py`
- [Associate records](https://github.com/inah147/gris/blob/main/gris/gris/doctype/associado/associado.py): `gris/gris/doctype/associado/associado.py`

### Projects and people

- [Project management](https://github.com/inah147/gris/blob/main/gris/gestao_de_projetos/doctype/projeto/projeto.py): `gris/gestao_de_projetos/doctype/projeto/projeto.py`
- [Project Drive](https://github.com/inah147/gris/blob/main/gris/api/google_workspace/project_drive.py): `gris/api/google_workspace/project_drive.py`
- [Project evaluation](https://github.com/inah147/gris/blob/main/gris/gestao_de_projetos/doctype/avaliacao_de_projeto/avaliacao_de_projeto.py): `gris/gestao_de_projetos/doctype/avaliacao_de_projeto/avaliacao_de_projeto.py`
- [Project summaries](https://github.com/inah147/gris/blob/main/gris/api/gestao_de_projetos/avaliacao_projeto_service.py): `gris/api/gestao_de_projetos/avaliacao_projeto_service.py`
- [Adult interviews](https://github.com/inah147/gris/blob/main/gris/gest%C3%A3o_de_adultos/doctype/entrevista_por_competencias/entrevista_por_competencias.py): `gris/gestão_de_adultos/doctype/entrevista_por_competencias/entrevista_por_competencias.py`
- [Interview summaries](https://github.com/inah147/gris/blob/main/gris/api/gestao_adultos/summary_service.py): `gris/api/gestao_adultos/summary_service.py`
- [Interview prompt](https://github.com/inah147/gris/blob/main/gris/api/gestao_adultos/prompt_builder.py): `gris/api/gestao_adultos/prompt_builder.py`

### Events and finance

- [Public invitations](https://github.com/inah147/gris/blob/main/gris/api/festas/convite_publico.py): `gris/api/festas/convite_publico.py`
- [Event invitations](https://github.com/inah147/gris/blob/main/gris/festas/doctype/convite_festa/convite_festa.py): `gris/festas/doctype/convite_festa/convite_festa.py`
- [Invitation confirmation](https://github.com/inah147/gris/blob/main/gris/api/festas/convite_confirmado.py): `gris/api/festas/convite_confirmado.py`
- [Invitation QR](https://github.com/inah147/gris/blob/main/gris/festas/utils/convite_qr.py): `gris/festas/utils/convite_qr.py`
- [Payment charges](https://github.com/inah147/gris/blob/main/gris/financeiro/doctype/cobranca_infinitepay/cobranca_infinitepay.py): `gris/financeiro/doctype/cobranca_infinitepay/cobranca_infinitepay.py`
- [Payment checkout](https://github.com/inah147/gris/blob/main/gris/api/financeiro/infinitepay_checkout.py): `gris/api/financeiro/infinitepay_checkout.py`
- [Event evaluation](https://github.com/inah147/gris/blob/main/gris/api/festas/avaliacao_service.py): `gris/api/festas/avaliacao_service.py`

### Shared services

- [LLM client](https://github.com/inah147/gris/blob/main/gris/api/llm/client.py): `gris/api/llm/client.py`
- [WhatsApp messaging](https://github.com/inah147/gris/blob/main/gris/utils/whatsapp.py): `gris/utils/whatsapp.py`
- [Contact utilities](https://github.com/inah147/gris/blob/main/gris/utils/contato.py): `gris/utils/contato.py`
- [Phone country data](https://github.com/inah147/gris/blob/main/gris/utils/phone_countries.py): `gris/utils/phone_countries.py`
- [Job logging](https://github.com/inah147/gris/blob/main/gris/utils/job_logger.py): `gris/utils/job_logger.py`

### Other components

- **Scout group user**
- **OpenRouter**
- **Google Drive**
- **InfinitePay**
- **Evolution API**

## Connections

- Scout group user → Access portal: uses
- Access portal → Access requests: requests access
- Drive access manager → Workspace access: delegates (evidence: `gris/api/acessos/drives.py`)
- Workspace access → Google Drive: manages permissions
- Associate accounts → Associate records: provisions accounts (evidence: `gris/api/users/user_manager.py`)
- Project management → Project Drive: uses project Drive (evidence: `gris/gestao_de_projetos/doctype/projeto/projeto.py`)
- Project management → Project evaluation: uses evaluation (evidence: `gris/gestao_de_projetos/doctype/projeto/projeto.py`)
- Project evaluation → Project summaries: summarizes
- Project summaries → LLM client: requests completion (evidence: `gris/api/gestao_de_projetos/avaliacao_projeto_service.py`)
- Adult interviews → Interview summaries: queues summary (evidence: `gris/gestão_de_adultos/doctype/entrevista_por_competencias/entrevista_por_competencias.py`)
- Interview summaries → Interview prompt: builds prompt (evidence: `gris/api/gestao_adultos/summary_service.py`)
- Interview summaries → LLM client: requests completion (evidence: `gris/api/gestao_adultos/summary_service.py`)
- Public invitations → Invitation confirmation: confirms invitation (evidence: `gris/api/festas/convite_publico.py`)
- Public invitations → Event invitations: uses invitation record (evidence: `gris/api/festas/convite_publico.py`)
- Event invitations → Invitation QR: generates QR (evidence: `gris/festas/doctype/convite_festa/convite_festa.py`)
- Event invitations → Payment charges: creates charge (evidence: `gris/festas/doctype/convite_festa/convite_festa.py`)
- Payment charges → Payment checkout: starts checkout (evidence: `gris/financeiro/doctype/cobranca_infinitepay/cobranca_infinitepay.py`)
- Payment checkout → InfinitePay: initiates payment
- Event evaluation → LLM client: requests completion (evidence: `gris/api/festas/avaliacao_service.py`)
- LLM client → OpenRouter: sends prompt (evidence: `gris/api/llm/client.py`)
- WhatsApp messaging → Evolution API: sends messages (evidence: `gris/utils/whatsapp.py`)
- Contact utilities → Phone country data: uses country data (evidence: `gris/utils/contato.py`)
