# alancuenca/business-starter architecture

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

- Interactive diagram: https://gitdiagram.com/alancuenca/business-starter
- Repository: https://github.com/alancuenca/business-starter

## Overview

#### Purpose and Runtime
FixIt Pro is a static-first Astro 5 marketing theme for local trade and renovation businesses. Astro renders HTML pages and content-collection routes; deployment targets any static host. Node.js 18+ and pnpm are the development/build runtime. Core setup is in `astro.config.mjs`, `package.json`, and `src/site.config.ts`.

#### Page and Layout Entry Points
Astro file-based routes define the public site: landing, company/contact pages, and service/project indexes and detail routes. `src/layouts/BaseLayout.astro` supplies the shared document shell. Primary entries are `src/pages/index.astro`, `src/pages/services/[...slug].astro`, and `src/pages/projects/[...slug].astro`; collection index pages provide browse/list views.

#### Central Business Configuration and SEO
`src/site.config.ts` is the authoritative business identity source (name, contact and address data). The base layout and pages compose SEO metadata and structured data through `src/components/seo/SEOHead.astro` and `src/components/seo/LocalBusinessSchema.astro`. Detail service routes additionally generate service-oriented SEO/schema from collection content. This separates tenant branding and search metadata from page presentation.

#### Content Collections as CMS Boundary
Astro content collections provide the primary content boundary and static-route input. Schemas/validation live in `src/content/config.ts`; authored service and project Markdown drive their corresponding routes, while JSON reviews feed testimonial content. Representative inputs are `src/content/services/emergency-plumbing.md`, `src/content/projects/modern-kitchen-transformation.md`, and `src/content/reviews/sarah-chen.json`. Images reside under `src/assets/images` and are intended for Astro asset optimization.

#### Presentation Composition
Reusable marketing sections assemble collection and configuration data into pages: `src/components/sections/Hero.astro`, `src/components/sections/ServiceGrid.astro`, and `src/components/sections/ProjectShowcase.astro`. Shared chrome and conversion surfaces are in `src/components/custom/StickyHeader.astro`, `src/components/custom/Footer.astro`, and `src/components/custom/ContactForm.astro`. The design-system boundary is the local Starwind component set, such as `src/components/starwind/button/Button.astro` and `src/components/starwind/card/Card.astro`, styled globally by `src/styles/starwind.css`.

#### Interaction and Lead Flow
The site is intentionally HTML-first with only localized browser behavior. The sticky header exposes navigation and phone CTAs; the contact flow uses `src/components/custom/ContactForm.astro` for native validation, multi-step progression, and sessionStorage persistence. Project details use `src/components/custom/BeforeAfterSlider.astro` for client-side image comparison. No backend, CRM, email provider, or form-submission service is represented in the repository, so lead submission handling is an external integration boundary.

#### Build, Quality, and Deployment Boundaries
Astro produces the `dist/` static artifact, compatible with Netlify, Vercel, Cloudflare Pages, or generic static hosting. Playwright is the browser-level quality boundary, configured by `playwright.config.ts` and focused on conversion and route correctness in `tests/e2e/contact-form.spec.ts` and `tests/e2e/services-urls.spec.ts`. Workspace/package resolution is managed through `pnpm-workspace.yaml` and `pnpm-lock.yaml`.

Main entry points: [`src/layouts/BaseLayout.astro`](https://github.com/alancuenca/business-starter/blob/main/src/layouts/BaseLayout.astro) (Shared document shell), [`src/components/sections/Hero.astro`](https://github.com/alancuenca/business-starter/blob/main/src/components/sections/Hero.astro) (Marketing sections), [`src/pages/index.astro`](https://github.com/alancuenca/business-starter/blob/main/src/pages/index.astro) (Public routes), [`src/content/config.ts`](https://github.com/alancuenca/business-starter/blob/main/src/content/config.ts) (Collection schemas)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_content["Content and branding"]
  node_site_config["Business configuration<br/>tenant config<br/>[site.config.ts]"]
  node_content_schema["Collection schemas<br/>Astro content config<br/>[config.ts]"]
  node_service_content["Service Markdown<br/>content collection"]
  node_project_content["Project Markdown<br/>content collection"]
  node_review_content["Review JSON<br/>content collection<br/>[sarah-chen.json]"]
  node_image_assets["Image assets<br/>Astro assets"]
end

subgraph group_site["Astro site"]
  node_page_routes["Public routes<br/>Astro pages<br/>[index.astro]"]
  node_service_detail["Service detail routes<br/>dynamic Astro route<br/>[&#91;...slug&#93;.astro]"]
  node_project_detail["Project detail routes<br/>dynamic Astro route<br/>[&#91;...slug&#93;.astro]"]
  node_base_layout["Shared document shell<br/>Astro layout<br/>[BaseLayout.astro]"]
  node_seo_head["SEO metadata<br/>SEO component<br/>[SEOHead.astro]"]
  node_local_schema["Local business schema<br/>structured data"]
end

subgraph group_ui["Presentation and interactions"]
  node_marketing_sections["Marketing sections<br/>section components<br/>[Hero.astro]"]
  node_site_chrome["Header and footer<br/>shared chrome<br/>[StickyHeader.astro]"]
  node_contact_form["Contact lead flow<br/>browser component<br/>[ContactForm.astro]"]
  node_before_after["Before/after comparison<br/>browser component"]
  node_design_system["Starwind design system<br/>UI components and CSS<br/>[Button.astro]"]
end

subgraph group_delivery["Build and quality"]
  node_build{{"Astro static build<br/>build runtime<br/>[astro.config.mjs]"}}
  node_static_host(("Static hosting<br/>deployment target"))
  node_e2e_tests["Browser quality checks<br/>Playwright E2E"]
end

node_external_leads(("Lead submission integration<br/>external boundary"))

node_content_schema -->|"validates"| node_service_content
node_content_schema -->|"validates"| node_project_content
node_content_schema -->|"validates"| node_review_content
node_service_content -->|"generates routes"| node_service_detail
node_project_content -->|"generates routes"| node_project_detail
node_page_routes -->|"uses"| node_base_layout
node_service_detail -->|"uses"| node_base_layout
node_project_detail -->|"uses"| node_base_layout
node_site_config -->|"supplies identity"| node_seo_head
node_site_config -->|"supplies business data"| node_local_schema
node_base_layout -->|"renders"| node_seo_head
node_base_layout -->|"renders"| node_local_schema
node_page_routes -->|"composes"| node_marketing_sections
node_service_content -->|"supplies content"| node_marketing_sections
node_project_content -->|"supplies content"| node_marketing_sections
node_review_content -->|"supplies testimonials"| node_marketing_sections
node_base_layout -->|"includes"| node_site_chrome
node_page_routes -->|"embeds"| node_contact_form
node_contact_form -.->|"submits to"| node_external_leads
node_project_detail -->|"embeds"| node_before_after
node_image_assets -->|"renders optimized images"| node_marketing_sections
node_design_system -->|"styles"| node_marketing_sections
node_design_system -->|"styles"| node_site_chrome
node_build -->|"builds"| node_page_routes
node_build -->|"publishes dist"| node_static_host
node_e2e_tests -.->|"verifies routes"| node_page_routes
node_e2e_tests -.->|"verifies conversion"| node_contact_form

click node_site_config "https://github.com/alancuenca/business-starter/blob/main/src/site.config.ts"
click node_content_schema "https://github.com/alancuenca/business-starter/blob/main/src/content/config.ts"
click node_service_content "https://github.com/alancuenca/business-starter/blob/main/src/content/services/emergency-plumbing.md"
click node_project_content "https://github.com/alancuenca/business-starter/blob/main/src/content/projects/modern-kitchen-transformation.md"
click node_review_content "https://github.com/alancuenca/business-starter/blob/main/src/content/reviews/sarah-chen.json"
click node_image_assets "https://github.com/alancuenca/business-starter/tree/main/src/assets/images"
click node_page_routes "https://github.com/alancuenca/business-starter/blob/main/src/pages/index.astro"
click node_service_detail "https://github.com/alancuenca/business-starter/blob/main/src/pages/services/%5B...slug%5D.astro"
click node_project_detail "https://github.com/alancuenca/business-starter/blob/main/src/pages/projects/%5B...slug%5D.astro"
click node_base_layout "https://github.com/alancuenca/business-starter/blob/main/src/layouts/BaseLayout.astro"
click node_seo_head "https://github.com/alancuenca/business-starter/blob/main/src/components/seo/SEOHead.astro"
click node_local_schema "https://github.com/alancuenca/business-starter/blob/main/src/components/seo/LocalBusinessSchema.astro"
click node_marketing_sections "https://github.com/alancuenca/business-starter/blob/main/src/components/sections/Hero.astro"
click node_site_chrome "https://github.com/alancuenca/business-starter/blob/main/src/components/custom/StickyHeader.astro"
click node_contact_form "https://github.com/alancuenca/business-starter/blob/main/src/components/custom/ContactForm.astro"
click node_before_after "https://github.com/alancuenca/business-starter/blob/main/src/components/custom/BeforeAfterSlider.astro"
click node_design_system "https://github.com/alancuenca/business-starter/blob/main/src/components/starwind/button/Button.astro"
click node_build "https://github.com/alancuenca/business-starter/blob/main/astro.config.mjs"
click node_e2e_tests "https://github.com/alancuenca/business-starter/blob/main/tests/e2e/contact-form.spec.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_site_config,node_content_schema,node_service_content,node_project_content,node_review_content,node_image_assets toneBlue
class node_page_routes,node_service_detail,node_project_detail,node_base_layout,node_seo_head,node_local_schema toneAmber
class node_marketing_sections,node_site_chrome,node_contact_form,node_before_after,node_design_system toneMint
class node_build,node_static_host,node_e2e_tests toneRose
class node_external_leads toneNeutral
```

## Components

### Content and branding

- [Business configuration](https://github.com/alancuenca/business-starter/blob/main/src/site.config.ts): tenant config · Authoritative business identity, contact, and address data. · `src/site.config.ts`
- [Collection schemas](https://github.com/alancuenca/business-starter/blob/main/src/content/config.ts): Astro content config · Validates service, project, and review content. · `src/content/config.ts`
- [Service Markdown](https://github.com/alancuenca/business-starter/blob/main/src/content/services/emergency-plumbing.md): content collection · `src/content/services/emergency-plumbing.md`
- [Project Markdown](https://github.com/alancuenca/business-starter/blob/main/src/content/projects/modern-kitchen-transformation.md): content collection · `src/content/projects/modern-kitchen-transformation.md`
- [Review JSON](https://github.com/alancuenca/business-starter/blob/main/src/content/reviews/sarah-chen.json): content collection · `src/content/reviews/sarah-chen.json`
- [Image assets](https://github.com/alancuenca/business-starter/tree/main/src/assets/images): Astro assets · Images are optimized during Astro builds. · `src/assets/images`

### Astro site

- [Public routes](https://github.com/alancuenca/business-starter/blob/main/src/pages/index.astro): Astro pages · Landing, company, contact, and collection browse pages. · `src/pages/index.astro`
- [Service detail routes](https://github.com/alancuenca/business-starter/blob/main/src/pages/services/%5B...slug%5D.astro): dynamic Astro route · `src/pages/services/[...slug].astro`
- [Project detail routes](https://github.com/alancuenca/business-starter/blob/main/src/pages/projects/%5B...slug%5D.astro): dynamic Astro route · `src/pages/projects/[...slug].astro`
- [Shared document shell](https://github.com/alancuenca/business-starter/blob/main/src/layouts/BaseLayout.astro): Astro layout · `src/layouts/BaseLayout.astro`
- [SEO metadata](https://github.com/alancuenca/business-starter/blob/main/src/components/seo/SEOHead.astro): SEO component · `src/components/seo/SEOHead.astro`
- [Local business schema](https://github.com/alancuenca/business-starter/blob/main/src/components/seo/LocalBusinessSchema.astro): structured data · `src/components/seo/LocalBusinessSchema.astro`

### Presentation and interactions

- [Marketing sections](https://github.com/alancuenca/business-starter/blob/main/src/components/sections/Hero.astro): section components · Hero, service grid, and project showcase compose page content. · `src/components/sections/Hero.astro`
- [Header and footer](https://github.com/alancuenca/business-starter/blob/main/src/components/custom/StickyHeader.astro): shared chrome · Navigation and conversion CTAs. · `src/components/custom/StickyHeader.astro`
- [Contact lead flow](https://github.com/alancuenca/business-starter/blob/main/src/components/custom/ContactForm.astro): browser component · Native validation, multi-step state, and sessionStorage persistence. · `src/components/custom/ContactForm.astro`
- [Before/after comparison](https://github.com/alancuenca/business-starter/blob/main/src/components/custom/BeforeAfterSlider.astro): browser component · `src/components/custom/BeforeAfterSlider.astro`
- [Starwind design system](https://github.com/alancuenca/business-starter/blob/main/src/components/starwind/button/Button.astro): UI components and CSS · `src/components/starwind/button/Button.astro`

### Build and quality

- [Astro static build](https://github.com/alancuenca/business-starter/blob/main/astro.config.mjs): build runtime · Node.js and pnpm build the site into static output. · `astro.config.mjs`
- **Static hosting**: deployment target · Any compatible static host serves the generated site.
- [Browser quality checks](https://github.com/alancuenca/business-starter/blob/main/tests/e2e/contact-form.spec.ts): Playwright E2E · Covers contact conversion and service-route correctness. · `tests/e2e/contact-form.spec.ts`

### Other components

- **Lead submission integration**: external boundary · No submission provider is implemented in the repository.

## Connections

- Collection schemas → Service Markdown: validates
- Collection schemas → Project Markdown: validates
- Collection schemas → Review JSON: validates
- Service Markdown → Service detail routes: generates routes
- Project Markdown → Project detail routes: generates routes
- Public routes → Shared document shell: uses
- Service detail routes → Shared document shell: uses
- Project detail routes → Shared document shell: uses
- Business configuration → SEO metadata: supplies identity
- Business configuration → Local business schema: supplies business data
- Shared document shell → SEO metadata: renders
- Shared document shell → Local business schema: renders
- Public routes → Marketing sections: composes
- Service Markdown → Marketing sections: supplies content
- Project Markdown → Marketing sections: supplies content
- Review JSON → Marketing sections: supplies testimonials
- Shared document shell → Header and footer: includes
- Public routes → Contact lead flow: embeds
- Contact lead flow → Lead submission integration: submits to
- Project detail routes → Before/after comparison: embeds
- Image assets → Marketing sections: renders optimized images
- Starwind design system → Marketing sections: styles
- Starwind design system → Header and footer: styles
- Astro static build → Public routes: builds
- Astro static build → Static hosting: publishes dist
- Browser quality checks → Public routes: verifies routes
- Browser quality checks → Contact lead flow: verifies conversion
