# annyelyeon/annportfoliowebsite architecture

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

- Interactive diagram: https://gitdiagram.com/annyelyeon/annportfoliowebsite
- Repository: https://github.com/annyelyeon/annportfoliowebsite

## Overview

Yelyeon is a static portfolio with public profile, project, blog, and thoughts pages plus a browser-based admin editor. Visitors browse filtered project or post lists, then open individual Markdown reports; admins sign in, manage drafts and published items, and upload images. Supabase is the configured content store, with sample data as the documented fallback. The graph distinguishes listing, detail rendering, and admin editing. Relationships for the unsampled HTML pages and database schema are limited to README documentation and the shown JavaScript.

Main entry points: [`js/main.js`](https://github.com/annyelyeon/annportfoliowebsite/blob/main/js/main.js) (Page rendering), [`js/api.js`](https://github.com/annyelyeon/annportfoliowebsite/blob/main/js/api.js) (Content queries), [`js/article.js`](https://github.com/annyelyeon/annportfoliowebsite/blob/main/js/article.js) (Article rendering), [`admin/edit.js`](https://github.com/annyelyeon/annportfoliowebsite/blob/main/admin/edit.js) (Markdown editor)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_public["Public portfolio"]
  node_listing_pages["Portfolio pages<br/>[index.html]"]
  node_project_list["Projects listing<br/>[projects.html]"]
  node_blog_list["Blog listing<br/>[blog.html]"]
  node_thoughts_list["Thoughts listing<br/>[thoughts.html]"]
  node_profile_page["About page<br/>[about.html]"]
  node_post_page["Post detail<br/>[post.html]"]
  node_project_page["Project detail<br/>[project.html]"]
end

subgraph group_content["Content access"]
  node_content_api["Content queries<br/>[api.js]"]
  node_supabase_config["Supabase config<br/>[config.js]"]
  node_supabase[("Supabase service")]
  node_schema["Tables and policies<br/>[schema.sql]"]
end

subgraph group_admin["Admin authoring"]
  node_admin_dashboard["Admin dashboard<br/>[admin.js]"]
  node_editor["Markdown editor<br/>[edit.js]"]
  node_admin_pages["Admin screens<br/>[index.html]"]
end

subgraph group_rendering["Rendering and profile"]
  node_public_ui["Page rendering<br/>[main.js]"]
  node_article_ui["Article rendering<br/>[article.js]"]
  node_profile_data["Profile and samples<br/>[data.js]"]
  node_markdown["Markdown sanitizer<br/>[markdown.js]"]
  node_utilities["Display utilities<br/>[util.js]"]
end

node_visitor(("Visitor"))
node_admin_user(("Admin user"))

node_visitor -->|"browses"| node_listing_pages
node_visitor -->|"browses"| node_project_list
node_visitor -->|"browses"| node_blog_list
node_visitor -->|"browses"| node_thoughts_list
node_visitor -->|"browses"| node_profile_page
node_visitor -->|"opens"| node_post_page
node_visitor -->|"opens"| node_project_page
node_listing_pages -.->|"loads"| node_public_ui
node_project_list -.->|"loads"| node_public_ui
node_blog_list -.->|"loads"| node_public_ui
node_thoughts_list -.->|"loads"| node_public_ui
node_profile_page -.->|"loads"| node_public_ui
node_post_page -.->|"loads"| node_article_ui
node_project_page -.->|"loads"| node_article_ui
node_public_ui -->|"lists content"| node_content_api
node_public_ui -.->|"renders profile"| node_profile_data
node_article_ui -->|"fetches by slug"| node_content_api
node_article_ui -->|"renders Markdown"| node_markdown
node_article_ui -->|"formats metadata"| node_utilities
node_public_ui -->|"formats cards"| node_utilities
node_content_api -->|"reads credentials"| node_supabase_config
node_content_api -.->|"queries content"| node_supabase
node_content_api -.->|"uses fallback"| node_profile_data
node_admin_user -->|"uses"| node_admin_pages
node_admin_pages -.->|"loads"| node_admin_dashboard
node_admin_pages -.->|"opens editor"| node_editor
node_admin_dashboard -->|"authenticates and lists"| node_supabase
node_editor -->|"edits and uploads"| node_supabase
node_editor -->|"previews content"| node_markdown
node_supabase -->|"uses schema policies"| node_schema

click node_listing_pages "https://github.com/annyelyeon/annportfoliowebsite/blob/main/index.html"
click node_project_list "https://github.com/annyelyeon/annportfoliowebsite/blob/main/projects.html"
click node_blog_list "https://github.com/annyelyeon/annportfoliowebsite/blob/main/blog.html"
click node_thoughts_list "https://github.com/annyelyeon/annportfoliowebsite/blob/main/thoughts.html"
click node_profile_page "https://github.com/annyelyeon/annportfoliowebsite/blob/main/about.html"
click node_post_page "https://github.com/annyelyeon/annportfoliowebsite/blob/main/post.html"
click node_project_page "https://github.com/annyelyeon/annportfoliowebsite/blob/main/project.html"
click node_public_ui "https://github.com/annyelyeon/annportfoliowebsite/blob/main/js/main.js"
click node_article_ui "https://github.com/annyelyeon/annportfoliowebsite/blob/main/js/article.js"
click node_profile_data "https://github.com/annyelyeon/annportfoliowebsite/blob/main/js/data.js"
click node_markdown "https://github.com/annyelyeon/annportfoliowebsite/blob/main/js/markdown.js"
click node_utilities "https://github.com/annyelyeon/annportfoliowebsite/blob/main/js/util.js"
click node_content_api "https://github.com/annyelyeon/annportfoliowebsite/blob/main/js/api.js"
click node_supabase_config "https://github.com/annyelyeon/annportfoliowebsite/blob/main/js/config.js"
click node_admin_dashboard "https://github.com/annyelyeon/annportfoliowebsite/blob/main/admin/admin.js"
click node_editor "https://github.com/annyelyeon/annportfoliowebsite/blob/main/admin/edit.js"
click node_admin_pages "https://github.com/annyelyeon/annportfoliowebsite/blob/main/admin/index.html"
click node_schema "https://github.com/annyelyeon/annportfoliowebsite/blob/main/supabase/schema.sql"

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_listing_pages,node_project_list,node_blog_list,node_thoughts_list,node_profile_page,node_post_page,node_project_page,node_admin_user toneBlue
class node_content_api,node_supabase_config,node_supabase,node_schema toneAmber
class node_admin_dashboard,node_editor,node_admin_pages toneMint
class node_public_ui,node_article_ui,node_profile_data,node_markdown,node_utilities toneRose
class node_visitor toneIndigo
```

## Components

### Public portfolio

- [Portfolio pages](https://github.com/annyelyeon/annportfoliowebsite/blob/main/index.html): `index.html`
- [Projects listing](https://github.com/annyelyeon/annportfoliowebsite/blob/main/projects.html): `projects.html`
- [Blog listing](https://github.com/annyelyeon/annportfoliowebsite/blob/main/blog.html): `blog.html`
- [Thoughts listing](https://github.com/annyelyeon/annportfoliowebsite/blob/main/thoughts.html): `thoughts.html`
- [About page](https://github.com/annyelyeon/annportfoliowebsite/blob/main/about.html): `about.html`
- [Post detail](https://github.com/annyelyeon/annportfoliowebsite/blob/main/post.html): `post.html`
- [Project detail](https://github.com/annyelyeon/annportfoliowebsite/blob/main/project.html): `project.html`

### Content access

- [Content queries](https://github.com/annyelyeon/annportfoliowebsite/blob/main/js/api.js): `js/api.js`
- [Supabase config](https://github.com/annyelyeon/annportfoliowebsite/blob/main/js/config.js): `js/config.js`
- **Supabase service**
- [Tables and policies](https://github.com/annyelyeon/annportfoliowebsite/blob/main/supabase/schema.sql): `supabase/schema.sql`

### Admin authoring

- [Admin dashboard](https://github.com/annyelyeon/annportfoliowebsite/blob/main/admin/admin.js): `admin/admin.js`
- [Markdown editor](https://github.com/annyelyeon/annportfoliowebsite/blob/main/admin/edit.js): `admin/edit.js`
- [Admin screens](https://github.com/annyelyeon/annportfoliowebsite/blob/main/admin/index.html): `admin/index.html`

### Rendering and profile

- [Page rendering](https://github.com/annyelyeon/annportfoliowebsite/blob/main/js/main.js): `js/main.js`
- [Article rendering](https://github.com/annyelyeon/annportfoliowebsite/blob/main/js/article.js): `js/article.js`
- [Profile and samples](https://github.com/annyelyeon/annportfoliowebsite/blob/main/js/data.js): `js/data.js`
- [Markdown sanitizer](https://github.com/annyelyeon/annportfoliowebsite/blob/main/js/markdown.js): `js/markdown.js`
- [Display utilities](https://github.com/annyelyeon/annportfoliowebsite/blob/main/js/util.js): `js/util.js`

### Other components

- **Visitor**
- **Admin user**

## Connections

- Visitor → Portfolio pages: browses (evidence: `README.md`)
- Visitor → Projects listing: browses (evidence: `README.md`)
- Visitor → Blog listing: browses (evidence: `README.md`)
- Visitor → Thoughts listing: browses (evidence: `README.md`)
- Visitor → About page: browses (evidence: `README.md`)
- Visitor → Post detail: opens (evidence: `README.md`)
- Visitor → Project detail: opens (evidence: `README.md`)
- Portfolio pages → Page rendering: loads
- Projects listing → Page rendering: loads
- Blog listing → Page rendering: loads
- Thoughts listing → Page rendering: loads
- About page → Page rendering: loads
- Post detail → Article rendering: loads
- Project detail → Article rendering: loads
- Page rendering → Content queries: lists content (evidence: `js/main.js`)
- Page rendering → Profile and samples: renders profile
- Article rendering → Content queries: fetches by slug (evidence: `js/article.js`)
- Article rendering → Markdown sanitizer: renders Markdown (evidence: `js/article.js`)
- Article rendering → Display utilities: formats metadata (evidence: `js/article.js`)
- Page rendering → Display utilities: formats cards (evidence: `js/main.js`)
- Content queries → Supabase config: reads credentials (evidence: `js/api.js`)
- Content queries → Supabase service: queries content
- Content queries → Profile and samples: uses fallback
- Admin user → Admin screens: uses (evidence: `README.md`)
- Admin screens → Admin dashboard: loads
- Admin screens → Markdown editor: opens editor
- Admin dashboard → Supabase service: authenticates and lists (evidence: `admin/admin.js`)
- Markdown editor → Supabase service: edits and uploads (evidence: `admin/edit.js`)
- Markdown editor → Markdown sanitizer: previews content (evidence: `admin/edit.js`)
- Supabase service → Tables and policies: uses schema policies (evidence: `README.md`)
