# alexandre-tortoza/astro-launchpad architecture

> Architecture diagram of the GitHub repository alexandre-tortoza/astro-launchpad, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-08-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/alexandre-tortoza/astro-launchpad
- Repository: https://github.com/alexandre-tortoza/astro-launchpad

## Overview

#### Purpose and Entry Points
Astro Launchpad is a pnpm monorepo that publishes an interactive project generator for production-ready Astro landing sites. The user-facing entry point is the `create-astro-launchpad` package, invoked through `npm create` or pnpm. Its CLI gathers options, validates the environment, scaffolds a destination, optionally installs dependencies, and initializes Git.
- `packages/create-astro-launchpad/src/index.ts`
- `packages/create-astro-launchpad/src/prompts.ts`
- `packages/create-astro-launchpad/src/scaffold.ts`

#### CLI Orchestration and Safety Boundary
The generator separates option resolution, interactive prompts, preflight diagnostics, subprocess execution, and filesystem mutation. The destination directory is the primary safety boundary: the CLI does not overwrite a non-empty target. Docker setup, dependency installation, and Git initialization are optional post-scaffold stages.
- `packages/create-astro-launchpad/src/options.ts`
- `packages/create-astro-launchpad/src/doctor.ts`
- `packages/create-astro-launchpad/src/process.ts`

#### Template Composition Pipeline
Generation begins with the shared Astro base, then composes selected feature overlays and one landing-page preset into the output project. Presets provide starter content/assets; features add CMS, blog, styling, motion, Docker, or AI resources. Build scripts likely package these template inputs for the CLI.
- `templates/base`
- `templates/features`
- `templates/presets`
- `scripts/build-presets.mjs`

#### Generated Astro Application Core
Every generated site centers on Astro pages, a shared layout, typed content configuration, and a section renderer. Page content supplies ordered blocks; the renderer resolves them to reusable Astro components. This makes content providers responsible for normalized page data while presentation remains in the base template.
- `templates/base/src/pages/index.astro`
- `templates/base/src/components/SectionRenderer.astro`
- `templates/base/src/components/blocks`
- `templates/base/src/layouts/Layout.astro`

#### Content Layer and Validation
The base template defines a provider-facing content abstraction with Markdown and mock implementations, plus block types, schemas, and validation. Selected CMS features replace or extend the content entry point with provider-specific adapters, preserving the generated site's rendering boundary.
- `templates/base/src/lib/content/index.ts`
- `templates/base/src/lib/blocks/schemas.ts`
- `templates/base/src/lib/blocks/validate.ts`
- `templates/features/directus/src/lib/content/directus.ts`
- `templates/features/strapi/src/lib/content/strapi.ts`

#### CMS and Deployment Integrations
Markdown is local-file content. Directus and Strapi are optional external headless CMS runtimes, configured through environment files and seeded with schemas/data; both depend on Docker-backed services and PostgreSQL per the documented generated stack. Strapi includes its CMS application and content-type definitions; Directus ships schema snapshots and seed tooling.
- `templates/features/directus/schema/snapshot.json`
- `templates/features/directus/seed/seed.ts`
- `templates/features/strapi/cms/src/index.ts`
- `templates/features/strapi/cms/config/database.ts`
- `templates/features/docker/docker/nginx.conf`

#### Optional Product Features and AI Resources
Feature overlays add blog routes/RSS, motion primitives, Tailwind styling, and AI-assisted development artifacts. The AI kit is a publishable resource package containing prompts, skills, and JSON schemas rather than a runtime AI service integration.
- `templates/features/blog/src/pages/rss.xml.ts`
- `templates/features/motion/src/components/motion/Fade.astro`
- `templates/features/tailwind/src/styles/global.css`
- `packages/ai-kit/src/index.ts`
- `packages/ai-kit/prompts`

Main entry points: [`templates/features`](https://github.com/alexandre-tortoza/astro-launchpad/tree/main/templates/features) (Feature overlays), [`packages/create-astro-launchpad/src/scaffold.ts`](https://github.com/alexandre-tortoza/astro-launchpad/blob/main/packages/create-astro-launchpad/src/scaffold.ts) (Scaffold writer), [`packages/create-astro-launchpad/src/index.ts`](https://github.com/alexandre-tortoza/astro-launchpad/blob/main/packages/create-astro-launchpad/src/index.ts) (create-astro-launchpad CLI), [`templates/base/src/pages/index.astro`](https://github.com/alexandre-tortoza/astro-launchpad/blob/main/templates/base/src/pages/index.astro) (Astro home page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_generator["Generator CLI"]
  node_cli{{"create-astro-launchpad CLI<br/>[index.ts]"}}
  node_options["Option resolution<br/>CLI module<br/>[options.ts]"]
  node_prompts["Interactive prompts<br/>CLI module<br/>[prompts.ts]"]
  node_preflight["Preflight diagnostics<br/>CLI module<br/>[doctor.ts]"]
  node_scaffold["Scaffold writer<br/>CLI module<br/>[scaffold.ts]"]
  node_subprocess["Process runner<br/>CLI module<br/>[process.ts]"]
end

subgraph group_templates["Template Pipeline"]
  node_template_build["Template build<br/>build script<br/>[build-presets.mjs]"]
  node_base_template["Shared Astro base<br/>template"]
  node_feature_overlays["Feature overlays<br/>template set"]
  node_presets["Landing presets<br/>template set"]
end

subgraph group_generated["Generated Astro Site"]
  node_page["Astro home page<br/>Astro page<br/>[index.astro]"]
  node_layout["Shared layout<br/>Astro layout<br/>[Layout.astro]"]
  node_section_renderer["Section renderer<br/>Astro component"]
  node_block_components["Block components<br/>Astro components"]
  node_content_boundary["Content abstraction<br/>content API<br/>[index.ts]"]
  node_block_validation["Block schemas and validation<br/>validation layer<br/>[validate.ts]"]
end

subgraph group_integrations["Optional Integrations"]
  node_directus[("Directus integration<br/>CMS overlay<br/>[snapshot.json]")]
  node_strapi[("Strapi integration<br/>CMS overlay<br/>[index.ts]")]
  node_docker["Docker deployment<br/>deployment overlay<br/>[nginx.conf]"]
  node_blog["Blog and RSS<br/>feature overlay<br/>[rss.xml.ts]"]
  node_ai_kit["AI kit<br/>resource package<br/>[index.ts]"]
end

node_cli -->|"resolves"| node_options
node_cli -->|"collects choices"| node_prompts
node_cli -->|"checks destination"| node_preflight
node_cli -->|"creates project"| node_scaffold
node_scaffold -.->|"optionally invokes"| node_subprocess
node_template_build -->|"packages"| node_presets
node_scaffold -->|"copies"| node_base_template
node_scaffold -->|"applies selected"| node_feature_overlays
node_scaffold -->|"applies selected"| node_presets
node_base_template -->|"generates"| node_page
node_page -->|"uses"| node_layout
node_page -->|"loads content from"| node_content_boundary
node_page -->|"renders blocks through"| node_section_renderer
node_section_renderer -->|"resolves"| node_block_components
node_content_boundary -->|"validates with"| node_block_validation
node_feature_overlays -.->|"includes option"| node_directus
node_feature_overlays -.->|"includes option"| node_strapi
node_feature_overlays -.->|"includes option"| node_docker
node_feature_overlays -.->|"includes option"| node_blog
node_directus -.->|"provides adapter"| node_content_boundary
node_strapi -.->|"provides adapter"| node_content_boundary
node_ai_kit -.->|"supports development"| node_feature_overlays

click node_cli "https://github.com/alexandre-tortoza/astro-launchpad/blob/main/packages/create-astro-launchpad/src/index.ts"
click node_options "https://github.com/alexandre-tortoza/astro-launchpad/blob/main/packages/create-astro-launchpad/src/options.ts"
click node_prompts "https://github.com/alexandre-tortoza/astro-launchpad/blob/main/packages/create-astro-launchpad/src/prompts.ts"
click node_preflight "https://github.com/alexandre-tortoza/astro-launchpad/blob/main/packages/create-astro-launchpad/src/doctor.ts"
click node_scaffold "https://github.com/alexandre-tortoza/astro-launchpad/blob/main/packages/create-astro-launchpad/src/scaffold.ts"
click node_subprocess "https://github.com/alexandre-tortoza/astro-launchpad/blob/main/packages/create-astro-launchpad/src/process.ts"
click node_template_build "https://github.com/alexandre-tortoza/astro-launchpad/blob/main/scripts/build-presets.mjs"
click node_base_template "https://github.com/alexandre-tortoza/astro-launchpad/tree/main/templates/base"
click node_feature_overlays "https://github.com/alexandre-tortoza/astro-launchpad/tree/main/templates/features"
click node_presets "https://github.com/alexandre-tortoza/astro-launchpad/tree/main/templates/presets"
click node_page "https://github.com/alexandre-tortoza/astro-launchpad/blob/main/templates/base/src/pages/index.astro"
click node_layout "https://github.com/alexandre-tortoza/astro-launchpad/blob/main/templates/base/src/layouts/Layout.astro"
click node_section_renderer "https://github.com/alexandre-tortoza/astro-launchpad/blob/main/templates/base/src/components/SectionRenderer.astro"
click node_block_components "https://github.com/alexandre-tortoza/astro-launchpad/tree/main/templates/base/src/components/blocks"
click node_content_boundary "https://github.com/alexandre-tortoza/astro-launchpad/blob/main/templates/base/src/lib/content/index.ts"
click node_block_validation "https://github.com/alexandre-tortoza/astro-launchpad/blob/main/templates/base/src/lib/blocks/validate.ts"
click node_directus "https://github.com/alexandre-tortoza/astro-launchpad/blob/main/templates/features/directus/schema/snapshot.json"
click node_strapi "https://github.com/alexandre-tortoza/astro-launchpad/blob/main/templates/features/strapi/cms/src/index.ts"
click node_docker "https://github.com/alexandre-tortoza/astro-launchpad/blob/main/templates/features/docker/docker/nginx.conf"
click node_blog "https://github.com/alexandre-tortoza/astro-launchpad/blob/main/templates/features/blog/src/pages/rss.xml.ts"
click node_ai_kit "https://github.com/alexandre-tortoza/astro-launchpad/blob/main/packages/ai-kit/src/index.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_cli,node_options,node_prompts,node_preflight,node_scaffold,node_subprocess toneBlue
class node_template_build,node_base_template,node_feature_overlays,node_presets toneAmber
class node_page,node_layout,node_section_renderer,node_block_components,node_content_boundary,node_block_validation toneMint
class node_directus,node_strapi,node_docker,node_blog,node_ai_kit toneRose
```

## Components

### Generator CLI

Interactive project creation and safety checks.

- [create-astro-launchpad CLI](https://github.com/alexandre-tortoza/astro-launchpad/blob/main/packages/create-astro-launchpad/src/index.ts): package · User entry point for npm create or pnpm. · `packages/create-astro-launchpad/src/index.ts`
- [Option resolution](https://github.com/alexandre-tortoza/astro-launchpad/blob/main/packages/create-astro-launchpad/src/options.ts): CLI module · `packages/create-astro-launchpad/src/options.ts`
- [Interactive prompts](https://github.com/alexandre-tortoza/astro-launchpad/blob/main/packages/create-astro-launchpad/src/prompts.ts): CLI module · `packages/create-astro-launchpad/src/prompts.ts`
- [Preflight diagnostics](https://github.com/alexandre-tortoza/astro-launchpad/blob/main/packages/create-astro-launchpad/src/doctor.ts): CLI module · Validates environment and protects non-empty destinations. · `packages/create-astro-launchpad/src/doctor.ts`
- [Scaffold writer](https://github.com/alexandre-tortoza/astro-launchpad/blob/main/packages/create-astro-launchpad/src/scaffold.ts): CLI module · Composes files and runs optional post-scaffold stages. · `packages/create-astro-launchpad/src/scaffold.ts`
- [Process runner](https://github.com/alexandre-tortoza/astro-launchpad/blob/main/packages/create-astro-launchpad/src/process.ts): CLI module · Runs package installation and Git initialization. · `packages/create-astro-launchpad/src/process.ts`

### Template Pipeline

Base template composed with selected overlays and presets.

- [Template build](https://github.com/alexandre-tortoza/astro-launchpad/blob/main/scripts/build-presets.mjs): build script · Packages preset inputs for the generator. · `scripts/build-presets.mjs`
- [Shared Astro base](https://github.com/alexandre-tortoza/astro-launchpad/tree/main/templates/base): template · Common application foundation for every generated site. · `templates/base`
- [Feature overlays](https://github.com/alexandre-tortoza/astro-launchpad/tree/main/templates/features): template set · Selectable CMS, blog, styling, motion, Docker, and AI resources. · `templates/features`
- [Landing presets](https://github.com/alexandre-tortoza/astro-launchpad/tree/main/templates/presets): template set · Starter page content and assets. · `templates/presets`

### Generated Astro Site

Core runtime structure emitted into each project.

- [Astro home page](https://github.com/alexandre-tortoza/astro-launchpad/blob/main/templates/base/src/pages/index.astro): Astro page · Supplies ordered page blocks. · `templates/base/src/pages/index.astro`
- [Shared layout](https://github.com/alexandre-tortoza/astro-launchpad/blob/main/templates/base/src/layouts/Layout.astro): Astro layout · `templates/base/src/layouts/Layout.astro`
- [Section renderer](https://github.com/alexandre-tortoza/astro-launchpad/blob/main/templates/base/src/components/SectionRenderer.astro): Astro component · Maps normalized blocks to presentation components. · `templates/base/src/components/SectionRenderer.astro`
- [Block components](https://github.com/alexandre-tortoza/astro-launchpad/tree/main/templates/base/src/components/blocks): Astro components · `templates/base/src/components/blocks`
- [Content abstraction](https://github.com/alexandre-tortoza/astro-launchpad/blob/main/templates/base/src/lib/content/index.ts): content API · Provider-facing entry point for normalized page data. · `templates/base/src/lib/content/index.ts`
- [Block schemas and validation](https://github.com/alexandre-tortoza/astro-launchpad/blob/main/templates/base/src/lib/blocks/validate.ts): validation layer · `templates/base/src/lib/blocks/validate.ts`

### Optional Integrations

CMS, deployment, and product feature overlays.

- [Directus integration](https://github.com/alexandre-tortoza/astro-launchpad/blob/main/templates/features/directus/schema/snapshot.json): CMS overlay · External CMS with schema snapshot and seed tooling. · `templates/features/directus/schema/snapshot.json`
- [Strapi integration](https://github.com/alexandre-tortoza/astro-launchpad/blob/main/templates/features/strapi/cms/src/index.ts): CMS overlay · External CMS application with content types and PostgreSQL configuration. · `templates/features/strapi/cms/src/index.ts`
- [Docker deployment](https://github.com/alexandre-tortoza/astro-launchpad/blob/main/templates/features/docker/docker/nginx.conf): deployment overlay · Provides container stack and Nginx configuration. · `templates/features/docker/docker/nginx.conf`
- [Blog and RSS](https://github.com/alexandre-tortoza/astro-launchpad/blob/main/templates/features/blog/src/pages/rss.xml.ts): feature overlay · `templates/features/blog/src/pages/rss.xml.ts`
- [AI kit](https://github.com/alexandre-tortoza/astro-launchpad/blob/main/packages/ai-kit/src/index.ts): resource package · Publishable prompts, skills, and schemas; not a runtime AI service. · `packages/ai-kit/src/index.ts`

## Connections

- create-astro-launchpad CLI → Option resolution: resolves
- create-astro-launchpad CLI → Interactive prompts: collects choices
- create-astro-launchpad CLI → Preflight diagnostics: checks destination
- create-astro-launchpad CLI → Scaffold writer: creates project
- Scaffold writer → Process runner: optionally invokes
- Template build → Landing presets: packages
- Scaffold writer → Shared Astro base: copies
- Scaffold writer → Feature overlays: applies selected
- Scaffold writer → Landing presets: applies selected
- Shared Astro base → Astro home page: generates
- Astro home page → Shared layout: uses
- Astro home page → Content abstraction: loads content from
- Astro home page → Section renderer: renders blocks through
- Section renderer → Block components: resolves
- Content abstraction → Block schemas and validation: validates with
- Feature overlays → Directus integration: includes option
- Feature overlays → Strapi integration: includes option
- Feature overlays → Docker deployment: includes option
- Feature overlays → Blog and RSS: includes option
- Directus integration → Content abstraction: provides adapter
- Strapi integration → Content abstraction: provides adapter
- AI kit → Feature overlays: supports development
