# boqasem/football architecture

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

- Interactive diagram: https://gitdiagram.com/boqasem/football
- Repository: https://github.com/boqasem/football

## Overview

Football is a public football blog backed by a Strapi 5 CMS and SQLite, with a Next.js site for browsing published content. Visitors use the homepage and article/category routes; those routes retrieve content through the shared Strapi client, which calls the CMS REST API. The CMS exposes article, category, navigation-item, and site-setting content. The README documents SQLite and the admin panel, but sampled backend source does not show the internal route-to-controller-to-service wiring; those components are therefore shown without inferred call edges.

Main entry points: [`frontend/lib/strapi.ts`](https://github.com/boqasem/football/blob/main/frontend/lib/strapi.ts) (Strapi client), [`frontend/app/articles/page.tsx`](https://github.com/boqasem/football/blob/main/frontend/app/articles/page.tsx) (Article listing), [`frontend/app/categories/page.tsx`](https://github.com/boqasem/football/blob/main/frontend/app/categories/page.tsx) (Category listing), [`frontend/app/page.tsx`](https://github.com/boqasem/football/blob/main/frontend/app/page.tsx) (Homepage)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_site["Public site"]
  node_home["Homepage<br/>[page.tsx]"]
  node_article_list["Article listing<br/>[page.tsx]"]
  node_article_detail["Article detail<br/>[page.tsx]"]
  node_category_list["Category listing<br/>[page.tsx]"]
  node_category_detail["Category detail<br/>[page.tsx]"]
  node_pagination["Pagination<br/>[Pagination.tsx]"]
  node_site_shell["Site shell<br/>[layout.tsx]"]
  node_sitemap["Sitemap<br/>[sitemap.ts]"]
  node_robots["Robots metadata<br/>[robots.ts]"]
end

subgraph group_client["Content client"]
  node_api_client["Strapi client<br/>[strapi.ts]"]
end

subgraph group_cms["CMS"]
  node_strapi_runtime["Strapi CMS<br/>[index.js]"]
  node_article_routes["Article routes<br/>[article.js]"]
  node_article_controller["Article controller<br/>[article.js]"]
  node_article_service["Article service<br/>[article.js]"]
  node_category_routes["Category routes<br/>[category.js]"]
  node_category_controller["Category controller<br/>[category.js]"]
  node_category_service["Category service<br/>[category.js]"]
  node_nav_routes["Navigation routes<br/>[navigation-item.js]"]
  node_nav_controller["Navigation controller<br/>[navigation-item.js]"]
  node_nav_service["Navigation service<br/>[navigation-item.js]"]
  node_settings_routes["Settings routes<br/>[site-setting.js]"]
  node_settings_controller["Settings controller<br/>[site-setting.js]"]
  node_settings_service["Settings service<br/>[site-setting.js]"]
end

subgraph group_config["CMS configuration"]
  node_db_config["Database config<br/>[database.js]"]
  node_admin_config["Admin config<br/>[admin.js]"]
  node_server_config["Server config<br/>[server.js]"]
end

node_visitor(("Visitor"))
node_strapi_api{{"Strapi REST API"}}
node_sqlite[("SQLite store")]

node_visitor -->|"opens"| node_home
node_visitor -->|"opens"| node_article_list
node_visitor -->|"opens"| node_article_detail
node_visitor -->|"opens"| node_category_list
node_visitor -.->|"opens"| node_category_detail
node_home -->|"fetches content"| node_api_client
node_article_list -->|"fetches pages"| node_api_client
node_category_list -->|"fetches pages"| node_api_client
node_article_detail -->|"loads article"| node_api_client
node_article_list -->|"renders"| node_pagination
node_category_list -->|"renders"| node_pagination
node_api_client -->|"requests content"| node_strapi_api
node_strapi_api -.->|"serves requests"| node_strapi_runtime
node_db_config -->|"configures"| node_sqlite
node_strapi_runtime -.->|"uses"| node_sqlite
node_visitor -.->|"views"| node_site_shell
node_sitemap -.->|"loads content"| node_api_client
node_robots -.->|"serves metadata"| node_visitor

click node_home "https://github.com/boqasem/football/blob/main/frontend/app/page.tsx"
click node_article_list "https://github.com/boqasem/football/blob/main/frontend/app/articles/page.tsx"
click node_article_detail "https://github.com/boqasem/football/blob/main/frontend/app/articles/%5Bslug%5D/page.tsx"
click node_category_list "https://github.com/boqasem/football/blob/main/frontend/app/categories/page.tsx"
click node_category_detail "https://github.com/boqasem/football/blob/main/frontend/app/category/%5Bslug%5D/page.tsx"
click node_pagination "https://github.com/boqasem/football/blob/main/frontend/components/Pagination.tsx"
click node_site_shell "https://github.com/boqasem/football/blob/main/frontend/app/layout.tsx"
click node_sitemap "https://github.com/boqasem/football/blob/main/frontend/app/sitemap.ts"
click node_robots "https://github.com/boqasem/football/blob/main/frontend/app/robots.ts"
click node_api_client "https://github.com/boqasem/football/blob/main/frontend/lib/strapi.ts"
click node_strapi_runtime "https://github.com/boqasem/football/blob/main/backend/src/index.js"
click node_article_routes "https://github.com/boqasem/football/blob/main/backend/src/api/article/routes/article.js"
click node_article_controller "https://github.com/boqasem/football/blob/main/backend/src/api/article/controllers/article.js"
click node_article_service "https://github.com/boqasem/football/blob/main/backend/src/api/article/services/article.js"
click node_category_routes "https://github.com/boqasem/football/blob/main/backend/src/api/category/routes/category.js"
click node_category_controller "https://github.com/boqasem/football/blob/main/backend/src/api/category/controllers/category.js"
click node_category_service "https://github.com/boqasem/football/blob/main/backend/src/api/category/services/category.js"
click node_nav_routes "https://github.com/boqasem/football/blob/main/backend/src/api/navigation-item/routes/navigation-item.js"
click node_nav_controller "https://github.com/boqasem/football/blob/main/backend/src/api/navigation-item/controllers/navigation-item.js"
click node_nav_service "https://github.com/boqasem/football/blob/main/backend/src/api/navigation-item/services/navigation-item.js"
click node_settings_routes "https://github.com/boqasem/football/blob/main/backend/src/api/site-setting/routes/site-setting.js"
click node_settings_controller "https://github.com/boqasem/football/blob/main/backend/src/api/site-setting/controllers/site-setting.js"
click node_settings_service "https://github.com/boqasem/football/blob/main/backend/src/api/site-setting/services/site-setting.js"
click node_db_config "https://github.com/boqasem/football/blob/main/backend/config/database.js"
click node_admin_config "https://github.com/boqasem/football/blob/main/backend/config/admin.js"
click node_server_config "https://github.com/boqasem/football/blob/main/backend/config/server.js"

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_article_list,node_article_detail,node_category_list,node_category_detail,node_pagination,node_site_shell,node_sitemap,node_robots toneBlue
class node_api_client,node_sqlite toneAmber
class node_strapi_runtime,node_article_routes,node_article_controller,node_article_service,node_category_routes,node_category_controller,node_category_service,node_nav_routes,node_nav_controller,node_nav_service,node_settings_routes,node_settings_controller,node_settings_service,node_strapi_api toneMint
class node_db_config,node_admin_config,node_server_config toneRose
class node_visitor toneIndigo
```

## Components

### Public site

- [Homepage](https://github.com/boqasem/football/blob/main/frontend/app/page.tsx): `frontend/app/page.tsx`
- [Article listing](https://github.com/boqasem/football/blob/main/frontend/app/articles/page.tsx): `frontend/app/articles/page.tsx`
- [Article detail](https://github.com/boqasem/football/blob/main/frontend/app/articles/%5Bslug%5D/page.tsx): `frontend/app/articles/[slug]/page.tsx`
- [Category listing](https://github.com/boqasem/football/blob/main/frontend/app/categories/page.tsx): `frontend/app/categories/page.tsx`
- [Category detail](https://github.com/boqasem/football/blob/main/frontend/app/category/%5Bslug%5D/page.tsx): `frontend/app/category/[slug]/page.tsx`
- [Pagination](https://github.com/boqasem/football/blob/main/frontend/components/Pagination.tsx): `frontend/components/Pagination.tsx`
- [Site shell](https://github.com/boqasem/football/blob/main/frontend/app/layout.tsx): `frontend/app/layout.tsx`
- [Sitemap](https://github.com/boqasem/football/blob/main/frontend/app/sitemap.ts): `frontend/app/sitemap.ts`
- [Robots metadata](https://github.com/boqasem/football/blob/main/frontend/app/robots.ts): `frontend/app/robots.ts`

### Content client

- [Strapi client](https://github.com/boqasem/football/blob/main/frontend/lib/strapi.ts): `frontend/lib/strapi.ts`

### CMS

- [Strapi CMS](https://github.com/boqasem/football/blob/main/backend/src/index.js): `backend/src/index.js`
- [Article routes](https://github.com/boqasem/football/blob/main/backend/src/api/article/routes/article.js): `backend/src/api/article/routes/article.js`
- [Article controller](https://github.com/boqasem/football/blob/main/backend/src/api/article/controllers/article.js): `backend/src/api/article/controllers/article.js`
- [Article service](https://github.com/boqasem/football/blob/main/backend/src/api/article/services/article.js): `backend/src/api/article/services/article.js`
- [Category routes](https://github.com/boqasem/football/blob/main/backend/src/api/category/routes/category.js): `backend/src/api/category/routes/category.js`
- [Category controller](https://github.com/boqasem/football/blob/main/backend/src/api/category/controllers/category.js): `backend/src/api/category/controllers/category.js`
- [Category service](https://github.com/boqasem/football/blob/main/backend/src/api/category/services/category.js): `backend/src/api/category/services/category.js`
- [Navigation routes](https://github.com/boqasem/football/blob/main/backend/src/api/navigation-item/routes/navigation-item.js): `backend/src/api/navigation-item/routes/navigation-item.js`
- [Navigation controller](https://github.com/boqasem/football/blob/main/backend/src/api/navigation-item/controllers/navigation-item.js): `backend/src/api/navigation-item/controllers/navigation-item.js`
- [Navigation service](https://github.com/boqasem/football/blob/main/backend/src/api/navigation-item/services/navigation-item.js): `backend/src/api/navigation-item/services/navigation-item.js`
- [Settings routes](https://github.com/boqasem/football/blob/main/backend/src/api/site-setting/routes/site-setting.js): `backend/src/api/site-setting/routes/site-setting.js`
- [Settings controller](https://github.com/boqasem/football/blob/main/backend/src/api/site-setting/controllers/site-setting.js): `backend/src/api/site-setting/controllers/site-setting.js`
- [Settings service](https://github.com/boqasem/football/blob/main/backend/src/api/site-setting/services/site-setting.js): `backend/src/api/site-setting/services/site-setting.js`

### CMS configuration

- [Database config](https://github.com/boqasem/football/blob/main/backend/config/database.js): `backend/config/database.js`
- [Admin config](https://github.com/boqasem/football/blob/main/backend/config/admin.js): `backend/config/admin.js`
- [Server config](https://github.com/boqasem/football/blob/main/backend/config/server.js): `backend/config/server.js`

### Other components

- **Visitor**
- **Strapi REST API**
- **SQLite store**

## Connections

- Visitor → Homepage: opens (evidence: `frontend/app/page.tsx`)
- Visitor → Article listing: opens (evidence: `frontend/app/articles/page.tsx`)
- Visitor → Article detail: opens (evidence: `frontend/app/articles/[slug]/page.tsx`)
- Visitor → Category listing: opens (evidence: `frontend/app/categories/page.tsx`)
- Visitor → Category detail: opens
- Homepage → Strapi client: fetches content (evidence: `frontend/app/page.tsx`)
- Article listing → Strapi client: fetches pages (evidence: `frontend/app/articles/page.tsx`)
- Category listing → Strapi client: fetches pages (evidence: `frontend/app/categories/page.tsx`)
- Article detail → Strapi client: loads article (evidence: `frontend/app/articles/[slug]/page.tsx`)
- Article listing → Pagination: renders (evidence: `frontend/app/articles/page.tsx`)
- Category listing → Pagination: renders (evidence: `frontend/app/categories/page.tsx`)
- Strapi client → Strapi REST API: requests content (evidence: `frontend/lib/strapi.ts`)
- Strapi REST API → Strapi CMS: serves requests (evidence: `README.md`)
- Database config → SQLite store: configures (evidence: `backend/config/database.js`)
- Strapi CMS → SQLite store: uses (evidence: `README.md`)
- Visitor → Site shell: views
- Sitemap → Strapi client: loads content
- Robots metadata → Visitor: serves metadata
