# portabilis/i-diario architecture

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

- Interactive diagram: https://gitdiagram.com/portabilis/i-diario
- Repository: https://github.com/portabilis/i-diario

## Overview

i-Diário is a teacher portal integrated with i-Educar. Its broad workflow is selecting a user profile and using the portal’s school, classroom, attendance, assessment, planning, and reporting features; it also exposes an API for enrollment attendance status. The tree shows these product areas, but most implementation files were not sampled, so their internal call paths are omitted. The API controller-to-service flow and profile-selector imports are directly evidenced; other product relationships are not asserted.

Main entry points: [`app/javascript/components/ProfileChanger.vue`](https://github.com/portabilis/i-diario/blob/1.6/app/javascript/components/ProfileChanger.vue) (Profile Selector), [`app/services/api/enrollment_daily_frequency_statuses_service.rb`](https://github.com/portabilis/i-diario/blob/1.6/app/services/api/enrollment_daily_frequency_statuses_service.rb) (Status Aggregation), [`app/javascript/packs/app.js`](https://github.com/portabilis/i-diario/blob/1.6/app/javascript/packs/app.js) (Vue App Mount), [`app/controllers/api/v2/enrollment_daily_frequency_statuses_controller.rb`](https://github.com/portabilis/i-diario/blob/1.6/app/controllers/api/v2/enrollment_daily_frequency_statuses_controller.rb) (Enrollment Status API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_portal["Teacher Portal"]
  node_profile["Profile Selector<br/>[ProfileChanger.vue]"]
  node_profile_app["Vue App Mount<br/>[app.js]"]
  node_current_role["Role Selection<br/>[CurrentRole.vue]"]
  node_current_unity["School Selection<br/>[CurrentUnity.vue]"]
  node_current_year["School Year"]
  node_current_classroom["Class Selection"]
  node_current_teacher["Teacher Selection<br/>[CurrentTeacher.vue]"]
  node_current_discipline["Discipline Selection"]
  node_teacher_profile["Teacher Profile<br/>[TeacherProfile.vue]"]
end

subgraph group_academics["Academic Records"]
  node_attendance["Attendance"]
  node_assessment["Assessments"]
  node_enrollment["Student Enrollments"]
  node_reports["Reports"]
end

subgraph group_planning["Planning and Calendar"]
  node_lesson_plans["Lesson Plans"]
  node_teaching_plans["Teaching Plans"]
  node_calendar["School Calendar"]
  node_iep["Individual Plans"]
end

subgraph group_integration["API and Integration"]
  node_api_controller["Enrollment Status API"]
  node_status_service["Status Aggregation"]
end

subgraph group_foundation["Application Data"]
  node_enrollment_model[("Enrollment Records")]
  node_frequency_model[("Frequency Records")]
end

node_teacher(("Teacher"))
node_ieducar(("i-Educar"))

node_profile_app -->|"mounts"| node_profile
node_profile -->|"renders"| node_current_role
node_profile -->|"renders"| node_current_unity
node_profile -->|"renders"| node_current_year
node_profile -->|"renders"| node_current_classroom
node_profile -->|"renders"| node_current_teacher
node_profile -->|"renders"| node_current_discipline
node_profile -->|"renders"| node_teacher_profile
node_api_controller -->|"calls"| node_status_service
node_status_service -->|"queries"| node_enrollment_model
node_status_service -->|"aggregates"| node_frequency_model
node_ieducar -.->|"integrates with portal"| node_profile_app

click node_profile "https://github.com/portabilis/i-diario/blob/1.6/app/javascript/components/ProfileChanger.vue"
click node_profile_app "https://github.com/portabilis/i-diario/blob/1.6/app/javascript/packs/app.js"
click node_current_role "https://github.com/portabilis/i-diario/blob/1.6/app/javascript/components/CurrentRole.vue"
click node_current_unity "https://github.com/portabilis/i-diario/blob/1.6/app/javascript/components/CurrentUnity.vue"
click node_current_year "https://github.com/portabilis/i-diario/blob/1.6/app/javascript/components/CurrentSchoolYear.vue"
click node_current_classroom "https://github.com/portabilis/i-diario/blob/1.6/app/javascript/components/CurrentClassroom.vue"
click node_current_teacher "https://github.com/portabilis/i-diario/blob/1.6/app/javascript/components/CurrentTeacher.vue"
click node_current_discipline "https://github.com/portabilis/i-diario/blob/1.6/app/javascript/components/CurrentDiscipline.vue"
click node_teacher_profile "https://github.com/portabilis/i-diario/blob/1.6/app/javascript/components/TeacherProfile.vue"
click node_attendance "https://github.com/portabilis/i-diario/blob/1.6/app/controllers/daily_frequencies_controller.rb"
click node_assessment "https://github.com/portabilis/i-diario/blob/1.6/app/controllers/avaliations_controller.rb"
click node_enrollment "https://github.com/portabilis/i-diario/blob/1.6/app/controllers/student_enrollments_controller.rb"
click node_lesson_plans "https://github.com/portabilis/i-diario/blob/1.6/app/controllers/discipline_lesson_plans_controller.rb"
click node_teaching_plans "https://github.com/portabilis/i-diario/blob/1.6/app/controllers/teaching_plans_controller.rb"
click node_calendar "https://github.com/portabilis/i-diario/blob/1.6/app/controllers/school_calendars_controller.rb"
click node_iep "https://github.com/portabilis/i-diario/blob/1.6/app/controllers/individualized_educational_plans_controller.rb"
click node_reports "https://github.com/portabilis/i-diario/blob/1.6/app/reports/attendance_record_report.rb"
click node_api_controller "https://github.com/portabilis/i-diario/blob/1.6/app/controllers/api/v2/enrollment_daily_frequency_statuses_controller.rb"
click node_status_service "https://github.com/portabilis/i-diario/blob/1.6/app/services/api/enrollment_daily_frequency_statuses_service.rb"
click node_enrollment_model "https://github.com/portabilis/i-diario/blob/1.6/app/models/student_enrollment.rb"
click node_frequency_model "https://github.com/portabilis/i-diario/blob/1.6/app/models/daily_frequency_student.rb"

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_profile,node_profile_app,node_current_role,node_current_unity,node_current_year,node_current_classroom,node_current_teacher,node_current_discipline,node_teacher_profile toneBlue
class node_attendance,node_assessment,node_enrollment,node_reports toneAmber
class node_lesson_plans,node_teaching_plans,node_calendar,node_iep toneMint
class node_api_controller,node_status_service toneRose
class node_enrollment_model,node_frequency_model,node_teacher,node_ieducar toneIndigo
```

## Components

### Teacher Portal

- [Profile Selector](https://github.com/portabilis/i-diario/blob/1.6/app/javascript/components/ProfileChanger.vue): `app/javascript/components/ProfileChanger.vue`
- [Vue App Mount](https://github.com/portabilis/i-diario/blob/1.6/app/javascript/packs/app.js): `app/javascript/packs/app.js`
- [Role Selection](https://github.com/portabilis/i-diario/blob/1.6/app/javascript/components/CurrentRole.vue): `app/javascript/components/CurrentRole.vue`
- [School Selection](https://github.com/portabilis/i-diario/blob/1.6/app/javascript/components/CurrentUnity.vue): `app/javascript/components/CurrentUnity.vue`
- [School Year](https://github.com/portabilis/i-diario/blob/1.6/app/javascript/components/CurrentSchoolYear.vue): `app/javascript/components/CurrentSchoolYear.vue`
- [Class Selection](https://github.com/portabilis/i-diario/blob/1.6/app/javascript/components/CurrentClassroom.vue): `app/javascript/components/CurrentClassroom.vue`
- [Teacher Selection](https://github.com/portabilis/i-diario/blob/1.6/app/javascript/components/CurrentTeacher.vue): `app/javascript/components/CurrentTeacher.vue`
- [Discipline Selection](https://github.com/portabilis/i-diario/blob/1.6/app/javascript/components/CurrentDiscipline.vue): `app/javascript/components/CurrentDiscipline.vue`
- [Teacher Profile](https://github.com/portabilis/i-diario/blob/1.6/app/javascript/components/TeacherProfile.vue): `app/javascript/components/TeacherProfile.vue`

### Academic Records

- [Attendance](https://github.com/portabilis/i-diario/blob/1.6/app/controllers/daily_frequencies_controller.rb): `app/controllers/daily_frequencies_controller.rb`
- [Assessments](https://github.com/portabilis/i-diario/blob/1.6/app/controllers/avaliations_controller.rb): `app/controllers/avaliations_controller.rb`
- [Student Enrollments](https://github.com/portabilis/i-diario/blob/1.6/app/controllers/student_enrollments_controller.rb): `app/controllers/student_enrollments_controller.rb`
- [Reports](https://github.com/portabilis/i-diario/blob/1.6/app/reports/attendance_record_report.rb): `app/reports/attendance_record_report.rb`

### Planning and Calendar

- [Lesson Plans](https://github.com/portabilis/i-diario/blob/1.6/app/controllers/discipline_lesson_plans_controller.rb): `app/controllers/discipline_lesson_plans_controller.rb`
- [Teaching Plans](https://github.com/portabilis/i-diario/blob/1.6/app/controllers/teaching_plans_controller.rb): `app/controllers/teaching_plans_controller.rb`
- [School Calendar](https://github.com/portabilis/i-diario/blob/1.6/app/controllers/school_calendars_controller.rb): `app/controllers/school_calendars_controller.rb`
- [Individual Plans](https://github.com/portabilis/i-diario/blob/1.6/app/controllers/individualized_educational_plans_controller.rb): `app/controllers/individualized_educational_plans_controller.rb`

### API and Integration

- [Enrollment Status API](https://github.com/portabilis/i-diario/blob/1.6/app/controllers/api/v2/enrollment_daily_frequency_statuses_controller.rb): `app/controllers/api/v2/enrollment_daily_frequency_statuses_controller.rb`
- [Status Aggregation](https://github.com/portabilis/i-diario/blob/1.6/app/services/api/enrollment_daily_frequency_statuses_service.rb): `app/services/api/enrollment_daily_frequency_statuses_service.rb`

### Application Data

- [Enrollment Records](https://github.com/portabilis/i-diario/blob/1.6/app/models/student_enrollment.rb): `app/models/student_enrollment.rb`
- [Frequency Records](https://github.com/portabilis/i-diario/blob/1.6/app/models/daily_frequency_student.rb): `app/models/daily_frequency_student.rb`

### Other components

- **Teacher**
- **i-Educar**

## Connections

- Vue App Mount → Profile Selector: mounts (evidence: `app/javascript/packs/app.js`)
- Profile Selector → Role Selection: renders (evidence: `app/javascript/components/ProfileChanger.vue`)
- Profile Selector → School Selection: renders (evidence: `app/javascript/components/ProfileChanger.vue`)
- Profile Selector → School Year: renders (evidence: `app/javascript/components/ProfileChanger.vue`)
- Profile Selector → Class Selection: renders (evidence: `app/javascript/components/ProfileChanger.vue`)
- Profile Selector → Teacher Selection: renders (evidence: `app/javascript/components/ProfileChanger.vue`)
- Profile Selector → Discipline Selection: renders (evidence: `app/javascript/components/ProfileChanger.vue`)
- Profile Selector → Teacher Profile: renders (evidence: `app/javascript/components/ProfileChanger.vue`)
- Enrollment Status API → Status Aggregation: calls (evidence: `app/controllers/api/v2/enrollment_daily_frequency_statuses_controller.rb`)
- Status Aggregation → Enrollment Records: queries (evidence: `app/services/api/enrollment_daily_frequency_statuses_service.rb`)
- Status Aggregation → Frequency Records: aggregates (evidence: `app/services/api/enrollment_daily_frequency_statuses_service.rb`)
- i-Educar → Vue App Mount: integrates with portal
