# amaralcharle/p1app architecture

> Architecture diagram of the GitHub repository amaralcharle/p1app, 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/amaralcharle/p1app
- Repository: https://github.com/amaralcharle/p1app

## Overview

Academy Notes is an Expo/React Native academic-records MVP. A user can sign in locally, view a dashboard, manage students, record subject grades, and review performance summaries; student and grade changes live only in app memory. The graph separates screens, academic state/calculations, and authentication. Some routes are indexed but not excerpted, so their internal behavior and links are shown only where the index or README supports them.

Main entry points: [`StudentsContext.tsx`](https://github.com/amaralcharle/p1app/blob/main/StudentsContext.tsx) (Student state), [`app/(app)/alunos.tsx`](https://github.com/amaralcharle/p1app/blob/main/app/(app)/alunos.tsx) (Student list), [`app/(app)/index.tsx`](https://github.com/amaralcharle/p1app/blob/main/app/(app)/index.tsx) (Dashboard), [`app/(app)/relatorios.tsx`](https://github.com/amaralcharle/p1app/blob/main/app/(app)/relatorios.tsx) (Performance reports)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["App access"]
  node_login["Login screen<br/>[login.tsx]"]
  node_app_shell["Authenticated routes<br/>[_layout.tsx]"]
  node_settings["App settings<br/>[config.tsx]"]
  node_root_layout["Root provider<br/>[_layout.tsx]"]
end

subgraph group_students["Student records"]
  node_student_list["Student list<br/>[alunos.tsx]"]
  node_student_detail["Student detail<br/>[&#91;id&#93;.tsx]"]
  node_new_student["Add student<br/>[novo-aluno.tsx]"]
end

subgraph group_performance["Academic performance"]
  node_dashboard["Dashboard<br/>[index.tsx]"]
  node_grade_entry["Grade entry<br/>[notas.tsx]"]
  node_detail_grade_entry["Student grade entry<br/>[&#91;id&#93;.tsx]"]
  node_reports["Performance reports<br/>[relatorios.tsx]"]
end

subgraph group_shared["Shared state and logic"]
  node_auth["Local auth state<br/>[AuthContext.tsx]"]
  node_students_context["Student state"]
  node_seed_data["Sample students<br/>[dados.js]"]
  node_grade_logic["Average and status<br/>[dados.js]"]
  node_theme["Visual theme<br/>[theme.ts]"]
end

node_user(("App user"))

node_user -->|"opens app"| node_login
node_login -->|"sets signed-in state"| node_auth
node_root_layout -->|"provides auth"| node_auth
node_app_shell -->|"provides student state"| node_students_context
node_user -->|"views summary"| node_dashboard
node_dashboard -->|"reads students"| node_students_context
node_dashboard -->|"calculates summary"| node_grade_logic
node_user -->|"manages students"| node_student_list
node_student_list -->|"reads students"| node_students_context
node_student_list -->|"calculates status"| node_grade_logic
node_user -->|"adds student"| node_new_student
node_new_student -.->|"adds student"| node_students_context
node_user -->|"opens student"| node_student_detail
node_student_detail -->|"reads student"| node_students_context
node_user -->|"records grade"| node_grade_entry
node_grade_entry -->|"updates grade"| node_students_context
node_user -->|"records grade"| node_detail_grade_entry
node_detail_grade_entry -->|"updates grade"| node_students_context
node_user -->|"views reports"| node_reports
node_reports -->|"reads students"| node_students_context
node_reports -->|"calculates averages"| node_grade_logic
node_students_context -->|"initializes from"| node_seed_data
node_user -.->|"opens settings"| node_settings

click node_login "https://github.com/amaralcharle/p1app/blob/main/app/(auth)/login.tsx"
click node_auth "https://github.com/amaralcharle/p1app/blob/main/AuthContext.tsx"
click node_app_shell "https://github.com/amaralcharle/p1app/blob/main/app/(app)/_layout.tsx"
click node_dashboard "https://github.com/amaralcharle/p1app/blob/main/app/(app)/index.tsx"
click node_student_list "https://github.com/amaralcharle/p1app/blob/main/app/(app)/alunos.tsx"
click node_student_detail "https://github.com/amaralcharle/p1app/blob/main/app/(app)/aluno/%5Bid%5D.tsx"
click node_new_student "https://github.com/amaralcharle/p1app/blob/main/app/(app)/novo-aluno.tsx"
click node_grade_entry "https://github.com/amaralcharle/p1app/blob/main/app/(app)/notas.tsx"
click node_detail_grade_entry "https://github.com/amaralcharle/p1app/blob/main/app/(app)/aluno/%5Bid%5D.tsx"
click node_reports "https://github.com/amaralcharle/p1app/blob/main/app/(app)/relatorios.tsx"
click node_settings "https://github.com/amaralcharle/p1app/blob/main/app/(app)/config.tsx"
click node_students_context "https://github.com/amaralcharle/p1app/blob/main/StudentsContext.tsx"
click node_seed_data "https://github.com/amaralcharle/p1app/blob/main/dados.js"
click node_grade_logic "https://github.com/amaralcharle/p1app/blob/main/dados.js"
click node_theme "https://github.com/amaralcharle/p1app/blob/main/theme.ts"
click node_root_layout "https://github.com/amaralcharle/p1app/blob/main/app/_layout.tsx"

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_login,node_app_shell,node_settings,node_root_layout,node_user toneBlue
class node_student_list,node_student_detail,node_new_student toneAmber
class node_dashboard,node_grade_entry,node_detail_grade_entry,node_reports toneMint
class node_auth,node_students_context,node_seed_data,node_grade_logic,node_theme toneRose
```

## Components

### App access

- [Login screen](https://github.com/amaralcharle/p1app/blob/main/app/(auth)/login.tsx): `app/(auth)/login.tsx`
- [Authenticated routes](https://github.com/amaralcharle/p1app/blob/main/app/(app)/_layout.tsx): `app/(app)/_layout.tsx`
- [App settings](https://github.com/amaralcharle/p1app/blob/main/app/(app)/config.tsx): `app/(app)/config.tsx`
- [Root provider](https://github.com/amaralcharle/p1app/blob/main/app/_layout.tsx): `app/_layout.tsx`

### Student records

- [Student list](https://github.com/amaralcharle/p1app/blob/main/app/(app)/alunos.tsx): `app/(app)/alunos.tsx`
- [Student detail](https://github.com/amaralcharle/p1app/blob/main/app/(app)/aluno/%5Bid%5D.tsx): `app/(app)/aluno/[id].tsx`
- [Add student](https://github.com/amaralcharle/p1app/blob/main/app/(app)/novo-aluno.tsx): `app/(app)/novo-aluno.tsx`

### Academic performance

- [Dashboard](https://github.com/amaralcharle/p1app/blob/main/app/(app)/index.tsx): `app/(app)/index.tsx`
- [Grade entry](https://github.com/amaralcharle/p1app/blob/main/app/(app)/notas.tsx): `app/(app)/notas.tsx`
- [Student grade entry](https://github.com/amaralcharle/p1app/blob/main/app/(app)/aluno/%5Bid%5D.tsx): `app/(app)/aluno/[id].tsx`
- [Performance reports](https://github.com/amaralcharle/p1app/blob/main/app/(app)/relatorios.tsx): `app/(app)/relatorios.tsx`

### Shared state and logic

- [Local auth state](https://github.com/amaralcharle/p1app/blob/main/AuthContext.tsx): `AuthContext.tsx`
- [Student state](https://github.com/amaralcharle/p1app/blob/main/StudentsContext.tsx): `StudentsContext.tsx`
- [Sample students](https://github.com/amaralcharle/p1app/blob/main/dados.js): `dados.js`
- [Average and status](https://github.com/amaralcharle/p1app/blob/main/dados.js): `dados.js`
- [Visual theme](https://github.com/amaralcharle/p1app/blob/main/theme.ts): `theme.ts`

### Other components

- **App user**

## Connections

- App user → Login screen: opens app (evidence: `README.md`)
- Login screen → Local auth state: sets signed-in state (evidence: `app/(auth)/login.tsx`)
- Root provider → Local auth state: provides auth (evidence: `app/_layout.tsx`)
- Authenticated routes → Student state: provides student state (evidence: `app/(app)/_layout.tsx`)
- App user → Dashboard: views summary (evidence: `README.md`)
- Dashboard → Student state: reads students (evidence: `app/(app)/index.tsx`)
- Dashboard → Average and status: calculates summary (evidence: `app/(app)/index.tsx`)
- App user → Student list: manages students (evidence: `README.md`)
- Student list → Student state: reads students (evidence: `app/(app)/alunos.tsx`)
- Student list → Average and status: calculates status (evidence: `app/(app)/alunos.tsx`)
- App user → Add student: adds student (evidence: `README.md`)
- Add student → Student state: adds student (evidence: `app/(app)/novo-aluno.tsx`)
- App user → Student detail: opens student (evidence: `README.md`)
- Student detail → Student state: reads student (evidence: `app/(app)/aluno/[id].tsx`)
- App user → Grade entry: records grade (evidence: `README.md`)
- Grade entry → Student state: updates grade (evidence: `app/(app)/notas.tsx`)
- App user → Student grade entry: records grade (evidence: `README.md`)
- Student grade entry → Student state: updates grade (evidence: `app/(app)/aluno/[id].tsx`)
- App user → Performance reports: views reports (evidence: `README.md`)
- Performance reports → Student state: reads students (evidence: `app/(app)/relatorios.tsx`)
- Performance reports → Average and status: calculates averages (evidence: `app/(app)/relatorios.tsx`)
- Student state → Sample students: initializes from (evidence: `StudentsContext.tsx`)
- App user → App settings: opens settings
