# 05aly/eng_abd_port architecture

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

- Interactive diagram: https://gitdiagram.com/05aly/eng_abd_port
- Repository: https://github.com/05aly/eng_abd_port

## Overview

This is a React portfolio with a public profile and project showcase, plus a separate admin workflow for signing in and managing project content. Visitors load the homepage, which retrieves published projects for a carousel, and can open individual project pages. Admins authenticate, pass an admin check, then create, edit, publish, hide, or delete projects and upload images. Supabase provides authentication, project data, and image storage. UI animation helpers and video-link validation are internal layers. The graph follows only relationships visible in excerpts or documented in the README; SQL policies and schema are described but not sampled.

Main entry points: [`src/pages/Project.jsx`](https://github.com/05aly/eng_abd_port/blob/main/src/pages/Project.jsx) (Project detail), [`src/pages/Home.jsx`](https://github.com/05aly/eng_abd_port/blob/main/src/pages/Home.jsx) (Portfolio home), [`src/App.jsx`](https://github.com/05aly/eng_abd_port/blob/main/src/App.jsx) (Route and admin gate), [`src/lib/supabase.js`](https://github.com/05aly/eng_abd_port/blob/main/src/lib/supabase.js) (Supabase client and media URLs)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_public["Public portfolio"]
  node_home["Portfolio home<br/>[Home.jsx]"]
  node_carousel["Project carousel"]
  node_project["Project detail<br/>[Project.jsx]"]
end

subgraph group_admin["Admin management"]
  node_router["Route and admin gate<br/>[App.jsx]"]
  node_login["Admin sign-in<br/>[AdminLogin.jsx]"]
  node_editor["Project management<br/>[Admin.jsx]"]
end

subgraph group_shared["Shared UI and utilities"]
  node_animations["Reveal and motion hooks<br/>[hooks.js]"]
  node_wires["Circuit visual<br/>[Wires.jsx]"]
  node_split["Animated headings<br/>[Split.jsx]"]
  node_count["Count display<br/>[Count.jsx]"]
  node_video["Video URL embed<br/>[video.js]"]
end

subgraph group_backend["Supabase services"]
  node_supabaseclient["Supabase client and media URLs<br/>[supabase.js]"]
  node_auth["Supabase Auth"]
  node_projectdata[("Projects data<br/>[schema.sql]")]
  node_storage[("Project image storage<br/>[storage.sql]")]
end

node_visitor(("Visitor"))
node_adminuser(("Admin user"))
node_videohost["YouTube or Vimeo"]

node_visitor -->|"opens site"| node_router
node_router -->|"routes to"| node_home
node_router -->|"routes to"| node_project
node_home -->|"loads published"| node_projectdata
node_home -->|"renders projects"| node_carousel
node_carousel -->|"links details"| node_project
node_project -->|"loads project"| node_projectdata
node_home -->|"uses client"| node_supabaseclient
node_project -->|"uses client"| node_supabaseclient
node_carousel -->|"resolves images"| node_supabaseclient
node_visitor -->|"admin sign-in"| node_adminuser
node_adminuser -->|"opens admin"| node_router
node_router -->|"checks session and role"| node_auth
node_router -->|"admits admin"| node_editor
node_router -->|"routes sign-in"| node_login
node_login -->|"signs in and checks role"| node_auth
node_login -->|"navigates after login"| node_router
node_editor -->|"reads and writes"| node_projectdata
node_editor -->|"uploads and removes"| node_storage
node_editor -->|"uses client"| node_supabaseclient
node_supabaseclient -->|"configures auth"| node_auth
node_supabaseclient -->|"gets public image URLs"| node_storage
node_home -->|"uses hooks"| node_animations
node_project -->|"reveals content"| node_animations
node_wires -->|"checks motion preference"| node_animations
node_home -->|"renders"| node_wires
node_project -->|"renders"| node_wires
node_home -->|"renders headings"| node_split
node_project -->|"renders headings"| node_split
node_home -->|"renders metrics"| node_count
node_editor -->|"validates video links"| node_video
node_project -->|"builds embed URL"| node_video
node_project -.->|"embeds video"| node_videohost

click node_home "https://github.com/05aly/eng_abd_port/blob/main/src/pages/Home.jsx"
click node_carousel "https://github.com/05aly/eng_abd_port/blob/main/src/components/ProjectCarousel.jsx"
click node_project "https://github.com/05aly/eng_abd_port/blob/main/src/pages/Project.jsx"
click node_router "https://github.com/05aly/eng_abd_port/blob/main/src/App.jsx"
click node_login "https://github.com/05aly/eng_abd_port/blob/main/src/pages/AdminLogin.jsx"
click node_editor "https://github.com/05aly/eng_abd_port/blob/main/src/pages/Admin.jsx"
click node_animations "https://github.com/05aly/eng_abd_port/blob/main/src/lib/hooks.js"
click node_wires "https://github.com/05aly/eng_abd_port/blob/main/src/components/Wires.jsx"
click node_split "https://github.com/05aly/eng_abd_port/blob/main/src/components/Split.jsx"
click node_count "https://github.com/05aly/eng_abd_port/blob/main/src/components/Count.jsx"
click node_video "https://github.com/05aly/eng_abd_port/blob/main/src/lib/video.js"
click node_supabaseclient "https://github.com/05aly/eng_abd_port/blob/main/src/lib/supabase.js"
click node_projectdata "https://github.com/05aly/eng_abd_port/blob/main/supabase/schema.sql"
click node_storage "https://github.com/05aly/eng_abd_port/blob/main/supabase/storage.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_home,node_carousel,node_project,node_adminuser toneBlue
class node_router,node_login,node_editor toneAmber
class node_animations,node_wires,node_split,node_count,node_video toneMint
class node_supabaseclient,node_auth,node_projectdata,node_storage toneRose
class node_visitor,node_videohost toneIndigo
```

## Components

### Public portfolio

- [Portfolio home](https://github.com/05aly/eng_abd_port/blob/main/src/pages/Home.jsx): `src/pages/Home.jsx`
- [Project carousel](https://github.com/05aly/eng_abd_port/blob/main/src/components/ProjectCarousel.jsx): `src/components/ProjectCarousel.jsx`
- [Project detail](https://github.com/05aly/eng_abd_port/blob/main/src/pages/Project.jsx): `src/pages/Project.jsx`

### Admin management

- [Route and admin gate](https://github.com/05aly/eng_abd_port/blob/main/src/App.jsx): `src/App.jsx`
- [Admin sign-in](https://github.com/05aly/eng_abd_port/blob/main/src/pages/AdminLogin.jsx): `src/pages/AdminLogin.jsx`
- [Project management](https://github.com/05aly/eng_abd_port/blob/main/src/pages/Admin.jsx): `src/pages/Admin.jsx`

### Shared UI and utilities

- [Reveal and motion hooks](https://github.com/05aly/eng_abd_port/blob/main/src/lib/hooks.js): `src/lib/hooks.js`
- [Circuit visual](https://github.com/05aly/eng_abd_port/blob/main/src/components/Wires.jsx): `src/components/Wires.jsx`
- [Animated headings](https://github.com/05aly/eng_abd_port/blob/main/src/components/Split.jsx): `src/components/Split.jsx`
- [Count display](https://github.com/05aly/eng_abd_port/blob/main/src/components/Count.jsx): `src/components/Count.jsx`
- [Video URL embed](https://github.com/05aly/eng_abd_port/blob/main/src/lib/video.js): `src/lib/video.js`

### Supabase services

- [Supabase client and media URLs](https://github.com/05aly/eng_abd_port/blob/main/src/lib/supabase.js): `src/lib/supabase.js`
- **Supabase Auth**
- [Projects data](https://github.com/05aly/eng_abd_port/blob/main/supabase/schema.sql): `supabase/schema.sql`
- [Project image storage](https://github.com/05aly/eng_abd_port/blob/main/supabase/storage.sql): `supabase/storage.sql`

### Other components

- **Visitor**
- **Admin user**
- **YouTube or Vimeo**

## Connections

- Visitor → Route and admin gate: opens site (evidence: `README.md`)
- Route and admin gate → Portfolio home: routes to (evidence: `src/App.jsx`)
- Route and admin gate → Project detail: routes to (evidence: `src/App.jsx`)
- Portfolio home → Projects data: loads published (evidence: `src/pages/Home.jsx`)
- Portfolio home → Project carousel: renders projects (evidence: `src/pages/Home.jsx`)
- Project carousel → Project detail: links details (evidence: `src/components/ProjectCarousel.jsx`)
- Project detail → Projects data: loads project (evidence: `src/pages/Project.jsx`)
- Portfolio home → Supabase client and media URLs: uses client (evidence: `src/pages/Home.jsx`)
- Project detail → Supabase client and media URLs: uses client (evidence: `src/pages/Project.jsx`)
- Project carousel → Supabase client and media URLs: resolves images (evidence: `src/components/ProjectCarousel.jsx`)
- Visitor → Admin user: admin sign-in (evidence: `README.md`)
- Admin user → Route and admin gate: opens admin (evidence: `README.md`)
- Route and admin gate → Supabase Auth: checks session and role (evidence: `src/App.jsx`)
- Route and admin gate → Project management: admits admin (evidence: `src/App.jsx`)
- Route and admin gate → Admin sign-in: routes sign-in (evidence: `src/App.jsx`)
- Admin sign-in → Supabase Auth: signs in and checks role (evidence: `src/pages/AdminLogin.jsx`)
- Admin sign-in → Route and admin gate: navigates after login (evidence: `src/pages/AdminLogin.jsx`)
- Project management → Projects data: reads and writes (evidence: `src/pages/Admin.jsx`)
- Project management → Project image storage: uploads and removes (evidence: `src/pages/Admin.jsx`)
- Project management → Supabase client and media URLs: uses client (evidence: `src/pages/Admin.jsx`)
- Supabase client and media URLs → Supabase Auth: configures auth (evidence: `src/lib/supabase.js`)
- Supabase client and media URLs → Project image storage: gets public image URLs (evidence: `src/lib/supabase.js`)
- Portfolio home → Reveal and motion hooks: uses hooks (evidence: `src/pages/Home.jsx`)
- Project detail → Reveal and motion hooks: reveals content (evidence: `src/pages/Project.jsx`)
- Circuit visual → Reveal and motion hooks: checks motion preference (evidence: `src/components/Wires.jsx`)
- Portfolio home → Circuit visual: renders (evidence: `src/pages/Home.jsx`)
- Project detail → Circuit visual: renders (evidence: `src/pages/Project.jsx`)
- Portfolio home → Animated headings: renders headings (evidence: `src/pages/Home.jsx`)
- Project detail → Animated headings: renders headings (evidence: `src/pages/Project.jsx`)
- Portfolio home → Count display: renders metrics (evidence: `src/pages/Home.jsx`)
- Project management → Video URL embed: validates video links (evidence: `src/pages/Admin.jsx`)
- Project detail → Video URL embed: builds embed URL (evidence: `src/pages/Project.jsx`)
- Project detail → YouTube or Vimeo: embeds video (evidence: `src/pages/Project.jsx`)
