# ziroo-cf/bac-hub architecture

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

- Interactive diagram: https://gitdiagram.com/ziroo-cf/bac-hub
- Repository: https://github.com/ziroo-cf/bac-hub

## Overview

Bac-Hub is a lightweight study-resource portal for Moroccan baccalaureate students. Students choose a subject, browse its curated video and document links, and open a resource on its provider; a live countdown highlights exam and results dates. The catalog is centralized in one data file, while the page handles browsing and link rendering. The root layout provides the shared dark-themed shell and analytics, and a web manifest describes installable-app metadata. The source excerpts show these main connections; PWA installation behavior is documented, but its browser-level wiring is not shown.

Main entry points: [`src/app/page.tsx`](https://github.com/ziroo-cf/bac-hub/blob/main/src/app/page.tsx) (Subject Browser), [`src/app/layout.tsx`](https://github.com/ziroo-cf/bac-hub/blob/main/src/app/layout.tsx) (Root Layout), [`src/app/data.ts`](https://github.com/ziroo-cf/bac-hub/blob/main/src/app/data.ts) (Subject Resources), [`src/app/manifest.ts`](https://github.com/ziroo-cf/bac-hub/blob/main/src/app/manifest.ts) (Install Manifest)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_browse["Resource Browsing"]
  node_home["Subject Browser<br/>[page.tsx]"]
  node_countdown["Exam Countdown<br/>[page.tsx]"]
end

subgraph group_catalog["Study Catalog"]
  node_catalog_data["Subject Resources<br/>[data.ts]"]
end

subgraph group_shell["App Shell"]
  node_root_layout["Root Layout<br/>[layout.tsx]"]
  node_pwa_manifest["Install Manifest<br/>[manifest.ts]"]
end

node_student(("Student"))
node_resource_sites["Video &amp; Study Sites"]
node_analytics["Vercel Analytics"]

node_student -->|"browses"| node_home
node_home -->|"reads"| node_catalog_data
node_home -->|"renders"| node_countdown
node_home -->|"opens links"| node_resource_sites
node_root_layout -->|"renders"| node_analytics
node_student -.->|"installs from"| node_pwa_manifest

click node_home "https://github.com/ziroo-cf/bac-hub/blob/main/src/app/page.tsx"
click node_countdown "https://github.com/ziroo-cf/bac-hub/blob/main/src/app/page.tsx"
click node_catalog_data "https://github.com/ziroo-cf/bac-hub/blob/main/src/app/data.ts"
click node_root_layout "https://github.com/ziroo-cf/bac-hub/blob/main/src/app/layout.tsx"
click node_pwa_manifest "https://github.com/ziroo-cf/bac-hub/blob/main/src/app/manifest.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_home,node_countdown toneBlue
class node_catalog_data toneAmber
class node_root_layout,node_pwa_manifest toneMint
class node_student,node_resource_sites,node_analytics toneIndigo
```

## Components

### Resource Browsing

- [Subject Browser](https://github.com/ziroo-cf/bac-hub/blob/main/src/app/page.tsx): `src/app/page.tsx`
- [Exam Countdown](https://github.com/ziroo-cf/bac-hub/blob/main/src/app/page.tsx): `src/app/page.tsx`

### Study Catalog

- [Subject Resources](https://github.com/ziroo-cf/bac-hub/blob/main/src/app/data.ts): `src/app/data.ts`

### App Shell

- [Root Layout](https://github.com/ziroo-cf/bac-hub/blob/main/src/app/layout.tsx): `src/app/layout.tsx`
- [Install Manifest](https://github.com/ziroo-cf/bac-hub/blob/main/src/app/manifest.ts): `src/app/manifest.ts`

### Other components

- **Student**
- **Video & Study Sites**
- **Vercel Analytics**

## Connections

- Student → Subject Browser: browses (evidence: `README.md`)
- Subject Browser → Subject Resources: reads (evidence: `src/app/page.tsx`)
- Subject Browser → Exam Countdown: renders (evidence: `src/app/page.tsx`)
- Subject Browser → Video & Study Sites: opens links (evidence: `src/app/page.tsx`)
- Root Layout → Vercel Analytics: renders (evidence: `src/app/layout.tsx`)
- Student → Install Manifest: installs from
