# faizalfc/boliae architecture

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

- Interactive diagram: https://gitdiagram.com/faizalfc/boliae
- Repository: https://github.com/faizalfc/boliae

## Overview

BoliAE is a small React catalog dashboard with demo authentication. The user signs in through the login page; the auth context checks the mock API and persists the session in browser storage. The router protects the dashboard, which loads and filters a mock catalog for display and offers logout. The graph reflects the sampled source; the README gives no further product details, and the API is mock data rather than a shown external backend.

Main entry points: [`src/auth/AuthContext.jsx`](https://github.com/faizalfc/boliae/blob/main/src/auth/AuthContext.jsx) (Auth Context), [`src/App.jsx`](https://github.com/faizalfc/boliae/blob/main/src/App.jsx) (Router & App), [`src/pages/Dashboard.jsx`](https://github.com/faizalfc/boliae/blob/main/src/pages/Dashboard.jsx) (Catalog Dashboard), [`src/pages/Login.jsx`](https://github.com/faizalfc/boliae/blob/main/src/pages/Login.jsx) (Login Page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Application Runtime"]
  node_entry["React Entry<br/>[main.jsx]"]
  node_app["Router &amp; App<br/>[App.jsx]"]
end

subgraph group_auth["Authentication"]
  node_login["Login Page<br/>[Login.jsx]"]
  node_guard["Route Guard<br/>[ProtectedRoute.jsx]"]
  node_session["Auth Context<br/>[AuthContext.jsx]"]
  node_storage[("Browser Storage")]
end

subgraph group_catalog["Catalog"]
  node_mockapi["Mock API &amp; Data<br/>[api.js]"]
  node_dashboard["Catalog Dashboard<br/>[Dashboard.jsx]"]
end

node_user(("User"))

node_entry -->|"renders"| node_app
node_app -->|"provides auth"| node_session
node_app -->|"routes to"| node_login
node_app -->|"protects route"| node_guard
node_app -->|"routes to"| node_dashboard
node_user -->|"submits credentials"| node_login
node_login -->|"calls login"| node_session
node_session -->|"checks credentials"| node_mockapi
node_session -->|"reads and writes"| node_storage
node_guard -->|"checks session"| node_session
node_user -->|"searches and logs out"| node_dashboard
node_dashboard -->|"reads user, logs out"| node_session
node_dashboard -->|"loads catalog"| node_mockapi

click node_entry "https://github.com/faizalfc/boliae/blob/main/src/main.jsx"
click node_app "https://github.com/faizalfc/boliae/blob/main/src/App.jsx"
click node_login "https://github.com/faizalfc/boliae/blob/main/src/pages/Login.jsx"
click node_guard "https://github.com/faizalfc/boliae/blob/main/src/components/ProtectedRoute.jsx"
click node_session "https://github.com/faizalfc/boliae/blob/main/src/auth/AuthContext.jsx"
click node_mockapi "https://github.com/faizalfc/boliae/blob/main/src/api.js"
click node_dashboard "https://github.com/faizalfc/boliae/blob/main/src/pages/Dashboard.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_entry,node_app,node_user toneBlue
class node_login,node_guard,node_session,node_storage toneAmber
class node_mockapi,node_dashboard toneMint
```

## Components

### Application Runtime

- [React Entry](https://github.com/faizalfc/boliae/blob/main/src/main.jsx): `src/main.jsx`
- [Router & App](https://github.com/faizalfc/boliae/blob/main/src/App.jsx): `src/App.jsx`

### Authentication

- [Login Page](https://github.com/faizalfc/boliae/blob/main/src/pages/Login.jsx): `src/pages/Login.jsx`
- [Route Guard](https://github.com/faizalfc/boliae/blob/main/src/components/ProtectedRoute.jsx): `src/components/ProtectedRoute.jsx`
- [Auth Context](https://github.com/faizalfc/boliae/blob/main/src/auth/AuthContext.jsx): `src/auth/AuthContext.jsx`
- **Browser Storage**

### Catalog

- [Mock API & Data](https://github.com/faizalfc/boliae/blob/main/src/api.js): `src/api.js`
- [Catalog Dashboard](https://github.com/faizalfc/boliae/blob/main/src/pages/Dashboard.jsx): `src/pages/Dashboard.jsx`

### Other components

- **User**

## Connections

- React Entry → Router & App: renders (evidence: `src/main.jsx`)
- Router & App → Auth Context: provides auth (evidence: `src/App.jsx`)
- Router & App → Login Page: routes to (evidence: `src/App.jsx`)
- Router & App → Route Guard: protects route (evidence: `src/App.jsx`)
- Router & App → Catalog Dashboard: routes to (evidence: `src/App.jsx`)
- User → Login Page: submits credentials (evidence: `src/pages/Login.jsx`)
- Login Page → Auth Context: calls login (evidence: `src/pages/Login.jsx`)
- Auth Context → Mock API & Data: checks credentials (evidence: `src/auth/AuthContext.jsx`)
- Auth Context → Browser Storage: reads and writes (evidence: `src/auth/AuthContext.jsx`)
- Route Guard → Auth Context: checks session (evidence: `src/components/ProtectedRoute.jsx`)
- User → Catalog Dashboard: searches and logs out (evidence: `src/pages/Dashboard.jsx`)
- Catalog Dashboard → Auth Context: reads user, logs out (evidence: `src/pages/Dashboard.jsx`)
- Catalog Dashboard → Mock API & Data: loads catalog (evidence: `src/pages/Dashboard.jsx`)
