# zaygal/zay-studio architecture

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

- Interactive diagram: https://gitdiagram.com/zaygal/zay-studio
- Repository: https://github.com/zaygal/zay-studio

## Overview

#### Purpose and Runtime
Zay Studio is a static-oriented marketing site for a software studio. It runs on Next.js App Router with React/TypeScript, Tailwind CSS, and PostCSS. Production deployment is Vercel, which automatically deploys pushes to `main`; the live site is `zays.vercel.app`.

Key application entry points:
- `app/layout.tsx` defines the shared document shell, fonts, and global layout.
- `app/page.tsx` serves the homepage.
- `app/globals.css` supplies site-wide styling.

#### Route Layer
The App Router exposes four primary user-facing flows:
- Homepage composition: `app/page.tsx`
- Case-study index: `app/case-studies/page.tsx`
- Dynamic case-study detail: `app/case-studies/[slug]/page.tsx`
- Contact page: `app/contact/page.tsx`

The dynamic `[slug]` route is the principal content-driven route: its rendered result is selected from a slug rather than requiring a new page implementation per project.

#### Homepage Composition
The homepage is assembled from independently maintained marketing sections under `components/`. This creates a clear boundary between route ownership and section-level content/presentation.

Core sections include:
- `components/Hero.tsx`
- `components/WhatWeBuild.tsx`
- `components/ProblemsWeSolve.tsx`
- `components/FeaturedProject.tsx`
- `components/CTA.tsx`
- `components/Nav.tsx`
- `components/Footer.tsx`

Additional trust, capability, and status content is represented by sibling components such as `components/Trust.tsx`, `components/TechStack.tsx`, and `components/StatusPanel.tsx`.

#### Case-Study Content Pipeline
`lib/case-studies.ts` is the single source of truth for case-study records, including identity, slug, descriptive content, and optional visual assets. Both case-study routes consume this data:
1. `app/case-studies/page.tsx` presents the collection.
2. A visitor selects a project URL.
3. `app/case-studies/[slug]/page.tsx` resolves and renders the matching record.

Adding a record with a unique slug to `lib/case-studies.ts` automatically makes it available through the dynamic detail route. This is a local, code-managed content model rather than a CMS or database integration.

#### Asset Boundary
Case-study visuals are static files served from `public/`. CopaLog-specific screens reside in `public/copalog/` and are referenced from `lib/case-studies.ts` through `heroScreen` and `screens` fields. This separates authored case-study metadata from deployed image assets while keeping both versioned in the repository.

#### Contact Submission Integration
The contact interaction is implemented in `components/ContactForm.tsx`, used by the contact route and potentially reusable from calls to action. Submission leaves the application boundary via the configured Formspree endpoint (`FORMSPREE_ENDPOINT`), which delivers messages to the email associated with that Formspree form. No internal API route, persistence layer, or authentication service is indicated.

#### Build and Deployment Boundary
Next.js compiles server and client route bundles into `.next/`; these are generated artifacts and not source architecture. Framework behavior is configured through:
- `next.config.mjs`
- `tailwind.config.ts`
- `tsconfig.json`

Vercel hosts the Next.js runtime and static assets. There are no indicated databases, queues, CMS platforms, custom backend services, or custom build/deployment overrides.

Main entry points: [`app/page.tsx`](https://github.com/zaygal/zay-studio/blob/main/app/page.tsx) (Homepage), [`app/layout.tsx`](https://github.com/zaygal/zay-studio/blob/main/app/layout.tsx) (Shared document shell), [`lib/case-studies.ts`](https://github.com/zaygal/zay-studio/blob/main/lib/case-studies.ts) (Case-study records), [`app/case-studies/page.tsx`](https://github.com/zaygal/zay-studio/blob/main/app/case-studies/page.tsx) (Case-study index)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_routes["App Router routes"]
  node_layout["Shared document shell<br/>Next.js layout<br/>[layout.tsx]"]
  node_home["Homepage<br/>Next.js route<br/>[page.tsx]"]
  node_case_index["Case-study index<br/>Next.js route<br/>[page.tsx]"]
  node_case_detail["Case-study detail<br/>Dynamic Next.js route<br/>[page.tsx]"]
  node_contact["Contact page<br/>Next.js route<br/>[page.tsx]"]
end

subgraph group_homepage["Homepage sections"]
  node_nav["Navigation<br/>React component<br/>[Nav.tsx]"]
  node_hero["Hero<br/>React section<br/>[Hero.tsx]"]
  node_what_we_build["What We Build<br/>React section<br/>[WhatWeBuild.tsx]"]
  node_problems["Problems We Solve<br/>React section"]
  node_featured_project["Featured project<br/>React section"]
  node_cta["Calls to action<br/>React section<br/>[CTA.tsx]"]
  node_footer["Footer<br/>React component<br/>[Footer.tsx]"]
end

subgraph group_content["Case-study content"]
  node_case_data["Case-study records<br/>Content module<br/>[case-studies.ts]"]
  node_copalog_assets["CopaLog visuals<br/>Static assets"]
end

node_global_css["Global styles<br/>CSS<br/>[globals.css]"]
node_contact_form["Contact form<br/>React component<br/>[ContactForm.tsx]"]
node_formspree{{"Formspree<br/>External form service"}}
node_vercel{{"Vercel deployment<br/>Hosting platform"}}

node_layout -->|"loads"| node_global_css
node_layout -->|"wraps"| node_home
node_layout -->|"wraps"| node_case_index
node_layout -->|"wraps"| node_case_detail
node_layout -->|"wraps"| node_contact
node_home -->|"composes"| node_nav
node_home -->|"composes"| node_hero
node_home -->|"composes"| node_what_we_build
node_home -->|"composes"| node_problems
node_home -->|"composes"| node_featured_project
node_home -->|"composes"| node_cta
node_home -->|"composes"| node_footer
node_case_index -->|"lists records"| node_case_data
node_case_detail -->|"resolves slug"| node_case_data
node_case_data -->|"references visuals"| node_copalog_assets
node_contact -->|"renders"| node_contact_form
node_contact_form -->|"submits to"| node_formspree
node_home -.->|"deployed on"| node_vercel

click node_layout "https://github.com/zaygal/zay-studio/blob/main/app/layout.tsx"
click node_home "https://github.com/zaygal/zay-studio/blob/main/app/page.tsx"
click node_case_index "https://github.com/zaygal/zay-studio/blob/main/app/case-studies/page.tsx"
click node_case_detail "https://github.com/zaygal/zay-studio/blob/main/app/case-studies/%5Bslug%5D/page.tsx"
click node_contact "https://github.com/zaygal/zay-studio/blob/main/app/contact/page.tsx"
click node_global_css "https://github.com/zaygal/zay-studio/blob/main/app/globals.css"
click node_nav "https://github.com/zaygal/zay-studio/blob/main/components/Nav.tsx"
click node_hero "https://github.com/zaygal/zay-studio/blob/main/components/Hero.tsx"
click node_what_we_build "https://github.com/zaygal/zay-studio/blob/main/components/WhatWeBuild.tsx"
click node_problems "https://github.com/zaygal/zay-studio/blob/main/components/ProblemsWeSolve.tsx"
click node_featured_project "https://github.com/zaygal/zay-studio/blob/main/components/FeaturedProject.tsx"
click node_cta "https://github.com/zaygal/zay-studio/blob/main/components/CTA.tsx"
click node_footer "https://github.com/zaygal/zay-studio/blob/main/components/Footer.tsx"
click node_case_data "https://github.com/zaygal/zay-studio/blob/main/lib/case-studies.ts"
click node_copalog_assets "https://github.com/zaygal/zay-studio/tree/main/public/copalog"
click node_contact_form "https://github.com/zaygal/zay-studio/blob/main/components/ContactForm.tsx"

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_layout,node_home,node_case_index,node_case_detail,node_contact toneBlue
class node_nav,node_hero,node_what_we_build,node_problems,node_featured_project,node_cta,node_footer toneAmber
class node_case_data,node_copalog_assets toneMint
class node_global_css,node_contact_form,node_formspree,node_vercel toneNeutral
```

## Components

### App Router routes

User-facing page entry points.

- [Shared document shell](https://github.com/zaygal/zay-studio/blob/main/app/layout.tsx): Next.js layout · Defines fonts and global page layout. · `app/layout.tsx`
- [Homepage](https://github.com/zaygal/zay-studio/blob/main/app/page.tsx): Next.js route · `app/page.tsx`
- [Case-study index](https://github.com/zaygal/zay-studio/blob/main/app/case-studies/page.tsx): Next.js route · `app/case-studies/page.tsx`
- [Case-study detail](https://github.com/zaygal/zay-studio/blob/main/app/case-studies/%5Bslug%5D/page.tsx): Dynamic Next.js route · Resolves a project from its slug. · `app/case-studies/[slug]/page.tsx`
- [Contact page](https://github.com/zaygal/zay-studio/blob/main/app/contact/page.tsx): Next.js route · `app/contact/page.tsx`

### Homepage sections

Composable marketing content.

- [Navigation](https://github.com/zaygal/zay-studio/blob/main/components/Nav.tsx): React component · `components/Nav.tsx`
- [Hero](https://github.com/zaygal/zay-studio/blob/main/components/Hero.tsx): React section · `components/Hero.tsx`
- [What We Build](https://github.com/zaygal/zay-studio/blob/main/components/WhatWeBuild.tsx): React section · `components/WhatWeBuild.tsx`
- [Problems We Solve](https://github.com/zaygal/zay-studio/blob/main/components/ProblemsWeSolve.tsx): React section · `components/ProblemsWeSolve.tsx`
- [Featured project](https://github.com/zaygal/zay-studio/blob/main/components/FeaturedProject.tsx): React section · `components/FeaturedProject.tsx`
- [Calls to action](https://github.com/zaygal/zay-studio/blob/main/components/CTA.tsx): React section · `components/CTA.tsx`
- [Footer](https://github.com/zaygal/zay-studio/blob/main/components/Footer.tsx): React component · `components/Footer.tsx`

### Case-study content

Local code-managed content and assets.

- [Case-study records](https://github.com/zaygal/zay-studio/blob/main/lib/case-studies.ts): Content module · Single source of truth for project records and slugs. · `lib/case-studies.ts`
- [CopaLog visuals](https://github.com/zaygal/zay-studio/tree/main/public/copalog): Static assets · Images referenced by case-study heroScreen and screens fields. · `public/copalog`

### Other components

- [Global styles](https://github.com/zaygal/zay-studio/blob/main/app/globals.css): CSS · `app/globals.css`
- [Contact form](https://github.com/zaygal/zay-studio/blob/main/components/ContactForm.tsx): React component · Posts submissions to the configured Formspree endpoint. · `components/ContactForm.tsx`
- **Formspree**: External form service · Delivers contact messages to the form email.
- **Vercel deployment**: Hosting platform · Deploys pushes to main and serves the site.

## Connections

- Shared document shell → Global styles: loads
- Shared document shell → Homepage: wraps
- Shared document shell → Case-study index: wraps
- Shared document shell → Case-study detail: wraps
- Shared document shell → Contact page: wraps
- Homepage → Navigation: composes
- Homepage → Hero: composes
- Homepage → What We Build: composes
- Homepage → Problems We Solve: composes
- Homepage → Featured project: composes
- Homepage → Calls to action: composes
- Homepage → Footer: composes
- Case-study index → Case-study records: lists records
- Case-study detail → Case-study records: resolves slug
- Case-study records → CopaLog visuals: references visuals
- Contact page → Contact form: renders
- Contact form → Formspree: submits to
- Homepage → Vercel deployment: deployed on
