# ratmir26/ratmir architecture

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

- Interactive diagram: https://gitdiagram.com/ratmir26/ratmir
- Repository: https://github.com/ratmir26/ratmir

## Overview

This is a startup-studio marketing site with authentication and an admin CMS. Visitors enter through the routed React app, load studio content and project cases, and can submit an inquiry; administrators manage sections, projects, and inquiries. Supabase is the evidenced data and authentication service, with fallback content for public sections and projects. The source index identifies the serverless API handlers and additional account/admin pages; those are included, but their unexcerpted runtime details are not inferred beyond documented references.

Main entry points: [`src/pages/LandingPage.tsx`](https://github.com/ratmir26/ratmir/blob/main/src/pages/LandingPage.tsx) (Landing page), [`src/main.tsx`](https://github.com/ratmir26/ratmir/blob/main/src/main.tsx) (App routing), [`src/lib/supabase.ts`](https://github.com/ratmir26/ratmir/blob/main/src/lib/supabase.ts) (Supabase client), [`src/lib/auth.tsx`](https://github.com/ratmir26/ratmir/blob/main/src/lib/auth.tsx) (Auth provider)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_router["App routing<br/>[main.tsx]"]
  node_landing["Landing page<br/>[LandingPage.tsx]"]
  node_hero["Hero and stats<br/>[HeroSection.tsx]"]
  node_services["Services"]
  node_cases["Project cases<br/>[CasesSection.tsx]"]
  node_process["Studio process<br/>[ProcessSection.tsx]"]
  node_trust["Trust content"]
  node_faq["FAQ<br/>[FAQSection.tsx]"]
  node_contact["Contact form<br/>[ContactSection.tsx]"]
end

subgraph group_identity["Identity and accounts"]
  node_authpage["Sign-in page<br/>[AuthPage.tsx]"]
  node_auth["Auth provider<br/>[auth.tsx]"]
  node_profile["User profile<br/>[ProfilePage.tsx]"]
end

subgraph group_content["Content and inquiries"]
  node_adminsections["Section editor<br/>[AdminSections.tsx]"]
  node_adminprojects["Project editor<br/>[AdminProjects.tsx]"]
  node_admininquiries["Inquiry manager<br/>[AdminInquiries.tsx]"]
  node_dataapi["Content data access<br/>[api.ts]"]
  node_fallback["Fallback content<br/>[fallback.ts]"]
  node_clientdb["Supabase client<br/>[supabase.ts]"]
end

subgraph group_server["Serverless API"]
  node_apiinquiries["Inquiry endpoint<br/>[inquiries.js]"]
  node_apiprojects["Projects endpoint"]
  node_apisections["Sections endpoint<br/>[studio_sections.js]"]
  node_serverdb["Server Supabase client<br/>[_supabase.js]"]
  node_restore["Restore trigger<br/>[_wake.js]"]
end

node_visitor(("Visitor"))
node_admin(("Administrator"))
node_supabase[("Supabase")]

node_visitor -->|"opens app"| node_router
node_admin -->|"opens admin"| node_router
node_router -->|"routes to"| node_landing
node_router -->|"routes to"| node_authpage
node_router -->|"routes to"| node_profile
node_router -->|"routes to"| node_adminsections
node_router -->|"routes to"| node_adminprojects
node_router -->|"routes to"| node_admininquiries
node_router -->|"provides auth"| node_auth
node_authpage -->|"uses auth"| node_auth
node_profile -->|"uses auth"| node_auth
node_auth -->|"auth and profiles"| node_clientdb
node_landing -->|"renders"| node_hero
node_landing -->|"renders"| node_services
node_landing -->|"renders"| node_cases
node_landing -->|"renders"| node_process
node_landing -->|"renders"| node_trust
node_landing -->|"renders"| node_faq
node_landing -->|"renders"| node_contact
node_landing -->|"loads and submits"| node_dataapi
node_dataapi -->|"queries and writes"| node_clientdb
node_dataapi -->|"falls back to"| node_fallback
node_clientdb -->|"connects to"| node_supabase
node_adminsections -->|"manages sections"| node_clientdb
node_adminprojects -->|"manages projects"| node_clientdb
node_admininquiries -->|"manages inquiries"| node_clientdb
node_apiinquiries -->|"uses client"| node_serverdb
node_apiprojects -->|"uses client"| node_serverdb
node_apisections -->|"uses client"| node_serverdb
node_serverdb -->|"triggers on errors"| node_restore

click node_router "https://github.com/ratmir26/ratmir/blob/main/src/main.tsx"
click node_landing "https://github.com/ratmir26/ratmir/blob/main/src/pages/LandingPage.tsx"
click node_hero "https://github.com/ratmir26/ratmir/blob/main/src/components/HeroSection.tsx"
click node_services "https://github.com/ratmir26/ratmir/blob/main/src/components/ServicesSection.tsx"
click node_cases "https://github.com/ratmir26/ratmir/blob/main/src/components/CasesSection.tsx"
click node_process "https://github.com/ratmir26/ratmir/blob/main/src/components/ProcessSection.tsx"
click node_trust "https://github.com/ratmir26/ratmir/blob/main/src/components/TestimonialsSection.tsx"
click node_faq "https://github.com/ratmir26/ratmir/blob/main/src/components/FAQSection.tsx"
click node_contact "https://github.com/ratmir26/ratmir/blob/main/src/components/ContactSection.tsx"
click node_authpage "https://github.com/ratmir26/ratmir/blob/main/src/pages/AuthPage.tsx"
click node_auth "https://github.com/ratmir26/ratmir/blob/main/src/lib/auth.tsx"
click node_profile "https://github.com/ratmir26/ratmir/blob/main/src/pages/ProfilePage.tsx"
click node_adminsections "https://github.com/ratmir26/ratmir/blob/main/src/pages/admin/AdminSections.tsx"
click node_adminprojects "https://github.com/ratmir26/ratmir/blob/main/src/pages/admin/AdminProjects.tsx"
click node_admininquiries "https://github.com/ratmir26/ratmir/blob/main/src/pages/admin/AdminInquiries.tsx"
click node_dataapi "https://github.com/ratmir26/ratmir/blob/main/src/lib/api.ts"
click node_fallback "https://github.com/ratmir26/ratmir/blob/main/src/data/fallback.ts"
click node_clientdb "https://github.com/ratmir26/ratmir/blob/main/src/lib/supabase.ts"
click node_apiinquiries "https://github.com/ratmir26/ratmir/blob/main/api/inquiries.js"
click node_apiprojects "https://github.com/ratmir26/ratmir/blob/main/api/startup_projects.js"
click node_apisections "https://github.com/ratmir26/ratmir/blob/main/api/studio_sections.js"
click node_serverdb "https://github.com/ratmir26/ratmir/blob/main/api/_supabase.js"
click node_restore "https://github.com/ratmir26/ratmir/blob/main/api/_wake.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_router,node_landing,node_hero,node_services,node_cases,node_process,node_trust,node_faq,node_contact toneBlue
class node_authpage,node_auth,node_profile,node_supabase toneAmber
class node_adminsections,node_adminprojects,node_admininquiries,node_dataapi,node_fallback,node_clientdb toneMint
class node_apiinquiries,node_apiprojects,node_apisections,node_serverdb,node_restore toneRose
class node_visitor,node_admin toneIndigo
```

## Components

### Web experience

- [App routing](https://github.com/ratmir26/ratmir/blob/main/src/main.tsx): `src/main.tsx`
- [Landing page](https://github.com/ratmir26/ratmir/blob/main/src/pages/LandingPage.tsx): `src/pages/LandingPage.tsx`
- [Hero and stats](https://github.com/ratmir26/ratmir/blob/main/src/components/HeroSection.tsx): `src/components/HeroSection.tsx`
- [Services](https://github.com/ratmir26/ratmir/blob/main/src/components/ServicesSection.tsx): `src/components/ServicesSection.tsx`
- [Project cases](https://github.com/ratmir26/ratmir/blob/main/src/components/CasesSection.tsx): `src/components/CasesSection.tsx`
- [Studio process](https://github.com/ratmir26/ratmir/blob/main/src/components/ProcessSection.tsx): `src/components/ProcessSection.tsx`
- [Trust content](https://github.com/ratmir26/ratmir/blob/main/src/components/TestimonialsSection.tsx): `src/components/TestimonialsSection.tsx`
- [FAQ](https://github.com/ratmir26/ratmir/blob/main/src/components/FAQSection.tsx): `src/components/FAQSection.tsx`
- [Contact form](https://github.com/ratmir26/ratmir/blob/main/src/components/ContactSection.tsx): `src/components/ContactSection.tsx`

### Identity and accounts

- [Sign-in page](https://github.com/ratmir26/ratmir/blob/main/src/pages/AuthPage.tsx): `src/pages/AuthPage.tsx`
- [Auth provider](https://github.com/ratmir26/ratmir/blob/main/src/lib/auth.tsx): `src/lib/auth.tsx`
- [User profile](https://github.com/ratmir26/ratmir/blob/main/src/pages/ProfilePage.tsx): `src/pages/ProfilePage.tsx`

### Content and inquiries

- [Section editor](https://github.com/ratmir26/ratmir/blob/main/src/pages/admin/AdminSections.tsx): `src/pages/admin/AdminSections.tsx`
- [Project editor](https://github.com/ratmir26/ratmir/blob/main/src/pages/admin/AdminProjects.tsx): `src/pages/admin/AdminProjects.tsx`
- [Inquiry manager](https://github.com/ratmir26/ratmir/blob/main/src/pages/admin/AdminInquiries.tsx): `src/pages/admin/AdminInquiries.tsx`
- [Content data access](https://github.com/ratmir26/ratmir/blob/main/src/lib/api.ts): `src/lib/api.ts`
- [Fallback content](https://github.com/ratmir26/ratmir/blob/main/src/data/fallback.ts): `src/data/fallback.ts`
- [Supabase client](https://github.com/ratmir26/ratmir/blob/main/src/lib/supabase.ts): `src/lib/supabase.ts`

### Serverless API

- [Inquiry endpoint](https://github.com/ratmir26/ratmir/blob/main/api/inquiries.js): `api/inquiries.js`
- [Projects endpoint](https://github.com/ratmir26/ratmir/blob/main/api/startup_projects.js): `api/startup_projects.js`
- [Sections endpoint](https://github.com/ratmir26/ratmir/blob/main/api/studio_sections.js): `api/studio_sections.js`
- [Server Supabase client](https://github.com/ratmir26/ratmir/blob/main/api/_supabase.js): `api/_supabase.js`
- [Restore trigger](https://github.com/ratmir26/ratmir/blob/main/api/_wake.js): `api/_wake.js`

### Other components

- **Visitor**
- **Administrator**
- **Supabase**

## Connections

- Visitor → App routing: opens app (evidence: `src/main.tsx`)
- Administrator → App routing: opens admin (evidence: `src/main.tsx`)
- App routing → Landing page: routes to (evidence: `src/main.tsx`)
- App routing → Sign-in page: routes to (evidence: `src/main.tsx`)
- App routing → User profile: routes to (evidence: `src/main.tsx`)
- App routing → Section editor: routes to (evidence: `src/main.tsx`)
- App routing → Project editor: routes to (evidence: `src/main.tsx`)
- App routing → Inquiry manager: routes to (evidence: `src/main.tsx`)
- App routing → Auth provider: provides auth (evidence: `src/main.tsx`)
- Sign-in page → Auth provider: uses auth (evidence: `src/pages/AuthPage.tsx`)
- User profile → Auth provider: uses auth (evidence: `src/pages/ProfilePage.tsx`)
- Auth provider → Supabase client: auth and profiles (evidence: `src/lib/auth.tsx`)
- Landing page → Hero and stats: renders (evidence: `src/pages/LandingPage.tsx`)
- Landing page → Services: renders (evidence: `src/pages/LandingPage.tsx`)
- Landing page → Project cases: renders (evidence: `src/pages/LandingPage.tsx`)
- Landing page → Studio process: renders (evidence: `src/pages/LandingPage.tsx`)
- Landing page → Trust content: renders (evidence: `src/pages/LandingPage.tsx`)
- Landing page → FAQ: renders (evidence: `src/pages/LandingPage.tsx`)
- Landing page → Contact form: renders (evidence: `src/pages/LandingPage.tsx`)
- Landing page → Content data access: loads and submits (evidence: `src/pages/LandingPage.tsx`)
- Content data access → Supabase client: queries and writes (evidence: `src/lib/api.ts`)
- Content data access → Fallback content: falls back to (evidence: `src/lib/api.ts`)
- Supabase client → Supabase: connects to (evidence: `src/lib/supabase.ts`)
- Section editor → Supabase client: manages sections (evidence: `src/pages/admin/AdminSections.tsx`)
- Project editor → Supabase client: manages projects (evidence: `src/pages/admin/AdminProjects.tsx`)
- Inquiry manager → Supabase client: manages inquiries (evidence: `src/pages/admin/AdminInquiries.tsx`)
- Inquiry endpoint → Server Supabase client: uses client (evidence: `api/inquiries.js`)
- Projects endpoint → Server Supabase client: uses client (evidence: `api/startup_projects.js`)
- Sections endpoint → Server Supabase client: uses client (evidence: `api/studio_sections.js`)
- Server Supabase client → Restore trigger: triggers on errors (evidence: `api/_supabase.js`)
