# jmgsalaices/challenge-mi-app-front architecture

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

- Interactive diagram: https://gitdiagram.com/jmgsalaices/challenge-mi-app-front
- Repository: https://github.com/jmgsalaices/challenge-mi-app-front

## Overview

MyApp is an Angular frontend for signing in and managing applications. The main workflow is login, token storage, authenticated application retrieval, and opening a form to submit a request, offer, or complaint. Routing also exposes the application list and new-application dialog as separate routes. The excerpts establish frontend calls to backend endpoints but do not show backend behavior; list refresh after submission is not implemented in the sampled code. Relationships for root-template rendering and user interaction are therefore omitted.

Main entry points: [`src/app/app.routes.ts`](https://github.com/jmgsalaices/challenge-mi-app-front/blob/main/src/app/app.routes.ts) (Page routes), [`src/app/auth/login/login.ts`](https://github.com/jmgsalaices/challenge-mi-app-front/blob/main/src/app/auth/login/login.ts) (Login page), [`src/app/auth/authService.ts`](https://github.com/jmgsalaices/challenge-mi-app-front/blob/main/src/app/auth/authService.ts) (Auth service), [`src/app/applications/list/list.ts`](https://github.com/jmgsalaices/challenge-mi-app-front/blob/main/src/app/applications/list/list.ts) (Applications list)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application shell"]
  node_bootstrap["App bootstrap<br/>[main.ts]"]
  node_shell["Root component<br/>[app.ts]"]
  node_routes["Page routes<br/>[app.routes.ts]"]
end

subgraph group_auth["Authentication"]
  node_login["Login page<br/>[login.ts]"]
  node_auth_service["Auth service<br/>[authService.ts]"]
  node_interceptor["Auth interceptor"]
  node_token_store[("Browser token storage")]
end

subgraph group_applications["Application management"]
  node_applications_list["Applications list<br/>[list.ts]"]
  node_application_service["Application service"]
  node_new_dialog["New application form"]
end

node_user(("Browser user"))
node_auth_api{{"Auth API"}}
node_applications_api{{"Applications API"}}

node_bootstrap -->|"bootstraps"| node_shell
node_bootstrap -->|"provides routes"| node_routes
node_bootstrap -->|"registers"| node_interceptor
node_routes -->|"routes to"| node_login
node_routes -->|"routes to"| node_applications_list
node_routes -->|"routes to"| node_new_dialog
node_login -->|"logs in through"| node_auth_service
node_login -->|"navigates via"| node_routes
node_auth_service -->|"posts credentials"| node_auth_api
node_auth_service -->|"reads and writes"| node_token_store
node_interceptor -->|"reads token"| node_auth_service
node_applications_list -->|"loads applications"| node_application_service
node_applications_list -->|"opens dialog"| node_new_dialog
node_new_dialog -->|"creates application"| node_application_service
node_application_service -->|"gets and posts"| node_applications_api
node_user -.->|"uses"| node_login
node_user -.->|"uses"| node_applications_list

click node_bootstrap "https://github.com/jmgsalaices/challenge-mi-app-front/blob/main/src/main.ts"
click node_shell "https://github.com/jmgsalaices/challenge-mi-app-front/blob/main/src/app/app.ts"
click node_routes "https://github.com/jmgsalaices/challenge-mi-app-front/blob/main/src/app/app.routes.ts"
click node_login "https://github.com/jmgsalaices/challenge-mi-app-front/blob/main/src/app/auth/login/login.ts"
click node_auth_service "https://github.com/jmgsalaices/challenge-mi-app-front/blob/main/src/app/auth/authService.ts"
click node_interceptor "https://github.com/jmgsalaices/challenge-mi-app-front/blob/main/src/app/auth.interceptor.ts"
click node_applications_list "https://github.com/jmgsalaices/challenge-mi-app-front/blob/main/src/app/applications/list/list.ts"
click node_application_service "https://github.com/jmgsalaices/challenge-mi-app-front/blob/main/src/app/applications/applicationService.ts"
click node_new_dialog "https://github.com/jmgsalaices/challenge-mi-app-front/blob/main/src/app/new-application-dialog/new-application-dialog.component.ts"

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_bootstrap,node_shell,node_routes,node_user toneBlue
class node_login,node_auth_service,node_interceptor,node_token_store toneAmber
class node_applications_list,node_application_service,node_new_dialog,node_auth_api,node_applications_api toneMint
```

## Components

### Application shell

- [App bootstrap](https://github.com/jmgsalaices/challenge-mi-app-front/blob/main/src/main.ts): `src/main.ts`
- [Root component](https://github.com/jmgsalaices/challenge-mi-app-front/blob/main/src/app/app.ts): `src/app/app.ts`
- [Page routes](https://github.com/jmgsalaices/challenge-mi-app-front/blob/main/src/app/app.routes.ts): `src/app/app.routes.ts`

### Authentication

- [Login page](https://github.com/jmgsalaices/challenge-mi-app-front/blob/main/src/app/auth/login/login.ts): `src/app/auth/login/login.ts`
- [Auth service](https://github.com/jmgsalaices/challenge-mi-app-front/blob/main/src/app/auth/authService.ts): `src/app/auth/authService.ts`
- [Auth interceptor](https://github.com/jmgsalaices/challenge-mi-app-front/blob/main/src/app/auth.interceptor.ts): `src/app/auth.interceptor.ts`
- **Browser token storage**

### Application management

- [Applications list](https://github.com/jmgsalaices/challenge-mi-app-front/blob/main/src/app/applications/list/list.ts): `src/app/applications/list/list.ts`
- [Application service](https://github.com/jmgsalaices/challenge-mi-app-front/blob/main/src/app/applications/applicationService.ts): `src/app/applications/applicationService.ts`
- [New application form](https://github.com/jmgsalaices/challenge-mi-app-front/blob/main/src/app/new-application-dialog/new-application-dialog.component.ts): `src/app/new-application-dialog/new-application-dialog.component.ts`

### Other components

- **Browser user**
- **Auth API**
- **Applications API**

## Connections

- App bootstrap → Root component: bootstraps (evidence: `src/main.ts`)
- App bootstrap → Page routes: provides routes (evidence: `src/main.ts`)
- App bootstrap → Auth interceptor: registers (evidence: `src/main.ts`)
- Page routes → Login page: routes to (evidence: `src/app/app.routes.ts`)
- Page routes → Applications list: routes to (evidence: `src/app/app.routes.ts`)
- Page routes → New application form: routes to (evidence: `src/app/app.routes.ts`)
- Login page → Auth service: logs in through (evidence: `src/app/auth/login/login.ts`)
- Login page → Page routes: navigates via (evidence: `src/app/auth/login/login.ts`)
- Auth service → Auth API: posts credentials (evidence: `src/app/auth/authService.ts`)
- Auth service → Browser token storage: reads and writes (evidence: `src/app/auth/authService.ts`)
- Auth interceptor → Auth service: reads token (evidence: `src/app/auth.interceptor.ts`)
- Applications list → Application service: loads applications (evidence: `src/app/applications/list/list.ts`)
- Applications list → New application form: opens dialog (evidence: `src/app/applications/list/list.ts`)
- New application form → Application service: creates application (evidence: `src/app/new-application-dialog/new-application-dialog.component.ts`)
- Application service → Applications API: gets and posts (evidence: `src/app/applications/applicationService.ts`)
- Browser user → Login page: uses
- Browser user → Applications list: uses
