# mulki7/compro-tromagnon architecture

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

- Interactive diagram: https://gitdiagram.com/mulki7/compro-tromagnon
- Repository: https://github.com/mulki7/compro-tromagnon

## Overview

This is a Next.js music-label site with a public catalog and an admin console for managing artists, releases, news, live events, and hero banners. Public visitors browse the homepage and content sections; administrators authenticate, review dashboard summaries, and manage catalog records through API-backed screens. The graph preserves those domain branches and the shared API, authentication, and admin UI layers. Several public detail/list routes and admin subsystems were not sampled, so uncertain runtime links are shown as unverified or omitted.

Main entry points: [`src/lib/api/admin`](https://github.com/mulki7/compro-tromagnon/tree/main/src/lib/api/admin) (Admin API adapters), [`src/lib/api`](https://github.com/mulki7/compro-tromagnon/tree/main/src/lib/api) (Public API adapters), [`src/lib/api/client.ts`](https://github.com/mulki7/compro-tromagnon/blob/main/src/lib/api/client.ts) (HTTP client), [`src/components/admin`](https://github.com/mulki7/compro-tromagnon/tree/main/src/components/admin) (Admin UI primitives)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_public["Public site"]
  node_home["Homepage<br/>[page.tsx]"]
  node_artist_public["Artist catalog<br/>[page.tsx]"]
  node_artist_detail["Artist detail<br/>[page.tsx]"]
  node_release_public["Release catalog<br/>[page.tsx]"]
  node_release_detail["Release detail<br/>[page.tsx]"]
  node_news_public["News catalog<br/>[page.tsx]"]
  node_news_detail["News detail<br/>[page.tsx]"]
  node_live_public["Live events<br/>[page.tsx]"]
  node_public_sections["Homepage sections"]
end

subgraph group_admin["Admin console"]
  node_admin_login["Admin login<br/>[page.tsx]"]
  node_admin_shell["Admin shell<br/>[layout.tsx]"]
  node_dashboard["Dashboard<br/>[page.tsx]"]
  node_artist_admin["Artist management<br/>[page.tsx]"]
  node_release_admin["Release management<br/>[page.tsx]"]
  node_news_admin["News management<br/>[page.tsx]"]
  node_live_admin["Live management<br/>[page.tsx]"]
  node_hero_admin["Hero management<br/>[page.tsx]"]
end

subgraph group_api["API and models"]
  node_auth["Authentication state<br/>[useAuth.ts]"]
  node_api_client["HTTP client<br/>[client.ts]"]
  node_public_api["Public API adapters"]
  node_admin_api["Admin API adapters"]
  node_models["Domain models<br/>[models.ts]"]
end

subgraph group_shared["Shared UI"]
  node_admin_primitives["Admin UI primitives"]
end

node_visitor(("Visitor"))
node_admin_user(("Administrator"))
node_api_service{{"Backend API"}}

node_visitor -->|"opens"| node_home
node_visitor -->|"browses"| node_artist_public
node_visitor -->|"browses"| node_release_public
node_visitor -->|"browses"| node_news_public
node_visitor -.->|"browses"| node_live_public
node_artist_public -.->|"opens profile"| node_artist_detail
node_release_public -.->|"opens release"| node_release_detail
node_news_public -.->|"opens story"| node_news_detail
node_home -->|"renders"| node_public_sections
node_home -.->|"fetches content"| node_public_api
node_artist_public -.->|"requests artists"| node_public_api
node_release_public -.->|"requests releases"| node_public_api
node_news_public -.->|"requests news"| node_public_api
node_public_api -.->|"sends requests"| node_api_client
node_admin_user -->|"signs in"| node_admin_login
node_admin_login -->|"uses auth"| node_auth
node_admin_login -->|"submits credentials"| node_api_client
node_auth -->|"checks session"| node_api_client
node_api_client -->|"HTTP requests"| node_api_service
node_admin_user -.->|"uses console"| node_admin_shell
node_admin_shell -.->|"guards access"| node_auth
node_admin_shell -.->|"renders controls"| node_admin_primitives
node_dashboard -->|"loads summaries"| node_admin_api
node_artist_admin -->|"manages artists"| node_admin_api
node_release_admin -->|"manages releases"| node_admin_api
node_news_admin -->|"manages news"| node_admin_api
node_live_admin -.->|"manages events"| node_admin_api
node_hero_admin -->|"manages banners"| node_admin_api
node_artist_admin -->|"renders controls"| node_admin_primitives
node_release_admin -->|"renders controls"| node_admin_primitives
node_news_admin -->|"renders controls"| node_admin_primitives
node_hero_admin -->|"renders controls"| node_admin_primitives
node_admin_api -->|"sends requests"| node_api_client
node_public_api -->|"uses types"| node_models
node_admin_api -->|"uses types"| node_models
node_api_service -.->|"returns records"| node_models

click node_home "https://github.com/mulki7/compro-tromagnon/blob/main/src/app/page.tsx"
click node_artist_public "https://github.com/mulki7/compro-tromagnon/blob/main/src/app/artists/page.tsx"
click node_artist_detail "https://github.com/mulki7/compro-tromagnon/blob/main/src/app/artists/%5Bslug%5D/page.tsx"
click node_release_public "https://github.com/mulki7/compro-tromagnon/blob/main/src/app/releases/page.tsx"
click node_release_detail "https://github.com/mulki7/compro-tromagnon/blob/main/src/app/releases/%5Bslug%5D/page.tsx"
click node_news_public "https://github.com/mulki7/compro-tromagnon/blob/main/src/app/news/page.tsx"
click node_news_detail "https://github.com/mulki7/compro-tromagnon/blob/main/src/app/news/%5Bslug%5D/page.tsx"
click node_live_public "https://github.com/mulki7/compro-tromagnon/blob/main/src/app/live/page.tsx"
click node_public_sections "https://github.com/mulki7/compro-tromagnon/tree/main/src/components/public"
click node_admin_login "https://github.com/mulki7/compro-tromagnon/blob/main/src/app/admin/login/page.tsx"
click node_admin_shell "https://github.com/mulki7/compro-tromagnon/blob/main/src/app/admin/(dashboard)/layout.tsx"
click node_dashboard "https://github.com/mulki7/compro-tromagnon/blob/main/src/app/admin/(dashboard)/page.tsx"
click node_artist_admin "https://github.com/mulki7/compro-tromagnon/blob/main/src/app/admin/(dashboard)/artists/page.tsx"
click node_release_admin "https://github.com/mulki7/compro-tromagnon/blob/main/src/app/admin/(dashboard)/releases/page.tsx"
click node_news_admin "https://github.com/mulki7/compro-tromagnon/blob/main/src/app/admin/(dashboard)/news/page.tsx"
click node_live_admin "https://github.com/mulki7/compro-tromagnon/blob/main/src/app/admin/(dashboard)/live/page.tsx"
click node_hero_admin "https://github.com/mulki7/compro-tromagnon/blob/main/src/app/admin/(dashboard)/hero/page.tsx"
click node_admin_primitives "https://github.com/mulki7/compro-tromagnon/tree/main/src/components/admin"
click node_auth "https://github.com/mulki7/compro-tromagnon/blob/main/src/hooks/useAuth.ts"
click node_api_client "https://github.com/mulki7/compro-tromagnon/blob/main/src/lib/api/client.ts"
click node_public_api "https://github.com/mulki7/compro-tromagnon/tree/main/src/lib/api"
click node_admin_api "https://github.com/mulki7/compro-tromagnon/tree/main/src/lib/api/admin"
click node_models "https://github.com/mulki7/compro-tromagnon/blob/main/src/types/models.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_artist_public,node_artist_detail,node_release_public,node_release_detail,node_news_public,node_news_detail,node_live_public,node_public_sections toneBlue
class node_admin_login,node_admin_shell,node_dashboard,node_artist_admin,node_release_admin,node_news_admin,node_live_admin,node_hero_admin toneAmber
class node_auth,node_api_client,node_public_api,node_admin_api,node_models,node_api_service toneMint
class node_admin_primitives toneRose
class node_visitor,node_admin_user toneIndigo
```

## Components

### Public site

- [Homepage](https://github.com/mulki7/compro-tromagnon/blob/main/src/app/page.tsx): `src/app/page.tsx`
- [Artist catalog](https://github.com/mulki7/compro-tromagnon/blob/main/src/app/artists/page.tsx): `src/app/artists/page.tsx`
- [Artist detail](https://github.com/mulki7/compro-tromagnon/blob/main/src/app/artists/%5Bslug%5D/page.tsx): `src/app/artists/[slug]/page.tsx`
- [Release catalog](https://github.com/mulki7/compro-tromagnon/blob/main/src/app/releases/page.tsx): `src/app/releases/page.tsx`
- [Release detail](https://github.com/mulki7/compro-tromagnon/blob/main/src/app/releases/%5Bslug%5D/page.tsx): `src/app/releases/[slug]/page.tsx`
- [News catalog](https://github.com/mulki7/compro-tromagnon/blob/main/src/app/news/page.tsx): `src/app/news/page.tsx`
- [News detail](https://github.com/mulki7/compro-tromagnon/blob/main/src/app/news/%5Bslug%5D/page.tsx): `src/app/news/[slug]/page.tsx`
- [Live events](https://github.com/mulki7/compro-tromagnon/blob/main/src/app/live/page.tsx): `src/app/live/page.tsx`
- [Homepage sections](https://github.com/mulki7/compro-tromagnon/tree/main/src/components/public): `src/components/public`

### Admin console

- [Admin login](https://github.com/mulki7/compro-tromagnon/blob/main/src/app/admin/login/page.tsx): `src/app/admin/login/page.tsx`
- [Admin shell](https://github.com/mulki7/compro-tromagnon/blob/main/src/app/admin/(dashboard)/layout.tsx): `src/app/admin/(dashboard)/layout.tsx`
- [Dashboard](https://github.com/mulki7/compro-tromagnon/blob/main/src/app/admin/(dashboard)/page.tsx): `src/app/admin/(dashboard)/page.tsx`
- [Artist management](https://github.com/mulki7/compro-tromagnon/blob/main/src/app/admin/(dashboard)/artists/page.tsx): `src/app/admin/(dashboard)/artists/page.tsx`
- [Release management](https://github.com/mulki7/compro-tromagnon/blob/main/src/app/admin/(dashboard)/releases/page.tsx): `src/app/admin/(dashboard)/releases/page.tsx`
- [News management](https://github.com/mulki7/compro-tromagnon/blob/main/src/app/admin/(dashboard)/news/page.tsx): `src/app/admin/(dashboard)/news/page.tsx`
- [Live management](https://github.com/mulki7/compro-tromagnon/blob/main/src/app/admin/(dashboard)/live/page.tsx): `src/app/admin/(dashboard)/live/page.tsx`
- [Hero management](https://github.com/mulki7/compro-tromagnon/blob/main/src/app/admin/(dashboard)/hero/page.tsx): `src/app/admin/(dashboard)/hero/page.tsx`

### API and models

- [Authentication state](https://github.com/mulki7/compro-tromagnon/blob/main/src/hooks/useAuth.ts): `src/hooks/useAuth.ts`
- [HTTP client](https://github.com/mulki7/compro-tromagnon/blob/main/src/lib/api/client.ts): `src/lib/api/client.ts`
- [Public API adapters](https://github.com/mulki7/compro-tromagnon/tree/main/src/lib/api): `src/lib/api`
- [Admin API adapters](https://github.com/mulki7/compro-tromagnon/tree/main/src/lib/api/admin): `src/lib/api/admin`
- [Domain models](https://github.com/mulki7/compro-tromagnon/blob/main/src/types/models.ts): `src/types/models.ts`

### Shared UI

- [Admin UI primitives](https://github.com/mulki7/compro-tromagnon/tree/main/src/components/admin): `src/components/admin`

### Other components

- **Visitor**
- **Administrator**
- **Backend API**

## Connections

- Visitor → Homepage: opens (evidence: `src/app/page.tsx`)
- Visitor → Artist catalog: browses (evidence: `src/app/artists/page.tsx`)
- Visitor → Release catalog: browses (evidence: `src/app/releases/page.tsx`)
- Visitor → News catalog: browses (evidence: `src/app/news/page.tsx`)
- Visitor → Live events: browses
- Artist catalog → Artist detail: opens profile
- Release catalog → Release detail: opens release
- News catalog → News detail: opens story
- Homepage → Homepage sections: renders (evidence: `src/app/page.tsx`)
- Homepage → Public API adapters: fetches content
- Artist catalog → Public API adapters: requests artists (evidence: `src/app/artists/page.tsx`)
- Release catalog → Public API adapters: requests releases (evidence: `src/app/releases/page.tsx`)
- News catalog → Public API adapters: requests news (evidence: `src/app/news/page.tsx`)
- Public API adapters → HTTP client: sends requests (evidence: `src/lib/api/admin/releases.ts`)
- Administrator → Admin login: signs in (evidence: `src/app/admin/login/page.tsx`)
- Admin login → Authentication state: uses auth (evidence: `src/app/admin/login/page.tsx`)
- Admin login → HTTP client: submits credentials (evidence: `src/app/admin/login/page.tsx`)
- Authentication state → HTTP client: checks session (evidence: `src/hooks/useAuth.ts`)
- HTTP client → Backend API: HTTP requests (evidence: `src/lib/api/client.ts`)
- Administrator → Admin shell: uses console
- Admin shell → Authentication state: guards access
- Admin shell → Admin UI primitives: renders controls
- Dashboard → Admin API adapters: loads summaries (evidence: `src/app/admin/(dashboard)/page.tsx`)
- Artist management → Admin API adapters: manages artists (evidence: `src/app/admin/(dashboard)/artists/page.tsx`)
- Release management → Admin API adapters: manages releases (evidence: `src/app/admin/(dashboard)/releases/page.tsx`)
- News management → Admin API adapters: manages news (evidence: `src/app/admin/(dashboard)/news/page.tsx`)
- Live management → Admin API adapters: manages events
- Hero management → Admin API adapters: manages banners (evidence: `src/app/admin/(dashboard)/hero/page.tsx`)
- Artist management → Admin UI primitives: renders controls (evidence: `src/app/admin/(dashboard)/artists/page.tsx`)
- Release management → Admin UI primitives: renders controls (evidence: `src/app/admin/(dashboard)/releases/page.tsx`)
- News management → Admin UI primitives: renders controls (evidence: `src/app/admin/(dashboard)/news/page.tsx`)
- Hero management → Admin UI primitives: renders controls (evidence: `src/app/admin/(dashboard)/hero/page.tsx`)
- Admin API adapters → HTTP client: sends requests (evidence: `src/lib/api/admin/releases.ts`)
- Public API adapters → Domain models: uses types (evidence: `src/lib/api/releases.ts`)
- Admin API adapters → Domain models: uses types (evidence: `src/lib/api/admin/releases.ts`)
- Backend API → Domain models: returns records
