# nunofernandes2000/react architecture

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

- Interactive diagram: https://gitdiagram.com/nunofernandes2000/react
- Repository: https://github.com/nunofernandes2000/react

## Overview

#### Purpose and Runtime
This is a Vite-based React single-page application for an informatics engineering project. It has student (`Aluno`) and teacher (`Docente`) dashboard/exercise views, plus login and registration. Browser execution starts through Vite’s React entry module: `src/main.jsx` or the parallel TypeScript entry `src/main.tsx`.

#### Application Bootstrap
The root application component is implemented in both JavaScript and TypeScript variants: `src/App.jsx` and `src/App.tsx`. These are expected to own the top-level UI composition, page selection/routing state, and global layout styling, with base styles in `src/App.css`. The HTML host document is `index.html`.

#### Authentication and Access Boundary
Authentication-facing screens are separated into `src/pages/Login.jsx` and `src/pages/Register.jsx`, with login-specific presentation in `src/pages/Login.css`. These pages form the user-entry boundary before access to role-oriented student or teacher experiences. No router or authentication provider is present in the supplied tree, so navigation and session handling likely remain local to the app/page layer.

#### Role-Specific Dashboards
The main post-login experiences are divided by actor:
- Student dashboard: `src/pages/DashboardAluno.jsx`
- Teacher dashboard: `src/pages/DashboardDocente.jsx`

This split is the primary domain boundary: each role can receive separate data loading, actions, and navigation while sharing the top-level application shell.

#### Exercise Workflow
Student exercise interaction is isolated in `src/pages/AlunoExercicio.jsx`. It likely represents the detailed exercise stage reached from the student dashboard, handling answer/progress state and exercise-specific UI. Reusable progress visualization is provided by `src/components/ProgressBar.jsx` with `src/components/ProgressBar.css`.

#### API and External-Service Boundary
`src/api/http.js` is the centralized HTTP boundary for browser-to-backend communication. Page-level features should depend on this module rather than embed transport details, allowing shared base URLs, headers, authentication tokens, error handling, and request conventions. The backend API itself is not included in this repository.

#### Shared Feedback Components
Cross-page UI feedback is componentized:
- Progress display: `src/components/ProgressBar.jsx`
- Transient notifications: `src/components/Toast.jsx`

These components should receive state from pages or the application shell rather than directly owning domain/API workflows, keeping UI feedback separate from role and exercise logic.

Main entry points: [`src/App.jsx`](https://github.com/nunofernandes2000/react/blob/main/src/App.jsx) (App Shell (JS)), [`src/api/http.js`](https://github.com/nunofernandes2000/react/blob/main/src/api/http.js) (HTTP Client), [`src/pages/DashboardAluno.jsx`](https://github.com/nunofernandes2000/react/blob/main/src/pages/DashboardAluno.jsx) (Student Dashboard), [`src/App.tsx`](https://github.com/nunofernandes2000/react/blob/main/src/App.tsx) (App Shell (TS))

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Browser Runtime"]
  node_html["HTML Host<br/>host document<br/>[index.html]"]
  node_main_js["React Entry &#40;JS&#41;<br/>Vite entry<br/>[main.jsx]"]
  node_main_ts["React Entry &#40;TS&#41;<br/>Vite entry<br/>[main.tsx]"]
  node_app_js["App Shell &#40;JS&#41;<br/>root component<br/>[App.jsx]"]
  node_app_ts["App Shell &#40;TS&#41;<br/>root component<br/>[App.tsx]"]
end

subgraph group_access["Access Screens"]
  node_login["Login<br/>page<br/>[Login.jsx]"]
  node_register["Register<br/>page<br/>[Register.jsx]"]
end

subgraph group_roles["Role Experiences"]
  node_student_dashboard["Student Dashboard<br/>role page<br/>[DashboardAluno.jsx]"]
  node_teacher_dashboard["Teacher Dashboard<br/>role page"]
  node_exercise["Student Exercise<br/>workflow page<br/>[AlunoExercicio.jsx]"]
end

subgraph group_shared["Shared UI &amp; API"]
  node_http{{"HTTP Client<br/>API boundary<br/>[http.js]"}}
  node_progress["Progress Bar<br/>feedback component<br/>[ProgressBar.jsx]"]
  node_toast["Toast<br/>feedback component<br/>[Toast.jsx]"]
end

node_html -.->|"loads"| node_main_js
node_html -.->|"loads"| node_main_ts
node_main_js -->|"mounts"| node_app_js
node_main_ts -->|"mounts"| node_app_ts
node_app_js -->|"selects view"| node_login
node_app_js -->|"selects view"| node_register
node_app_js -->|"selects role view"| node_student_dashboard
node_app_js -->|"selects role view"| node_teacher_dashboard
node_app_ts -.->|"selects view"| node_login
node_app_ts -.->|"selects role view"| node_student_dashboard
node_student_dashboard -->|"opens exercise"| node_exercise
node_login -->|"auth requests"| node_http
node_register -->|"registration requests"| node_http
node_student_dashboard -->|"loads student data"| node_http
node_teacher_dashboard -->|"loads teacher data"| node_http
node_exercise -->|"loads or submits work"| node_http
node_exercise -->|"renders progress"| node_progress
node_app_js -->|"shows feedback"| node_toast

click node_html "https://github.com/nunofernandes2000/react/blob/main/index.html"
click node_main_js "https://github.com/nunofernandes2000/react/blob/main/src/main.jsx"
click node_main_ts "https://github.com/nunofernandes2000/react/blob/main/src/main.tsx"
click node_app_js "https://github.com/nunofernandes2000/react/blob/main/src/App.jsx"
click node_app_ts "https://github.com/nunofernandes2000/react/blob/main/src/App.tsx"
click node_login "https://github.com/nunofernandes2000/react/blob/main/src/pages/Login.jsx"
click node_register "https://github.com/nunofernandes2000/react/blob/main/src/pages/Register.jsx"
click node_student_dashboard "https://github.com/nunofernandes2000/react/blob/main/src/pages/DashboardAluno.jsx"
click node_teacher_dashboard "https://github.com/nunofernandes2000/react/blob/main/src/pages/DashboardDocente.jsx"
click node_exercise "https://github.com/nunofernandes2000/react/blob/main/src/pages/AlunoExercicio.jsx"
click node_http "https://github.com/nunofernandes2000/react/blob/main/src/api/http.js"
click node_progress "https://github.com/nunofernandes2000/react/blob/main/src/components/ProgressBar.jsx"
click node_toast "https://github.com/nunofernandes2000/react/blob/main/src/components/Toast.jsx"

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_html,node_main_js,node_main_ts,node_app_js,node_app_ts toneBlue
class node_login,node_register toneAmber
class node_student_dashboard,node_teacher_dashboard,node_exercise toneMint
class node_http,node_progress,node_toast toneRose
```

## Components

### Browser Runtime

- [HTML Host](https://github.com/nunofernandes2000/react/blob/main/index.html): host document · `index.html`
- [React Entry (JS)](https://github.com/nunofernandes2000/react/blob/main/src/main.jsx): Vite entry · `src/main.jsx`
- [React Entry (TS)](https://github.com/nunofernandes2000/react/blob/main/src/main.tsx): Vite entry · Parallel TypeScript entry variant. · `src/main.tsx`
- [App Shell (JS)](https://github.com/nunofernandes2000/react/blob/main/src/App.jsx): root component · Owns top-level composition and page state. · `src/App.jsx`
- [App Shell (TS)](https://github.com/nunofernandes2000/react/blob/main/src/App.tsx): root component · Parallel TypeScript app-shell variant. · `src/App.tsx`

### Access Screens

- [Login](https://github.com/nunofernandes2000/react/blob/main/src/pages/Login.jsx): page · User-entry boundary. · `src/pages/Login.jsx`
- [Register](https://github.com/nunofernandes2000/react/blob/main/src/pages/Register.jsx): page · `src/pages/Register.jsx`

### Role Experiences

- [Student Dashboard](https://github.com/nunofernandes2000/react/blob/main/src/pages/DashboardAluno.jsx): role page · `src/pages/DashboardAluno.jsx`
- [Teacher Dashboard](https://github.com/nunofernandes2000/react/blob/main/src/pages/DashboardDocente.jsx): role page · `src/pages/DashboardDocente.jsx`
- [Student Exercise](https://github.com/nunofernandes2000/react/blob/main/src/pages/AlunoExercicio.jsx): workflow page · Handles exercise answers and progress. · `src/pages/AlunoExercicio.jsx`

### Shared UI & API

- [HTTP Client](https://github.com/nunofernandes2000/react/blob/main/src/api/http.js): API boundary · Centralizes browser-to-backend requests. · `src/api/http.js`
- [Progress Bar](https://github.com/nunofernandes2000/react/blob/main/src/components/ProgressBar.jsx): feedback component · `src/components/ProgressBar.jsx`
- [Toast](https://github.com/nunofernandes2000/react/blob/main/src/components/Toast.jsx): feedback component · Transient cross-page notifications. · `src/components/Toast.jsx`

## Connections

- HTML Host → React Entry (JS): loads
- HTML Host → React Entry (TS): loads · Alternative entry variant.
- React Entry (JS) → App Shell (JS): mounts
- React Entry (TS) → App Shell (TS): mounts
- App Shell (JS) → Login: selects view
- App Shell (JS) → Register: selects view
- App Shell (JS) → Student Dashboard: selects role view
- App Shell (JS) → Teacher Dashboard: selects role view
- App Shell (TS) → Login: selects view
- App Shell (TS) → Student Dashboard: selects role view
- Student Dashboard → Student Exercise: opens exercise
- Login → HTTP Client: auth requests
- Register → HTTP Client: registration requests
- Student Dashboard → HTTP Client: loads student data
- Teacher Dashboard → HTTP Client: loads teacher data
- Student Exercise → HTTP Client: loads or submits work
- Student Exercise → Progress Bar: renders progress
- App Shell (JS) → Toast: shows feedback
