# 360muslimexperts/360me architecture

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

- Interactive diagram: https://gitdiagram.com/360muslimexperts/360me
- Repository: https://github.com/360muslimexperts/360me

## Overview

#### Purpose and Runtime
This is a content-focused Next.js App Router site, deployed as a Cloudflare Pages application. It presents organizational pages, blog content, team history, donation/activity material, and a dedicated NTH 2025 article collection. The root application shell is `app/layout.js`; the primary landing route is `app/page.js`.

#### Routing and Page Composition
File-system routes under `app/` define the public site: static pages such as about, contact, donate, and blog; dynamic blog, team-year, and NTH article routes; and framework-level loading, error, 404, sitemap, and robots responses.
- `app/page.js`
- `app/blog/[slug]/page.js`
- `app/nth-2025/articles/[id]/page.js`

#### Shared UI Layer
Reusable React components compose page sections and layouts, including navigation/footer chrome, home-page modules, post presentation, donation content, and team cards. `ArticleLayout` is the likely shared boundary for article rendering, while `Navbar` and `Footer` provide site-wide navigation structure.
- `components/Navbar.js`
- `components/Footer.js`
- `components/ArticleLayout.js`

#### Content Sources
Most curated content is repository-local rather than fetched at request time. NTH articles pair a JSON index with MDX source documents; team information is organized as yearly JSON datasets. Dynamic article/team routes should resolve identifiers against these data boundaries.
- `data/nth-2025/articles.json`
- `data/nth-2025/articles/imagining-my-jannah-by-farheen-fatima.mdx`
- `data/team/2025.json`

#### Blog and CMS Boundary
The blog has dynamic slug routing and a dedicated Sanity integration module, indicating externally managed CMS content is separated behind `lib/sanity.js`. Page code should consume this library rather than embed CMS queries or connection details directly.
- `app/blog/page.js`
- `app/blog/[slug]/page.js`
- `lib/sanity.js`

#### Styling and Presentation Assets
Global styling originates in the App Router shell and is supported by Tailwind configuration. Fonts are centralized in a library module, while images and other static assets are served from `public/`.
- `app/globals.css`
- `lib/fonts.js`
- `public/`

#### Server and Cloudflare Deployment
Server behavior includes an App Router API endpoint at `/api/hello`; it is the Cloudflare binding/KV example surface. Cloudflare Pages builds use `@cloudflare/next-on-pages`, with Wrangler configuration governing preview/deploy and platform bindings.
- `app/api/hello/route.js`
- `next.config.mjs`
- `wrangler.jsonc`

Main entry points: [`app/layout.js`](https://github.com/360muslimexperts/360me/blob/main/app/layout.js) (Root layout), [`app/nth-2025/articles/[id]/page.js`](https://github.com/360muslimexperts/360me/blob/main/app/nth-2025/articles/%5Bid%5D/page.js) (NTH article), [`app/blog/[slug]/page.js`](https://github.com/360muslimexperts/360me/blob/main/app/blog/%5Bslug%5D/page.js) (Blog post), [`next.config.mjs`](https://github.com/360muslimexperts/360me/blob/main/next.config.mjs) (Cloudflare Pages)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Next.js App"]
  node_root_layout["Root layout<br/>App Router shell<br/>[layout.js]"]
  node_home_page["Landing page<br/>route<br/>[page.js]"]
  node_blog_index["Blog index<br/>route<br/>[page.js]"]
  node_blog_post["Blog post<br/>dynamic route<br/>[page.js]"]
  node_nth_article["NTH article<br/>dynamic route<br/>[page.js]"]
  node_team_year["Team year pages<br/>dynamic routes<br/>[page.js]"]
  node_framework_responses["Framework responses<br/>loading/error/SEO"]
  node_hello_api{{"Hello API<br/>route handler<br/>[route.js]"}}
  node_global_styles["Global styles<br/>CSS<br/>[globals.css]"]
  node_fonts["Fonts<br/>font module<br/>[fonts.js]"]
  node_public_assets["Public assets<br/>static assets"]
end

subgraph group_content["Content Sources"]
  node_sanity{{"Sanity integration<br/>CMS client<br/>[sanity.js]"}}
  node_nth_index[("NTH article index<br/>JSON dataset<br/>[articles.json]")]
  node_nth_mdx["NTH article MDX<br/>MDX documents"]
  node_team_data[("Team datasets<br/>yearly JSON<br/>[2025.json]")]
end

subgraph group_ui["Shared UI"]
  node_navbar["Navbar<br/>React component<br/>[Navbar.js]"]
  node_footer["Footer<br/>React component<br/>[Footer.js]"]
  node_article_layout["Article layout<br/>React component<br/>[ArticleLayout.js]"]
end

subgraph group_platform["Cloudflare Platform"]
  node_cloudflare_pages{{"Cloudflare Pages<br/>hosting runtime<br/>[next.config.mjs]"}}
  node_wrangler["Wrangler bindings<br/>deployment config<br/>[wrangler.jsonc]"]
end

node_root_layout -->|"renders"| node_navbar
node_root_layout -->|"renders"| node_footer
node_root_layout -->|"imports"| node_global_styles
node_root_layout -->|"uses"| node_fonts
node_home_page -->|"wrapped by"| node_root_layout
node_blog_index -->|"wrapped by"| node_root_layout
node_blog_index -->|"loads posts"| node_sanity
node_blog_post -->|"wrapped by"| node_root_layout
node_blog_post -->|"loads by slug"| node_sanity
node_blog_post -->|"renders with"| node_article_layout
node_nth_article -->|"wrapped by"| node_root_layout
node_nth_article -->|"resolves ID"| node_nth_index
node_nth_article -->|"renders source"| node_nth_mdx
node_nth_article -->|"renders with"| node_article_layout
node_team_year -->|"loads year"| node_team_data
node_root_layout -.->|"serves assets"| node_public_assets
node_cloudflare_pages -->|"hosts"| node_root_layout
node_cloudflare_pages -->|"runs"| node_hello_api
node_wrangler -->|"configures"| node_cloudflare_pages
node_wrangler -.->|"provides bindings"| node_hello_api

click node_root_layout "https://github.com/360muslimexperts/360me/blob/main/app/layout.js"
click node_home_page "https://github.com/360muslimexperts/360me/blob/main/app/page.js"
click node_blog_index "https://github.com/360muslimexperts/360me/blob/main/app/blog/page.js"
click node_blog_post "https://github.com/360muslimexperts/360me/blob/main/app/blog/%5Bslug%5D/page.js"
click node_nth_article "https://github.com/360muslimexperts/360me/blob/main/app/nth-2025/articles/%5Bid%5D/page.js"
click node_team_year "https://github.com/360muslimexperts/360me/blob/main/app/team/%5Byear%5D/page.js"
click node_hello_api "https://github.com/360muslimexperts/360me/blob/main/app/api/hello/route.js"
click node_navbar "https://github.com/360muslimexperts/360me/blob/main/components/Navbar.js"
click node_footer "https://github.com/360muslimexperts/360me/blob/main/components/Footer.js"
click node_article_layout "https://github.com/360muslimexperts/360me/blob/main/components/ArticleLayout.js"
click node_sanity "https://github.com/360muslimexperts/360me/blob/main/lib/sanity.js"
click node_nth_index "https://github.com/360muslimexperts/360me/blob/main/data/nth-2025/articles.json"
click node_nth_mdx "https://github.com/360muslimexperts/360me/blob/main/data/nth-2025/articles/imagining-my-jannah-by-farheen-fatima.mdx"
click node_team_data "https://github.com/360muslimexperts/360me/blob/main/data/team/2025.json"
click node_global_styles "https://github.com/360muslimexperts/360me/blob/main/app/globals.css"
click node_fonts "https://github.com/360muslimexperts/360me/blob/main/lib/fonts.js"
click node_public_assets "https://github.com/360muslimexperts/360me/tree/main/public/about"
click node_cloudflare_pages "https://github.com/360muslimexperts/360me/blob/main/next.config.mjs"
click node_wrangler "https://github.com/360muslimexperts/360me/blob/main/wrangler.jsonc"

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_root_layout,node_home_page,node_blog_index,node_blog_post,node_nth_article,node_team_year,node_framework_responses,node_hello_api,node_global_styles,node_fonts,node_public_assets toneBlue
class node_sanity,node_nth_index,node_nth_mdx,node_team_data toneAmber
class node_navbar,node_footer,node_article_layout toneMint
class node_cloudflare_pages,node_wrangler toneRose
```

## Components

### Next.js App

App Router public site and server endpoints.

- [Root layout](https://github.com/360muslimexperts/360me/blob/main/app/layout.js): App Router shell · Applies global presentation and site-wide chrome. · `app/layout.js`
- [Landing page](https://github.com/360muslimexperts/360me/blob/main/app/page.js): route · `app/page.js`
- [Blog index](https://github.com/360muslimexperts/360me/blob/main/app/blog/page.js): route · `app/blog/page.js`
- [Blog post](https://github.com/360muslimexperts/360me/blob/main/app/blog/%5Bslug%5D/page.js): dynamic route · Resolves a post by slug. · `app/blog/[slug]/page.js`
- [NTH article](https://github.com/360muslimexperts/360me/blob/main/app/nth-2025/articles/%5Bid%5D/page.js): dynamic route · Resolves an NTH article by ID. · `app/nth-2025/articles/[id]/page.js`
- [Team year pages](https://github.com/360muslimexperts/360me/blob/main/app/team/%5Byear%5D/page.js): dynamic routes · Resolve yearly team data. · `app/team/[year]/page.js`
- **Framework responses**: loading/error/SEO · Loading, error, 404, sitemap, and robots routes.
- [Hello API](https://github.com/360muslimexperts/360me/blob/main/app/api/hello/route.js): route handler · Cloudflare binding and KV example endpoint. · `app/api/hello/route.js`
- [Global styles](https://github.com/360muslimexperts/360me/blob/main/app/globals.css): CSS · `app/globals.css`
- [Fonts](https://github.com/360muslimexperts/360me/blob/main/lib/fonts.js): font module · `lib/fonts.js`
- [Public assets](https://github.com/360muslimexperts/360me/tree/main/public/about): static assets · `public/about`

### Content Sources

Local editorial datasets and external CMS.

- [Sanity integration](https://github.com/360muslimexperts/360me/blob/main/lib/sanity.js): CMS client · Encapsulates CMS access for blog routes. · `lib/sanity.js`
- [NTH article index](https://github.com/360muslimexperts/360me/blob/main/data/nth-2025/articles.json): JSON dataset · `data/nth-2025/articles.json`
- [NTH article MDX](https://github.com/360muslimexperts/360me/blob/main/data/nth-2025/articles/imagining-my-jannah-by-farheen-fatima.mdx): MDX documents · Editorial article source documents. · `data/nth-2025/articles/imagining-my-jannah-by-farheen-fatima.mdx`
- [Team datasets](https://github.com/360muslimexperts/360me/blob/main/data/team/2025.json): yearly JSON · `data/team/2025.json`

### Shared UI

Reusable site chrome and article presentation.

- [Navbar](https://github.com/360muslimexperts/360me/blob/main/components/Navbar.js): React component · `components/Navbar.js`
- [Footer](https://github.com/360muslimexperts/360me/blob/main/components/Footer.js): React component · `components/Footer.js`
- [Article layout](https://github.com/360muslimexperts/360me/blob/main/components/ArticleLayout.js): React component · Shared article rendering boundary. · `components/ArticleLayout.js`

### Cloudflare Platform

Pages deployment and runtime bindings.

- [Cloudflare Pages](https://github.com/360muslimexperts/360me/blob/main/next.config.mjs): hosting runtime · Builds Next.js for the Cloudflare platform. · `next.config.mjs`
- [Wrangler bindings](https://github.com/360muslimexperts/360me/blob/main/wrangler.jsonc): deployment config · Defines preview, deploy, and platform bindings. · `wrangler.jsonc`

## Connections

- Root layout → Navbar: renders
- Root layout → Footer: renders
- Root layout → Global styles: imports
- Root layout → Fonts: uses
- Landing page → Root layout: wrapped by
- Blog index → Root layout: wrapped by
- Blog index → Sanity integration: loads posts
- Blog post → Root layout: wrapped by
- Blog post → Sanity integration: loads by slug
- Blog post → Article layout: renders with
- NTH article → Root layout: wrapped by
- NTH article → NTH article index: resolves ID
- NTH article → NTH article MDX: renders source
- NTH article → Article layout: renders with
- Team year pages → Team datasets: loads year
- Root layout → Public assets: serves assets
- Cloudflare Pages → Root layout: hosts
- Cloudflare Pages → Hello API: runs
- Wrangler bindings → Cloudflare Pages: configures
- Wrangler bindings → Hello API: provides bindings
