# ejarujogar-maker/pagina1 architecture

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

- Interactive diagram: https://gitdiagram.com/ejarujogar-maker/pagina1
- Repository: https://github.com/ejarujogar-maker/pagina1

## Overview

Leópolis is a Spanish-language literacy learning app. Learners follow a staged map of lessons and review challenges, complete activities and arcade games, and save progress; teachers and superadmins manage learners, reports, and custom content. The browser app communicates with a Node/Express server that validates progress and stores accounts and results in SQLite, with SMTP used for verification and recovery. Source excerpts are partial, so some subsystem links rely on README-described behavior rather than inspected call sites.

Main entry points: [`script.js`](https://github.com/ejarujogar-maker/pagina1/blob/main/script.js) (Learning app), [`server.js`](https://github.com/ejarujogar-maker/pagina1/blob/main/server.js) (API and access rules), [`teacher-dashboard.js`](https://github.com/ejarujogar-maker/pagina1/blob/main/teacher-dashboard.js) (Teacher dashboard), [`session-protection.js`](https://github.com/ejarujogar-maker/pagina1/blob/main/session-protection.js) (Session protection)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_learning["Learning experience"]
  node_web["Learning app<br/>[script.js]"]
  node_lesson_activity["Lesson activities<br/>[lesson-player.js]"]
  node_arcade["Arcade games<br/>[script.js]"]
  node_custom_game_play["Custom game play<br/>[custom-games.js]"]
end

subgraph group_teaching["Teaching tools"]
  node_teacher_dashboard["Teacher dashboard"]
  node_emoji_catalog["Emoji catalog<br/>[emoji-catalog.js]"]
end

subgraph group_platform["Application platform"]
  node_server["API and access rules<br/>[server.js]"]
  node_session_protection["Session protection"]
  node_database[("SQLite records<br/>[server.js]")]
end

subgraph group_content["Learning content"]
  node_learning_content["Learning path content"]
  node_arcade_content["Arcade content banks<br/>[arcade-content.js]"]
end

node_learner(("Learner"))
node_teacher(("Teacher / admin"))
node_email["SMTP email service"]

node_learner -->|"uses lessons"| node_web
node_teacher -->|"manages learning"| node_teacher_dashboard
node_web -->|"presents activities"| node_lesson_activity
node_web -->|"uses path"| node_learning_content
node_web -->|"opens games"| node_arcade
node_arcade -->|"draws game options"| node_arcade_content
node_teacher_dashboard -->|"selects emojis"| node_emoji_catalog
node_teacher_dashboard -->|"requests reports"| node_server
node_teacher_dashboard -->|"creates games"| node_custom_game_play
node_learner -->|"plays assigned games"| node_custom_game_play
node_web -->|"sends progress"| node_server
node_server -->|"checks prerequisites"| node_learning_content
node_server -->|"reads and writes"| node_database
node_server -->|"sends verification mail"| node_email
node_web -->|"enforces session limits"| node_session_protection
node_session_protection -->|"checks session"| node_server

click node_web "https://github.com/ejarujogar-maker/pagina1/blob/main/script.js"
click node_lesson_activity "https://github.com/ejarujogar-maker/pagina1/blob/main/lesson-player.js"
click node_arcade "https://github.com/ejarujogar-maker/pagina1/blob/main/script.js"
click node_custom_game_play "https://github.com/ejarujogar-maker/pagina1/blob/main/custom-games.js"
click node_learning_content "https://github.com/ejarujogar-maker/pagina1/blob/main/pedagogical-content.js"
click node_arcade_content "https://github.com/ejarujogar-maker/pagina1/blob/main/arcade-content.js"
click node_teacher_dashboard "https://github.com/ejarujogar-maker/pagina1/blob/main/teacher-dashboard.js"
click node_emoji_catalog "https://github.com/ejarujogar-maker/pagina1/blob/main/emoji-catalog.js"
click node_server "https://github.com/ejarujogar-maker/pagina1/blob/main/server.js"
click node_session_protection "https://github.com/ejarujogar-maker/pagina1/blob/main/session-protection.js"
click node_database "https://github.com/ejarujogar-maker/pagina1/blob/main/server.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_web,node_lesson_activity,node_arcade,node_custom_game_play toneBlue
class node_teacher_dashboard,node_emoji_catalog toneAmber
class node_server,node_session_protection,node_database toneMint
class node_learning_content,node_arcade_content toneRose
class node_learner,node_teacher,node_email toneIndigo
```

## Components

### Learning experience

- [Learning app](https://github.com/ejarujogar-maker/pagina1/blob/main/script.js): `script.js`
- [Lesson activities](https://github.com/ejarujogar-maker/pagina1/blob/main/lesson-player.js): `lesson-player.js`
- [Arcade games](https://github.com/ejarujogar-maker/pagina1/blob/main/script.js): `script.js`
- [Custom game play](https://github.com/ejarujogar-maker/pagina1/blob/main/custom-games.js): `custom-games.js`

### Teaching tools

- [Teacher dashboard](https://github.com/ejarujogar-maker/pagina1/blob/main/teacher-dashboard.js): `teacher-dashboard.js`
- [Emoji catalog](https://github.com/ejarujogar-maker/pagina1/blob/main/emoji-catalog.js): `emoji-catalog.js`

### Application platform

- [API and access rules](https://github.com/ejarujogar-maker/pagina1/blob/main/server.js): `server.js`
- [Session protection](https://github.com/ejarujogar-maker/pagina1/blob/main/session-protection.js): `session-protection.js`
- [SQLite records](https://github.com/ejarujogar-maker/pagina1/blob/main/server.js): `server.js`

### Learning content

- [Learning path content](https://github.com/ejarujogar-maker/pagina1/blob/main/pedagogical-content.js): `pedagogical-content.js`
- [Arcade content banks](https://github.com/ejarujogar-maker/pagina1/blob/main/arcade-content.js): `arcade-content.js`

### Other components

- **Learner**
- **Teacher / admin**
- **SMTP email service**

## Connections

- Learner → Learning app: uses lessons (evidence: `README.md`)
- Teacher / admin → Teacher dashboard: manages learning (evidence: `README.md`)
- Learning app → Lesson activities: presents activities (evidence: `README.md`)
- Learning app → Learning path content: uses path (evidence: `README.md`)
- Learning app → Arcade games: opens games (evidence: `README.md`)
- Arcade games → Arcade content banks: draws game options (evidence: `script.js`)
- Teacher dashboard → Emoji catalog: selects emojis (evidence: `teacher-dashboard.js`)
- Teacher dashboard → API and access rules: requests reports (evidence: `README.md`)
- Teacher dashboard → Custom game play: creates games (evidence: `README.md`)
- Learner → Custom game play: plays assigned games (evidence: `README.md`)
- Learning app → API and access rules: sends progress (evidence: `README.md`)
- API and access rules → Learning path content: checks prerequisites (evidence: `server.js`)
- API and access rules → SQLite records: reads and writes (evidence: `README.md`)
- API and access rules → SMTP email service: sends verification mail (evidence: `README.md`)
- Learning app → Session protection: enforces session limits (evidence: `README.md`)
- Session protection → API and access rules: checks session (evidence: `session-protection.js`)
