# fadilp5x/cloudflareseolimelight architecture

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

- Interactive diagram: https://gitdiagram.com/fadilp5x/cloudflareseolimelight
- Repository: https://github.com/fadilp5x/cloudflareseolimelight

## Overview

1. This repository is a mostly static HTML website: the top level contains individual page entry points such as `index.html`, `article.html`, `authors.html`, `contact.html`, `login.html`, and `admin.html`. There is no visible SPA framework or build pipeline in the file tree.

2. The frontend is therefore page-based rather than component-based at the repo level. Each HTML file likely serves a distinct route/view and contains its own client-side scripts for interaction, data loading, and navigation.

3. Supabase is the main backend dependency. Based on the README, the site uses Supabase for backend services while remaining a static frontend. That usually means authentication plus data storage/querying are handled externally by Supabase rather than by a custom server.

4. `login.html` is the auth boundary. It is likely where users authenticate against Supabase, after which the frontend can access protected content or admin features using the Supabase session.

5. `admin.html` is the privileged management surface. It likely depends on authenticated Supabase access and is separated from public pages, making it the main interface for editing or moderating site data such as articles or authors.

6. `article.html` is the public content detail page. Its presence, together with `functions/article/[[slug]].js`, suggests article content is resolved by a slug-based dynamic lookup rather than hardcoded into the HTML.

7. The `functions/article/[[slug]].js` file is the only clear server-side/runtime boundary in the tree. The `[[slug]]` naming convention indicates a dynamic route handler for article URLs, likely receiving a slug and returning article data or rendered output for that article.

8. The `functions` directory separates backend logic from the static pages. Architecturally, this means the site has two layers: static HTML pages in the root, and a small serverless/function layer for dynamic article resolution.

9. `authors.html` suggests a separate content listing or directory view for author profiles, probably also backed by Supabase data rather than local files.

10. `contact.html` is likely a standalone public form or info page. If it submits data, that submission path would be another client-to-backend flow, but the repository tree alone does not show a dedicated handler beyond whatever Supabase or inline JS provides.

11. The main data flow is therefore: browser loads a static HTML page, page scripts call Supabase and/or the article function, and the response is rendered client-side or inserted into the page. Public content pages are static shells around dynamic data.

12. The key architecture boundary for a diagram is: static frontend hosting on one side, Supabase plus serverless article lookup on the other. The repository appears intentionally lightweight, with most logic pushed into client-side HTML/JS and external services.

Main entry points: [`index.html`](https://github.com/fadilp5x/cloudflareseolimelight/blob/main/index.html) (Home), [`login.html`](https://github.com/fadilp5x/cloudflareseolimelight/blob/main/login.html) (Login), [`admin.html`](https://github.com/fadilp5x/cloudflareseolimelight/blob/main/admin.html) (Admin), [`functions/article/[[slug]].js`](https://github.com/fadilp5x/cloudflareseolimelight/blob/main/functions/article/[[slug]].js) (Article fn)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Static frontend"]
  node_index_html["Home<br/>html page<br/>[index.html]"]
  node_article_html["Article<br/>html page<br/>[article.html]"]
  node_authors_html["Authors<br/>html page<br/>[authors.html]"]
  node_contact_html["Contact<br/>html page<br/>[contact.html]"]
  node_login_html["Login<br/>html page<br/>[login.html]"]
  node_admin_html["Admin<br/>html page<br/>[admin.html]"]
  node_browser_js(("Client JS<br/>page runtime"))
end

subgraph group_backend["Dynamic backend"]
  node_article_slug_fn["Article fn<br/>serverless route<br/>[[[slug]].js]"]
  node_supabase[("Supabase<br/>backend service")]
  node_public_content[("Content data<br/>supabase data")]
  node_session(("Session<br/>auth state"))
end

node_index_html -->|"navigate"| node_article_html
node_index_html -->|"navigate"| node_authors_html
node_index_html -->|"navigate"| node_contact_html
node_index_html -->|"navigate"| node_login_html
node_index_html -->|"navigate"| node_admin_html
node_article_html -->|"load article"| node_article_slug_fn
node_article_slug_fn -->|"query"| node_supabase
node_authors_html -->|"read"| node_supabase
node_contact_html -.->|"submit"| node_supabase
node_login_html -->|"auth"| node_supabase
node_login_html -->|"create"| node_session
node_admin_html -->|"require"| node_session
node_admin_html -->|"write"| node_supabase
node_browser_js -->|"fetch"| node_supabase
node_browser_js -->|"request"| node_article_slug_fn
node_supabase -->|"stores"| node_public_content

click node_index_html "https://github.com/fadilp5x/cloudflareseolimelight/blob/main/index.html"
click node_article_html "https://github.com/fadilp5x/cloudflareseolimelight/blob/main/article.html"
click node_authors_html "https://github.com/fadilp5x/cloudflareseolimelight/blob/main/authors.html"
click node_contact_html "https://github.com/fadilp5x/cloudflareseolimelight/blob/main/contact.html"
click node_login_html "https://github.com/fadilp5x/cloudflareseolimelight/blob/main/login.html"
click node_admin_html "https://github.com/fadilp5x/cloudflareseolimelight/blob/main/admin.html"
click node_article_slug_fn "https://github.com/fadilp5x/cloudflareseolimelight/blob/main/functions/article/[[slug]].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_index_html,node_article_html,node_authors_html,node_contact_html,node_login_html,node_admin_html,node_browser_js toneBlue
class node_article_slug_fn,node_supabase,node_public_content,node_session toneAmber
```

## Components

### Static frontend

HTML entry points and page-level client logic

- [Home](https://github.com/fadilp5x/cloudflareseolimelight/blob/main/index.html): html page · Primary public entry point · `index.html`
- [Article](https://github.com/fadilp5x/cloudflareseolimelight/blob/main/article.html): html page · Public article detail view · `article.html`
- [Authors](https://github.com/fadilp5x/cloudflareseolimelight/blob/main/authors.html): html page · Public author directory · `authors.html`
- [Contact](https://github.com/fadilp5x/cloudflareseolimelight/blob/main/contact.html): html page · Public contact page · `contact.html`
- [Login](https://github.com/fadilp5x/cloudflareseolimelight/blob/main/login.html): html page · Authentication boundary · `login.html`
- [Admin](https://github.com/fadilp5x/cloudflareseolimelight/blob/main/admin.html): html page · Privileged management surface · `admin.html`
- **Client JS**: page runtime · Inline page scripts for loading data and navigation

### Dynamic backend

Serverless article lookup and external data/auth services

- [Article fn](https://github.com/fadilp5x/cloudflareseolimelight/blob/main/functions/article/[[slug]].js): serverless route · Dynamic article lookup by slug · `functions/article/[[slug]].js`
- **Supabase**: backend service · Auth and data storage/query layer
- **Content data**: supabase data · Articles and authors consumed by public pages
- **Session**: auth state · Authenticated user context shared by protected pages

## Connections

- Home → Article: navigate · Home links to article detail views
- Home → Authors: navigate · Home links to author listings
- Home → Contact: navigate · Home links to contact page
- Home → Login: navigate · Home links to sign-in flow
- Home → Admin: navigate · Home links to management surface
- Article → Article fn: load article · Fetches article content by slug
- Article fn → Supabase: query · Resolves article data from backend storage
- Authors → Supabase: read · Loads author directory data
- Contact → Supabase: submit · Sends contact-related data if handled client-side
- Login → Supabase: auth · Authenticates against Supabase
- Login → Session: create · Establishes signed-in session
- Admin → Session: require · Depends on authenticated session
- Admin → Supabase: write · Manages protected content through backend services
- Client JS → Supabase: fetch · Shared client-side data access pattern
- Client JS → Article fn: request · Client-side article loading path
- Supabase → Content data: stores · Backs article and author data
