# oficialconectaenem-org/conecta-enem architecture

> Architecture diagram of the GitHub repository oficialconectaenem-org/conecta-enem, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/oficialconectaenem-org/conecta-enem
- Repository: https://github.com/oficialconectaenem-org/conecta-enem

## Overview

Conecta ENEM is a responsive ENEM study platform for students, teachers, and administrators. Students sign in, study lessons and questions, submit essays, and track progress; teachers manage classrooms and review essays, while administrators manage study content, users, and AI-provider keys. The tree shows these distinct product areas, but most server routes and page implementations were not sampled, so their internal call paths are left unasserted. The graph includes sampled authentication, question-management, and API-key flows, plus documented learning and progress capabilities.

Main entry points: [`app/composables/useAuth.js`](https://github.com/oficialconectaenem-org/conecta-enem/blob/main/app/composables/useAuth.js) (Auth client), [`app/components/admin/questions/index.vue`](https://github.com/oficialconectaenem-org/conecta-enem/blob/main/app/components/admin/questions/index.vue) (Question bank admin), [`app/components/auth/AuthPanel.vue`](https://github.com/oficialconectaenem-org/conecta-enem/blob/main/app/components/auth/AuthPanel.vue) (Sign-in and registration), [`server/api/auth`](https://github.com/oficialconectaenem-org/conecta-enem/tree/main/server/api/auth) (Auth endpoints)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and identity"]
  node_auth_ui["Sign-in and registration<br/>[AuthPanel.vue]"]
  node_auth_client["Auth client<br/>[useAuth.js]"]
  node_auth_plugin["Session bootstrap<br/>[auth.client.js]"]
  node_auth_api["Auth endpoints"]
  node_auth_service["Auth service<br/>[auth.service.js]"]
  node_auth_store["Auth store<br/>[auth.js]"]
end

subgraph group_learning["Student learning"]
  node_student_learning["Lessons and questions"]
  node_questions_client["Question data client<br/>[useQuestions.js]"]
  node_question_api["Question endpoints"]
  node_progress["Study progress"]
  node_subject_classifier["Subject classifier"]
end

subgraph group_writing["Essay workflow"]
  node_essay_student["Student essay workspace"]
  node_ai_correction["AI essay correction"]
end

subgraph group_teaching["Teacher tools"]
  node_essay_teacher["Teacher essay review"]
  node_teacher_classrooms["Classrooms and reports"]
end

subgraph group_admin["Administration"]
  node_question_admin["Question bank admin<br/>[index.vue]"]
  node_question_parts["Question views and dialogs"]
  node_admin_content["Study content management"]
  node_admin_redacao["Essay resources admin<br/>[RedacaoManager.vue]"]
  node_admin_users["User administration<br/>[UserManager.vue]"]
  node_admin_keys["AI key management<br/>[ApiKeyManager.vue]"]
  node_api_key_endpoints["API-key endpoints"]
  node_enem_seed["Question import<br/>[seed-enem.js]"]
end

node_visitor(("Learner / staff"))
node_database[("Application database")]

node_visitor -->|"signs in"| node_auth_ui
node_auth_ui -.->|"uses"| node_auth_client
node_auth_client -->|"requests"| node_auth_api
node_auth_client -->|"updates"| node_auth_store
node_auth_plugin -->|"validates session"| node_auth_client
node_auth_api -.->|"delegates"| node_auth_service
node_auth_service -->|"reads and writes"| node_database
node_visitor -.->|"studies"| node_student_learning
node_question_admin -->|"loads questions"| node_questions_client
node_question_admin -->|"renders"| node_question_parts
node_questions_client -.->|"requests"| node_question_api
node_question_api -.->|"stores questions"| node_database
node_visitor -.->|"writes essays"| node_essay_student
node_visitor -.->|"manages classes"| node_teacher_classrooms
node_visitor -.->|"reviews essays"| node_essay_teacher
node_visitor -.->|"manages content"| node_admin_content
node_admin_redacao -.->|"manages resources"| node_database
node_admin_users -.->|"manages users"| node_database
node_admin_keys -->|"requests keys"| node_api_key_endpoints
node_visitor -.->|"tracks progress"| node_progress
node_essay_student -.->|"requests correction"| node_ai_correction
node_essay_teacher -.->|"reviews submissions"| node_database
node_enem_seed -->|"classifies questions"| node_subject_classifier

click node_auth_ui "https://github.com/oficialconectaenem-org/conecta-enem/blob/main/app/components/auth/AuthPanel.vue"
click node_auth_client "https://github.com/oficialconectaenem-org/conecta-enem/blob/main/app/composables/useAuth.js"
click node_auth_plugin "https://github.com/oficialconectaenem-org/conecta-enem/blob/main/app/plugins/auth.client.js"
click node_auth_api "https://github.com/oficialconectaenem-org/conecta-enem/tree/main/server/api/auth"
click node_auth_service "https://github.com/oficialconectaenem-org/conecta-enem/blob/main/server/services/auth.service.js"
click node_student_learning "https://github.com/oficialconectaenem-org/conecta-enem/tree/main/app/pages/aluno"
click node_question_admin "https://github.com/oficialconectaenem-org/conecta-enem/blob/main/app/components/admin/questions/index.vue"
click node_question_parts "https://github.com/oficialconectaenem-org/conecta-enem/tree/main/app/components/admin/questions"
click node_questions_client "https://github.com/oficialconectaenem-org/conecta-enem/blob/main/app/composables/useQuestions.js"
click node_question_api "https://github.com/oficialconectaenem-org/conecta-enem/tree/main/server/api/questions"
click node_progress "https://github.com/oficialconectaenem-org/conecta-enem/tree/main/server/api/student"
click node_essay_student "https://github.com/oficialconectaenem-org/conecta-enem/tree/main/app/pages/aluno/redacao"
click node_essay_teacher "https://github.com/oficialconectaenem-org/conecta-enem/tree/main/app/pages/professor/redacoes"
click node_teacher_classrooms "https://github.com/oficialconectaenem-org/conecta-enem/tree/main/app/pages/professor"
click node_admin_content "https://github.com/oficialconectaenem-org/conecta-enem/tree/main/app/pages/admin"
click node_admin_redacao "https://github.com/oficialconectaenem-org/conecta-enem/blob/main/app/components/admin/redacao/RedacaoManager.vue"
click node_admin_users "https://github.com/oficialconectaenem-org/conecta-enem/blob/main/app/components/admin/users/UserManager.vue"
click node_admin_keys "https://github.com/oficialconectaenem-org/conecta-enem/blob/main/app/components/admin/apikeys/ApiKeyManager.vue"
click node_api_key_endpoints "https://github.com/oficialconectaenem-org/conecta-enem/tree/main/server/api/admin/api-keys"
click node_ai_correction "https://github.com/oficialconectaenem-org/conecta-enem/tree/main/server/api/ai"
click node_subject_classifier "https://github.com/oficialconectaenem-org/conecta-enem/blob/main/shared/utils/subject-classifier.js"
click node_enem_seed "https://github.com/oficialconectaenem-org/conecta-enem/blob/main/prisma/seed-enem.js"
click node_auth_store "https://github.com/oficialconectaenem-org/conecta-enem/blob/main/app/stores/auth.js"

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_auth_ui,node_auth_client,node_auth_plugin,node_auth_api,node_auth_service,node_auth_store toneBlue
class node_student_learning,node_questions_client,node_question_api,node_progress,node_subject_classifier,node_database toneAmber
class node_essay_student,node_ai_correction toneMint
class node_essay_teacher,node_teacher_classrooms toneRose
class node_question_admin,node_question_parts,node_admin_content,node_admin_redacao,node_admin_users,node_admin_keys,node_api_key_endpoints,node_enem_seed,node_visitor toneIndigo
```

## Components

### Access and identity

- [Sign-in and registration](https://github.com/oficialconectaenem-org/conecta-enem/blob/main/app/components/auth/AuthPanel.vue): `app/components/auth/AuthPanel.vue`
- [Auth client](https://github.com/oficialconectaenem-org/conecta-enem/blob/main/app/composables/useAuth.js): `app/composables/useAuth.js`
- [Session bootstrap](https://github.com/oficialconectaenem-org/conecta-enem/blob/main/app/plugins/auth.client.js): `app/plugins/auth.client.js`
- [Auth endpoints](https://github.com/oficialconectaenem-org/conecta-enem/tree/main/server/api/auth): `server/api/auth`
- [Auth service](https://github.com/oficialconectaenem-org/conecta-enem/blob/main/server/services/auth.service.js): `server/services/auth.service.js`
- [Auth store](https://github.com/oficialconectaenem-org/conecta-enem/blob/main/app/stores/auth.js): `app/stores/auth.js`

### Student learning

- [Lessons and questions](https://github.com/oficialconectaenem-org/conecta-enem/tree/main/app/pages/aluno): `app/pages/aluno`
- [Question data client](https://github.com/oficialconectaenem-org/conecta-enem/blob/main/app/composables/useQuestions.js): `app/composables/useQuestions.js`
- [Question endpoints](https://github.com/oficialconectaenem-org/conecta-enem/tree/main/server/api/questions): `server/api/questions`
- [Study progress](https://github.com/oficialconectaenem-org/conecta-enem/tree/main/server/api/student): `server/api/student`
- [Subject classifier](https://github.com/oficialconectaenem-org/conecta-enem/blob/main/shared/utils/subject-classifier.js): `shared/utils/subject-classifier.js`

### Essay workflow

- [Student essay workspace](https://github.com/oficialconectaenem-org/conecta-enem/tree/main/app/pages/aluno/redacao): `app/pages/aluno/redacao`
- [AI essay correction](https://github.com/oficialconectaenem-org/conecta-enem/tree/main/server/api/ai): `server/api/ai`

### Teacher tools

- [Teacher essay review](https://github.com/oficialconectaenem-org/conecta-enem/tree/main/app/pages/professor/redacoes): `app/pages/professor/redacoes`
- [Classrooms and reports](https://github.com/oficialconectaenem-org/conecta-enem/tree/main/app/pages/professor): `app/pages/professor`

### Administration

- [Question bank admin](https://github.com/oficialconectaenem-org/conecta-enem/blob/main/app/components/admin/questions/index.vue): `app/components/admin/questions/index.vue`
- [Question views and dialogs](https://github.com/oficialconectaenem-org/conecta-enem/tree/main/app/components/admin/questions): `app/components/admin/questions`
- [Study content management](https://github.com/oficialconectaenem-org/conecta-enem/tree/main/app/pages/admin): `app/pages/admin`
- [Essay resources admin](https://github.com/oficialconectaenem-org/conecta-enem/blob/main/app/components/admin/redacao/RedacaoManager.vue): `app/components/admin/redacao/RedacaoManager.vue`
- [User administration](https://github.com/oficialconectaenem-org/conecta-enem/blob/main/app/components/admin/users/UserManager.vue): `app/components/admin/users/UserManager.vue`
- [AI key management](https://github.com/oficialconectaenem-org/conecta-enem/blob/main/app/components/admin/apikeys/ApiKeyManager.vue): `app/components/admin/apikeys/ApiKeyManager.vue`
- [API-key endpoints](https://github.com/oficialconectaenem-org/conecta-enem/tree/main/server/api/admin/api-keys): `server/api/admin/api-keys`
- [Question import](https://github.com/oficialconectaenem-org/conecta-enem/blob/main/prisma/seed-enem.js): `prisma/seed-enem.js`

### Other components

- **Learner / staff**
- **Application database**

## Connections

- Learner / staff → Sign-in and registration: signs in (evidence: `app/components/auth/AuthPanel.vue`)
- Sign-in and registration → Auth client: uses
- Auth client → Auth endpoints: requests (evidence: `app/composables/useAuth.js`)
- Auth client → Auth store: updates (evidence: `app/composables/useAuth.js`)
- Session bootstrap → Auth client: validates session (evidence: `app/plugins/auth.client.js`)
- Auth endpoints → Auth service: delegates
- Auth service → Application database: reads and writes (evidence: `server/services/auth.service.js`)
- Learner / staff → Lessons and questions: studies
- Question bank admin → Question data client: loads questions (evidence: `app/components/admin/questions/index.vue`)
- Question bank admin → Question views and dialogs: renders (evidence: `app/components/admin/questions/index.vue`)
- Question data client → Question endpoints: requests
- Question endpoints → Application database: stores questions
- Learner / staff → Student essay workspace: writes essays
- Learner / staff → Classrooms and reports: manages classes
- Learner / staff → Teacher essay review: reviews essays
- Learner / staff → Study content management: manages content
- Essay resources admin → Application database: manages resources
- User administration → Application database: manages users
- AI key management → API-key endpoints: requests keys (evidence: `app/components/admin/apikeys/ApiKeyManager.vue`)
- Learner / staff → Study progress: tracks progress
- Student essay workspace → AI essay correction: requests correction
- Teacher essay review → Application database: reviews submissions
- Question import → Subject classifier: classifies questions (evidence: `prisma/seed-enem.js`)
