# roquealvarez/proyecto-final-fastnota architecture

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

- Interactive diagram: https://gitdiagram.com/roquealvarez/proyecto-final-fastnota
- Repository: https://github.com/roquealvarez/proyecto-final-fastnota

## Overview

Bloc de notas is a React note-taking app backed by an Express REST API and JSON-file storage. The main workflow is to register or log in, enter the protected notes view, create and manage pending notes, then review completed notes on the profile page; users can also edit profile data. React context and its reducer hold the current user in memory. The README documents API capabilities and storage, but most page-to-API calls were not excerpted, so those links are shown as unverified. The route structure and sampled note/profile requests support the other connections.

Main entry points: [`src/App.jsx`](https://github.com/roquealvarez/proyecto-final-fastnota/blob/main/src/App.jsx) (Route application), [`backend/server.js`](https://github.com/roquealvarez/proyecto-final-fastnota/blob/main/backend/server.js) (REST API), [`src/context/Contexto.jsx`](https://github.com/roquealvarez/proyecto-final-fastnota/blob/main/src/context/Contexto.jsx) (Session context), [`src/pages/home.jsx`](https://github.com/roquealvarez/proyecto-final-fastnota/blob/main/src/pages/home.jsx) (Pending notes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["User experience"]
  node_app["Route application<br/>[App.jsx]"]
  node_home["Pending notes<br/>[home.jsx]"]
  node_profile["Completed notes<br/>[usuario.jsx]"]
end

subgraph group_identity["Identity and session"]
  node_editprofile["Edit profile<br/>[EditarPerfil.jsx]"]
  node_login["Sign in<br/>[login.jsx]"]
  node_register["Registration<br/>[registro.jsx]"]
  node_private["Private routes<br/>[RutasPrivadas.jsx]"]
  node_public["Public routes<br/>[RutasPublicas.jsx]"]
end

subgraph group_state["Session state"]
  node_context["Session context<br/>[Contexto.jsx]"]
  node_provider["Session provider<br/>[Provider.jsx]"]
  node_reducer["Session reducer<br/>[MiReducer.jsx]"]
  node_actiontypes["Action types<br/>[type.jsx]"]
end

subgraph group_service["API and storage"]
  node_api["REST API<br/>[server.js]"]
  node_store[("JSON data store<br/>[db.json]")]
end

node_user(("User"))

node_user -->|"uses"| node_app
node_app -->|"routes through"| node_private
node_app -->|"routes through"| node_public
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_profile
node_app -->|"routes to"| node_editprofile
node_app -->|"routes to"| node_login
node_app -->|"routes to"| node_register
node_private -->|"reads session"| node_context
node_public -->|"reads session"| node_context
node_provider -->|"provides value"| node_context
node_provider -->|"dispatches actions"| node_reducer
node_reducer -->|"uses types"| node_actiontypes
node_home -->|"reads session"| node_context
node_profile -->|"reads session"| node_context
node_editprofile -->|"reads session"| node_context
node_home -->|"requests notes"| node_api
node_profile -->|"requests notes"| node_api
node_editprofile -->|"updates profile"| node_api
node_login -.->|"authenticates"| node_api
node_register -.->|"registers account"| node_api
node_api -->|"reads and writes"| node_store

click node_app "https://github.com/roquealvarez/proyecto-final-fastnota/blob/main/src/App.jsx"
click node_home "https://github.com/roquealvarez/proyecto-final-fastnota/blob/main/src/pages/home.jsx"
click node_profile "https://github.com/roquealvarez/proyecto-final-fastnota/blob/main/src/pages/usuario.jsx"
click node_editprofile "https://github.com/roquealvarez/proyecto-final-fastnota/blob/main/src/pages/EditarPerfil.jsx"
click node_login "https://github.com/roquealvarez/proyecto-final-fastnota/blob/main/src/pages/login.jsx"
click node_register "https://github.com/roquealvarez/proyecto-final-fastnota/blob/main/src/pages/registro.jsx"
click node_private "https://github.com/roquealvarez/proyecto-final-fastnota/blob/main/src/routes/RutasPrivadas.jsx"
click node_public "https://github.com/roquealvarez/proyecto-final-fastnota/blob/main/src/routes/RutasPublicas.jsx"
click node_context "https://github.com/roquealvarez/proyecto-final-fastnota/blob/main/src/context/Contexto.jsx"
click node_provider "https://github.com/roquealvarez/proyecto-final-fastnota/blob/main/src/context/Provider.jsx"
click node_reducer "https://github.com/roquealvarez/proyecto-final-fastnota/blob/main/src/context/MiReducer.jsx"
click node_actiontypes "https://github.com/roquealvarez/proyecto-final-fastnota/blob/main/src/context/type.jsx"
click node_api "https://github.com/roquealvarez/proyecto-final-fastnota/blob/main/backend/server.js"
click node_store "https://github.com/roquealvarez/proyecto-final-fastnota/blob/main/backend/db.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_app,node_home,node_profile,node_user toneBlue
class node_editprofile,node_login,node_register,node_private,node_public toneAmber
class node_context,node_provider,node_reducer,node_actiontypes toneMint
class node_api,node_store toneRose
```

## Components

### User experience

- [Route application](https://github.com/roquealvarez/proyecto-final-fastnota/blob/main/src/App.jsx): `src/App.jsx`
- [Pending notes](https://github.com/roquealvarez/proyecto-final-fastnota/blob/main/src/pages/home.jsx): `src/pages/home.jsx`
- [Completed notes](https://github.com/roquealvarez/proyecto-final-fastnota/blob/main/src/pages/usuario.jsx): `src/pages/usuario.jsx`

### Identity and session

- [Edit profile](https://github.com/roquealvarez/proyecto-final-fastnota/blob/main/src/pages/EditarPerfil.jsx): `src/pages/EditarPerfil.jsx`
- [Sign in](https://github.com/roquealvarez/proyecto-final-fastnota/blob/main/src/pages/login.jsx): `src/pages/login.jsx`
- [Registration](https://github.com/roquealvarez/proyecto-final-fastnota/blob/main/src/pages/registro.jsx): `src/pages/registro.jsx`
- [Private routes](https://github.com/roquealvarez/proyecto-final-fastnota/blob/main/src/routes/RutasPrivadas.jsx): `src/routes/RutasPrivadas.jsx`
- [Public routes](https://github.com/roquealvarez/proyecto-final-fastnota/blob/main/src/routes/RutasPublicas.jsx): `src/routes/RutasPublicas.jsx`

### Session state

- [Session context](https://github.com/roquealvarez/proyecto-final-fastnota/blob/main/src/context/Contexto.jsx): `src/context/Contexto.jsx`
- [Session provider](https://github.com/roquealvarez/proyecto-final-fastnota/blob/main/src/context/Provider.jsx): `src/context/Provider.jsx`
- [Session reducer](https://github.com/roquealvarez/proyecto-final-fastnota/blob/main/src/context/MiReducer.jsx): `src/context/MiReducer.jsx`
- [Action types](https://github.com/roquealvarez/proyecto-final-fastnota/blob/main/src/context/type.jsx): `src/context/type.jsx`

### API and storage

- [REST API](https://github.com/roquealvarez/proyecto-final-fastnota/blob/main/backend/server.js): `backend/server.js`
- [JSON data store](https://github.com/roquealvarez/proyecto-final-fastnota/blob/main/backend/db.json): `backend/db.json`

### Other components

- **User**

## Connections

- User → Route application: uses (evidence: `src/App.jsx`)
- Route application → Private routes: routes through (evidence: `src/App.jsx`)
- Route application → Public routes: routes through (evidence: `src/App.jsx`)
- Route application → Pending notes: routes to (evidence: `src/App.jsx`)
- Route application → Completed notes: routes to (evidence: `src/App.jsx`)
- Route application → Edit profile: routes to (evidence: `src/App.jsx`)
- Route application → Sign in: routes to (evidence: `src/App.jsx`)
- Route application → Registration: routes to (evidence: `src/App.jsx`)
- Private routes → Session context: reads session (evidence: `src/routes/RutasPrivadas.jsx`)
- Public routes → Session context: reads session (evidence: `src/routes/RutasPublicas.jsx`)
- Session provider → Session context: provides value (evidence: `src/context/Provider.jsx`)
- Session provider → Session reducer: dispatches actions (evidence: `src/context/Provider.jsx`)
- Session reducer → Action types: uses types (evidence: `src/context/MiReducer.jsx`)
- Pending notes → Session context: reads session (evidence: `src/pages/home.jsx`)
- Completed notes → Session context: reads session (evidence: `src/pages/usuario.jsx`)
- Edit profile → Session context: reads session (evidence: `src/pages/EditarPerfil.jsx`)
- Pending notes → REST API: requests notes (evidence: `src/pages/home.jsx`)
- Completed notes → REST API: requests notes (evidence: `src/pages/usuario.jsx`)
- Edit profile → REST API: updates profile (evidence: `src/pages/EditarPerfil.jsx`)
- Sign in → REST API: authenticates
- Registration → REST API: registers account
- REST API → JSON data store: reads and writes (evidence: `README.md`)
