# lenicfu/notas architecture

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

- Interactive diagram: https://gitdiagram.com/lenicfu/notas
- Repository: https://github.com/lenicfu/notas

## Overview

This is a React Native app for recording and managing student assessment results. The main user flow selects a school and year, scans student codes, reviews and confirms records, then manages saved lists; a separate second-stage workflow filters results by center and year and supports editing and export. The graph also includes shared state and SQLite persistence. The excerpts do not show the scanner-to-review transitions or the email implementation, so those links are omitted rather than assumed.

Main entry points: [`src/manager/index.js`](https://github.com/lenicfu/notas/blob/main/src/manager/index.js) (Screen router), [`src/screens/segundaEtapa.js`](https://github.com/lenicfu/notas/blob/main/src/screens/segundaEtapa.js) (Second-stage screen), [`src/screens/home.js`](https://github.com/lenicfu/notas/blob/main/src/screens/home.js) (Home and setup), [`src/context/index.js`](https://github.com/lenicfu/notas/blob/main/src/context/index.js) (Shared app state)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App navigation"]
  node_manager["Screen router<br/>[index.js]"]
end

subgraph group_assessment["Assessment workflow"]
  node_home["Home and setup<br/>[home.js]"]
  node_scanner["Barcode scanner<br/>[cam.js]"]
  node_review["Scan review<br/>[scanned.js]"]
  node_confirm["Record confirmation<br/>[confirmacao.js]"]
  node_grades["Grade entry<br/>[notas.js]"]
  node_savedlists["Saved lists<br/>[listas.js]"]
  node_ordered["Sorted results<br/>[listaOrdenada.js]"]
  node_edit["Record editing<br/>[editar.js]"]
  node_lookup["Student lookup<br/>[functions.js]"]
  node_modals["Workflow dialogs<br/>[index.js]"]
end

subgraph group_second["Second stage"]
  node_second["Second-stage screen<br/>[segundaEtapa.js]"]
  node_center["Center selection<br/>[centro.js]"]
  node_year["Year selection<br/>[ano.js]"]
  node_secondlists["Second-stage lists"]
  node_secondops["Second-stage transforms<br/>[functions.js]"]
end

subgraph group_shared["State and persistence"]
  node_state["Shared app state<br/>[index.js]"]
  node_mainstore[("Assessment database<br/>[index.js]")]
  node_secondstore[("Second-stage database")]
  node_userdata["Bundled student data<br/>[listaAlunos.json]"]
end

node_user(("User"))

node_manager -->|"routes to"| node_home
node_manager -->|"routes to"| node_scanner
node_manager -->|"routes to"| node_review
node_manager -->|"routes to"| node_confirm
node_manager -->|"routes to"| node_grades
node_manager -->|"routes to"| node_savedlists
node_manager -->|"routes to"| node_ordered
node_manager -->|"routes to"| node_edit
node_manager -->|"routes to"| node_second
node_manager -->|"reads screen"| node_state
node_home -->|"reads and updates"| node_state
node_home -->|"loads records"| node_mainstore
node_home -->|"renders dialogs"| node_modals
node_second -->|"reads and updates"| node_state
node_second -->|"reads records"| node_secondstore
node_second -->|"formats export"| node_secondops
node_second -->|"renders"| node_center
node_second -->|"renders"| node_year
node_second -->|"renders"| node_secondlists
node_secondlists -->|"reads and updates"| node_state
node_secondlists -->|"edits records"| node_secondstore
node_state -->|"loads data"| node_userdata
node_user -.->|"selects and starts"| node_home

click node_manager "https://github.com/lenicfu/notas/blob/main/src/manager/index.js"
click node_home "https://github.com/lenicfu/notas/blob/main/src/screens/home.js"
click node_scanner "https://github.com/lenicfu/notas/blob/main/src/screens/cam.js"
click node_review "https://github.com/lenicfu/notas/blob/main/src/screens/scanned.js"
click node_confirm "https://github.com/lenicfu/notas/blob/main/src/screens/confirmacao.js"
click node_grades "https://github.com/lenicfu/notas/blob/main/src/screens/notas.js"
click node_savedlists "https://github.com/lenicfu/notas/blob/main/src/screens/listas.js"
click node_ordered "https://github.com/lenicfu/notas/blob/main/src/screens/listaOrdenada.js"
click node_edit "https://github.com/lenicfu/notas/blob/main/src/components/editar.js"
click node_lookup "https://github.com/lenicfu/notas/blob/main/src/components/functions.js"
click node_modals "https://github.com/lenicfu/notas/blob/main/src/components/modais/index.js"
click node_second "https://github.com/lenicfu/notas/blob/main/src/screens/segundaEtapa.js"
click node_center "https://github.com/lenicfu/notas/blob/main/src/components/segundaEtapa/centro.js"
click node_year "https://github.com/lenicfu/notas/blob/main/src/components/segundaEtapa/ano.js"
click node_secondlists "https://github.com/lenicfu/notas/blob/main/src/components/segundaEtapa/listasSegundaEtapa.js"
click node_secondops "https://github.com/lenicfu/notas/blob/main/src/components/segundaEtapa/functions.js"
click node_state "https://github.com/lenicfu/notas/blob/main/src/context/index.js"
click node_mainstore "https://github.com/lenicfu/notas/blob/main/src/data/index.js"
click node_secondstore "https://github.com/lenicfu/notas/blob/main/src/data/dataSegundaEtapa.js"
click node_userdata "https://github.com/lenicfu/notas/blob/main/src/data/listaAlunos.json"

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_manager,node_user toneBlue
class node_home,node_scanner,node_review,node_confirm,node_grades,node_savedlists,node_ordered,node_edit,node_lookup,node_modals toneAmber
class node_second,node_center,node_year,node_secondlists,node_secondops toneMint
class node_state,node_mainstore,node_secondstore,node_userdata toneRose
```

## Components

### App navigation

- [Screen router](https://github.com/lenicfu/notas/blob/main/src/manager/index.js): `src/manager/index.js`

### Assessment workflow

- [Home and setup](https://github.com/lenicfu/notas/blob/main/src/screens/home.js): `src/screens/home.js`
- [Barcode scanner](https://github.com/lenicfu/notas/blob/main/src/screens/cam.js): `src/screens/cam.js`
- [Scan review](https://github.com/lenicfu/notas/blob/main/src/screens/scanned.js): `src/screens/scanned.js`
- [Record confirmation](https://github.com/lenicfu/notas/blob/main/src/screens/confirmacao.js): `src/screens/confirmacao.js`
- [Grade entry](https://github.com/lenicfu/notas/blob/main/src/screens/notas.js): `src/screens/notas.js`
- [Saved lists](https://github.com/lenicfu/notas/blob/main/src/screens/listas.js): `src/screens/listas.js`
- [Sorted results](https://github.com/lenicfu/notas/blob/main/src/screens/listaOrdenada.js): `src/screens/listaOrdenada.js`
- [Record editing](https://github.com/lenicfu/notas/blob/main/src/components/editar.js): `src/components/editar.js`
- [Student lookup](https://github.com/lenicfu/notas/blob/main/src/components/functions.js): `src/components/functions.js`
- [Workflow dialogs](https://github.com/lenicfu/notas/blob/main/src/components/modais/index.js): `src/components/modais/index.js`

### Second stage

- [Second-stage screen](https://github.com/lenicfu/notas/blob/main/src/screens/segundaEtapa.js): `src/screens/segundaEtapa.js`
- [Center selection](https://github.com/lenicfu/notas/blob/main/src/components/segundaEtapa/centro.js): `src/components/segundaEtapa/centro.js`
- [Year selection](https://github.com/lenicfu/notas/blob/main/src/components/segundaEtapa/ano.js): `src/components/segundaEtapa/ano.js`
- [Second-stage lists](https://github.com/lenicfu/notas/blob/main/src/components/segundaEtapa/listasSegundaEtapa.js): `src/components/segundaEtapa/listasSegundaEtapa.js`
- [Second-stage transforms](https://github.com/lenicfu/notas/blob/main/src/components/segundaEtapa/functions.js): `src/components/segundaEtapa/functions.js`

### State and persistence

- [Shared app state](https://github.com/lenicfu/notas/blob/main/src/context/index.js): `src/context/index.js`
- [Assessment database](https://github.com/lenicfu/notas/blob/main/src/data/index.js): `src/data/index.js`
- [Second-stage database](https://github.com/lenicfu/notas/blob/main/src/data/dataSegundaEtapa.js): `src/data/dataSegundaEtapa.js`
- [Bundled student data](https://github.com/lenicfu/notas/blob/main/src/data/listaAlunos.json): `src/data/listaAlunos.json`

### Other components

- **User**

## Connections

- Screen router → Home and setup: routes to (evidence: `src/manager/index.js`)
- Screen router → Barcode scanner: routes to (evidence: `src/manager/index.js`)
- Screen router → Scan review: routes to (evidence: `src/manager/index.js`)
- Screen router → Record confirmation: routes to (evidence: `src/manager/index.js`)
- Screen router → Grade entry: routes to (evidence: `src/manager/index.js`)
- Screen router → Saved lists: routes to (evidence: `src/manager/index.js`)
- Screen router → Sorted results: routes to (evidence: `src/manager/index.js`)
- Screen router → Record editing: routes to (evidence: `src/manager/index.js`)
- Screen router → Second-stage screen: routes to (evidence: `src/manager/index.js`)
- Screen router → Shared app state: reads screen (evidence: `src/manager/index.js`)
- Home and setup → Shared app state: reads and updates (evidence: `src/screens/home.js`)
- Home and setup → Assessment database: loads records (evidence: `src/screens/home.js`)
- Home and setup → Workflow dialogs: renders dialogs (evidence: `src/screens/home.js`)
- Second-stage screen → Shared app state: reads and updates (evidence: `src/screens/segundaEtapa.js`)
- Second-stage screen → Second-stage database: reads records (evidence: `src/screens/segundaEtapa.js`)
- Second-stage screen → Second-stage transforms: formats export (evidence: `src/screens/segundaEtapa.js`)
- Second-stage screen → Center selection: renders (evidence: `src/screens/segundaEtapa.js`)
- Second-stage screen → Year selection: renders (evidence: `src/screens/segundaEtapa.js`)
- Second-stage screen → Second-stage lists: renders (evidence: `src/screens/segundaEtapa.js`)
- Second-stage lists → Shared app state: reads and updates (evidence: `src/components/segundaEtapa/listasSegundaEtapa.js`)
- Second-stage lists → Second-stage database: edits records (evidence: `src/components/segundaEtapa/listasSegundaEtapa.js`)
- Shared app state → Bundled student data: loads data (evidence: `src/context/index.js`)
- User → Home and setup: selects and starts
