# zodiax-core/ads architecture

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

- Interactive diagram: https://gitdiagram.com/zodiax-core/ads
- Repository: https://github.com/zodiax-core/ads

## Overview

This is a React website for a creative agency, with a public marketing site, project gallery, login, and an authenticated admin area for managing site content. Visitors enter through the routed app, browse the landing-page sections or gallery, and can submit contact inquiries; administrators sign in and manage gallery images, clients, and site settings. Supabase supplies authentication and persistent content. The graph reflects documented imports and sampled calls; unsampled page details and database schema behavior are not inferred.

Main entry points: [`src/pages/Index.tsx`](https://github.com/zodiax-core/ads/blob/main/src/pages/Index.tsx) (Landing page), [`src/integrations/supabase/client.ts`](https://github.com/zodiax-core/ads/blob/main/src/integrations/supabase/client.ts) (Supabase client), [`src/App.tsx`](https://github.com/zodiax-core/ads/blob/main/src/App.tsx) (App routes), [`src/hooks/useAuth.tsx`](https://github.com/zodiax-core/ads/blob/main/src/hooks/useAuth.tsx) (Auth provider)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_routing["App and routing"]
  node_app["App routes<br/>[App.tsx]"]
end

subgraph group_public["Public website"]
  node_landing["Landing page<br/>[Index.tsx]"]
  node_gallery["Project gallery<br/>[Gallery.tsx]"]
  node_hero["Hero section<br/>[HeroSection.tsx]"]
  node_about["About section<br/>[AboutSection.tsx]"]
  node_services["Services section"]
  node_portfolio["Portfolio section"]
  node_clients["Client showcase<br/>[ClientsSection.tsx]"]
  node_testimonials["Testimonials"]
  node_contact["Contact inquiries<br/>[ContactSection.tsx]"]
  node_navigation["Navigation and footer<br/>[Navbar.tsx]"]
end

subgraph group_admin["Administration"]
  node_login["Login page<br/>[Login.tsx]"]
  node_adminpage["Admin console<br/>[Admin.tsx]"]
end

subgraph group_backend["Auth and persistence"]
  node_auth["Auth provider<br/>[useAuth.tsx]"]
  node_supabaseclient["Supabase client<br/>[client.ts]"]
  node_supabase[("Supabase service")]
end

node_visitor(("Visitor"))

node_visitor -->|"opens site"| node_app
node_app -->|"routes to"| node_landing
node_app -->|"routes to"| node_gallery
node_app -->|"routes to"| node_login
node_app -->|"routes to"| node_adminpage
node_app -->|"provides auth"| node_auth
node_landing -->|"renders"| node_hero
node_landing -->|"renders"| node_about
node_landing -->|"renders"| node_services
node_landing -->|"renders"| node_portfolio
node_landing -->|"renders"| node_clients
node_landing -->|"renders"| node_testimonials
node_landing -->|"renders"| node_contact
node_landing -->|"renders"| node_navigation
node_gallery -->|"renders"| node_navigation
node_clients -->|"reads client data"| node_supabaseclient
node_contact -->|"uses backend"| node_supabaseclient
node_hero -->|"uses backend"| node_supabaseclient
node_gallery -->|"reads gallery data"| node_supabaseclient
node_adminpage -->|"checks access"| node_auth
node_login -->|"signs in"| node_auth
node_auth -->|"calls auth and roles"| node_supabaseclient
node_adminpage -->|"manages content"| node_supabaseclient
node_supabaseclient -->|"connects to"| node_supabase

click node_app "https://github.com/zodiax-core/ads/blob/main/src/App.tsx"
click node_landing "https://github.com/zodiax-core/ads/blob/main/src/pages/Index.tsx"
click node_gallery "https://github.com/zodiax-core/ads/blob/main/src/pages/Gallery.tsx"
click node_hero "https://github.com/zodiax-core/ads/blob/main/src/components/HeroSection.tsx"
click node_about "https://github.com/zodiax-core/ads/blob/main/src/components/AboutSection.tsx"
click node_services "https://github.com/zodiax-core/ads/blob/main/src/components/ServicesSection.tsx"
click node_portfolio "https://github.com/zodiax-core/ads/blob/main/src/components/PortfolioSection.tsx"
click node_clients "https://github.com/zodiax-core/ads/blob/main/src/components/ClientsSection.tsx"
click node_testimonials "https://github.com/zodiax-core/ads/blob/main/src/components/TestimonialsSection.tsx"
click node_contact "https://github.com/zodiax-core/ads/blob/main/src/components/ContactSection.tsx"
click node_navigation "https://github.com/zodiax-core/ads/blob/main/src/components/Navbar.tsx"
click node_login "https://github.com/zodiax-core/ads/blob/main/src/pages/Login.tsx"
click node_adminpage "https://github.com/zodiax-core/ads/blob/main/src/pages/Admin.tsx"
click node_auth "https://github.com/zodiax-core/ads/blob/main/src/hooks/useAuth.tsx"
click node_supabaseclient "https://github.com/zodiax-core/ads/blob/main/src/integrations/supabase/client.ts"

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_app toneBlue
class node_landing,node_gallery,node_hero,node_about,node_services,node_portfolio,node_clients,node_testimonials,node_contact,node_navigation toneAmber
class node_login,node_adminpage toneMint
class node_auth,node_supabaseclient,node_supabase toneRose
class node_visitor toneIndigo
```

## Components

### App and routing

- [App routes](https://github.com/zodiax-core/ads/blob/main/src/App.tsx): `src/App.tsx`

### Public website

- [Landing page](https://github.com/zodiax-core/ads/blob/main/src/pages/Index.tsx): `src/pages/Index.tsx`
- [Project gallery](https://github.com/zodiax-core/ads/blob/main/src/pages/Gallery.tsx): `src/pages/Gallery.tsx`
- [Hero section](https://github.com/zodiax-core/ads/blob/main/src/components/HeroSection.tsx): `src/components/HeroSection.tsx`
- [About section](https://github.com/zodiax-core/ads/blob/main/src/components/AboutSection.tsx): `src/components/AboutSection.tsx`
- [Services section](https://github.com/zodiax-core/ads/blob/main/src/components/ServicesSection.tsx): `src/components/ServicesSection.tsx`
- [Portfolio section](https://github.com/zodiax-core/ads/blob/main/src/components/PortfolioSection.tsx): `src/components/PortfolioSection.tsx`
- [Client showcase](https://github.com/zodiax-core/ads/blob/main/src/components/ClientsSection.tsx): `src/components/ClientsSection.tsx`
- [Testimonials](https://github.com/zodiax-core/ads/blob/main/src/components/TestimonialsSection.tsx): `src/components/TestimonialsSection.tsx`
- [Contact inquiries](https://github.com/zodiax-core/ads/blob/main/src/components/ContactSection.tsx): `src/components/ContactSection.tsx`
- [Navigation and footer](https://github.com/zodiax-core/ads/blob/main/src/components/Navbar.tsx): `src/components/Navbar.tsx`

### Administration

- [Login page](https://github.com/zodiax-core/ads/blob/main/src/pages/Login.tsx): `src/pages/Login.tsx`
- [Admin console](https://github.com/zodiax-core/ads/blob/main/src/pages/Admin.tsx): `src/pages/Admin.tsx`

### Auth and persistence

- [Auth provider](https://github.com/zodiax-core/ads/blob/main/src/hooks/useAuth.tsx): `src/hooks/useAuth.tsx`
- [Supabase client](https://github.com/zodiax-core/ads/blob/main/src/integrations/supabase/client.ts): `src/integrations/supabase/client.ts`
- **Supabase service**

### Other components

- **Visitor**

## Connections

- Visitor → App routes: opens site
- App routes → Landing page: routes to (evidence: `src/App.tsx`)
- App routes → Project gallery: routes to (evidence: `src/App.tsx`)
- App routes → Login page: routes to (evidence: `src/App.tsx`)
- App routes → Admin console: routes to (evidence: `src/App.tsx`)
- App routes → Auth provider: provides auth (evidence: `src/App.tsx`)
- Landing page → Hero section: renders (evidence: `src/pages/Index.tsx`)
- Landing page → About section: renders (evidence: `src/pages/Index.tsx`)
- Landing page → Services section: renders (evidence: `src/pages/Index.tsx`)
- Landing page → Portfolio section: renders (evidence: `src/pages/Index.tsx`)
- Landing page → Client showcase: renders (evidence: `src/pages/Index.tsx`)
- Landing page → Testimonials: renders (evidence: `src/pages/Index.tsx`)
- Landing page → Contact inquiries: renders (evidence: `src/pages/Index.tsx`)
- Landing page → Navigation and footer: renders (evidence: `src/pages/Index.tsx`)
- Project gallery → Navigation and footer: renders (evidence: `src/pages/Gallery.tsx`)
- Client showcase → Supabase client: reads client data (evidence: `src/components/ClientsSection.tsx`)
- Contact inquiries → Supabase client: uses backend (evidence: `src/components/ContactSection.tsx`)
- Hero section → Supabase client: uses backend (evidence: `src/components/HeroSection.tsx`)
- Project gallery → Supabase client: reads gallery data (evidence: `src/pages/Gallery.tsx`)
- Admin console → Auth provider: checks access (evidence: `src/pages/Admin.tsx`)
- Login page → Auth provider: signs in (evidence: `src/pages/Login.tsx`)
- Auth provider → Supabase client: calls auth and roles (evidence: `src/hooks/useAuth.tsx`)
- Admin console → Supabase client: manages content (evidence: `src/pages/Admin.tsx`)
- Supabase client → Supabase service: connects to (evidence: `src/integrations/supabase/client.ts`)
