Documentation
AstroDeck is built AI-first. Every task below is shown two ways — tell your AI assistant what you want, or do it manually. Pick the approach that works for you.
Getting Started
Download AstroDeck, install dependencies, and start the dev server.
With AI
Download and unzip AstroDeck. Open the folder in your AI coding tool (Claude Code, Cursor, Windsurf, etc.) and say:
"Please install all dependencies and start the dev server."
Manual
Unzip the download, open a terminal in the project folder, and run:
npm install
npm run dev
Then open http://localhost:4321 in your browser.
Building Blocks
AstroDeck uses a three-tier architecture. Everything you build with falls into one of these tiers.
| Tier | What | Count | Location |
|---|---|---|---|
| Components | Small UI primitives (Button, Dialog, Tabs...) | 11 | src/components/ui/ |
| Sections | Full page sections (Hero, Pricing, FAQ...) | 16 | src/components/sections/ |
| Pages | Complete page templates (SaaS, Portfolio...) | 11 | src/pages/ |
Tier 1: Component
Small, reusable React UI primitives from shadcn/ui + Radix UI. Use with client:load for interactivity.
---
import { Button } from "@/components/ui/button";
---
<Button client:load variant="outline" size="lg">Click me</Button>Tier 2: Section
Full-width page blocks that combine layout, typography, and content. Drop them into any page and pass content as props.
---
import FAQ from "@/components/sections/FAQ.astro";
---
<FAQ
title="Frequently Asked Questions"
faqs={[
{ question: "Is it free?", answer: "Yes, MIT licensed." }
]}
/>Tier 3: Page
Complete pages that assemble multiple sections with a layout. Copy a template and customize the props.
---
import BaseLayout from "@/layouts/BaseLayout.astro";
import Hero from "@/components/sections/Hero.astro";
import Features from "@/components/sections/Features.astro";
import CTA from "@/components/sections/CTA.astro";
---
<BaseLayout title="My Page">
<Hero title="Welcome" subtitle="..." />
<Features title="Features" features={[...]} />
<CTA title="Get Started" description="..."
cta={{ href: "/signup", label: "Sign Up" }} />
</BaseLayout>Create a New Page
AstroDeck uses file-based routing. Every .astro file in src/pages/ becomes a route.
With AI
"Create a new About page with a hero section and a short introduction text about our team."
Your AI assistant will create src/pages/about.astro with the correct layout, SEO meta tags, and content structure.
Manual
Create src/pages/about.astro:
---
import BaseLayout from "@/layouts/BaseLayout.astro";
---
<BaseLayout
title="About Us"
description="Learn about our team"
>
<div class="py-16">
<h1 class="text-4xl font-bold mb-6">
About Us
</h1>
<p class="text-muted-foreground">
Your content here.
</p>
</div>
</BaseLayout>
Visit /about to see your new page.
Add a Section Component
AstroDeck ships with 16 pre-built sections (including 3 Hero variants, FAQ, Stats, Team, Comparison, Contact, and Newsletter). Import them into any page and pass your content as props.
With AI
"Add a pricing section with 3 tiers — Free, Pro at $19/month, and Enterprise at $49/month — to the homepage."
The AI will import the Pricing component, configure the tiers array, and place it on your page.
Manual
Import the component and pass your data as props:
---
import Pricing from
"@/components/sections/Pricing.astro";
const tiers = [
{
name: "Free",
price: "$0",
description: "For personal projects",
features: ["1 project", "Support"],
cta: { href: "/signup", label: "Start" },
},
// ... more tiers
];
---
<Pricing title="Pricing" tiers={tiers} />See all available sections at /sections.
Create a Custom Component
Build your own section components following AstroDeck's patterns and conventions.
With AI
"Create a new FAQ accordion section component following the existing project patterns. It should accept a title and an array of questions with answers."
The AI reads AGENTS.md to understand conventions and creates a component with TypeScript props, proper imports, and consistent styling.
Manual
Create src/components/sections/FAQ.astro:
---
interface Props {
title: string;
items: {
question: string;
answer: string;
}[];
}
const { title, items } = Astro.props;
---
<section class="py-12 px-6">
<h2 class="text-3xl font-bold mb-8">
{title}
</h2>
<div class="space-y-4">
{items.map((item) => (
<details class="border rounded-lg p-4">
<summary class="font-medium
cursor-pointer">
{item.question}
</summary>
<p class="mt-2
text-muted-foreground">
{item.answer}
</p>
</details>
))}
</div>
</section>Customize Theme & Colors
AstroDeck uses OKLCH colors and CSS custom properties. All design tokens live in src/styles/globals.css.
With AI
"Change the primary color to electric blue and update dark mode to match. Keep good contrast ratios."
The AI updates both light and dark mode tokens in globals.css and ensures WCAG-compliant contrast.
Manual
Edit src/styles/globals.css:
@theme {
--color-primary:
oklch(55% 0.25 260);
--color-primary-foreground:
oklch(98% 0 0);
}
.dark {
--color-primary:
oklch(70% 0.2 260);
--color-primary-foreground:
oklch(10% 0 0);
}
OKLCH format: oklch(lightness% chroma hue)
Design Tokens
AstroDeck's entire design system is controlled through CSS custom properties in src/styles/globals.css. Change fonts, colors, border radius, and more.
With AI
"Switch the font to Inter, set the border radius to 1rem, and use a warm color palette with an orange primary color."
The AI updates the @font-face declarations, --radius, and all color tokens at once — in both light and dark mode.
Manual
All tokens live in src/styles/globals.css:
/* Fonts — replace woff2 files in
public/fonts/ and update here */
@font-face {
font-family: 'Geist';
src: url('/fonts/Geist-Variable.woff2')
format('woff2');
font-weight: 100 900;
font-display: swap;
}
/* Design tokens in @theme block */
@theme {
--color-background: oklch(100% 0 0);
--color-primary: oklch(11.2% ...);
--color-secondary: oklch(96.1% ...);
--color-muted: oklch(96.1% ...);
--color-border: oklch(91.4% ...);
--color-destructive: oklch(60.2% ...);
--radius: 0.5rem;
}
/* Dark mode overrides */
.dark {
--color-background: oklch(1.5% 0 0);
--color-primary: oklch(98% 0 0);
/* ... all tokens overridden */
}Token Reference
| Token | Used for | Tailwind class |
|---|---|---|
| --color-background | Page background | bg-background |
| --color-foreground | Main text | text-foreground |
| --color-primary | Buttons, links, accents | bg-primary, text-primary |
| --color-card | Card backgrounds | bg-card |
| --color-muted | Subtle backgrounds | bg-muted |
| --color-muted-foreground | Secondary text, descriptions | text-muted-foreground |
| --color-border | All borders | border-border |
| --color-destructive | Error states, delete | bg-destructive |
| --radius | Global border radius | rounded-md (uses --radius) |
Add a Blog Post
Blog posts use Astro Content Collections. Create a Markdown file with frontmatter and it appears automatically.
With AI
"Create a new blog post about our product launch, published today, with tags 'news' and 'launch'. Make it SEO-friendly."
The AI creates the Markdown file with proper frontmatter schema and optimized content.
Manual
Create src/content/blog/product-launch.md:
---
title: "Announcing Our Launch"
description: "We're live! Here's
what we've built and why."
pubDate: 2026-03-15
author: "Your Name"
tags: ["news", "launch"]
---
# Announcing Our Launch
Write your content in Markdown.
Supports **bold**, *italic*,
[links](https://example.com),
images, and code blocks.
The post appears at /blog/product-launch.
Build & Deploy
Build a production-optimized version of your site and deploy it to any static hosting provider.
With AI
"Build the project for production and check if there are any errors or warnings."
The AI runs the build, reports issues, and can help fix them. For deployment:
"Deploy this project to Vercel."
Manual
Build and preview locally:
npm run build
npm run preview
Deploy the dist/ folder to any static host:
- Vercel: Push to GitHub, import in dashboard
- Netlify: Connect repo, auto-detects Astro
- Cloudflare:
npx wrangler pages deploy dist
AI Architecture
AstroDeck includes a hybrid AI system with centralized design knowledge, portable quality prompts, and multi-agent reviews.
Design Knowledge Base
system/globals/ — 8 canonical design files
Central design decisions (colors, typography, spacing, effects, responsiveness, accessibility, imagery, interaction) live in system/globals/. These files are the single source of truth — referenced by all skills, prompts, and AI tool configurations.
Read these before making design decisions. Available to all tools.
Self-Audit Prompts
system/prompts/ — 7 standalone quality checks
Copy-paste quality audits that work in any AI tool — ChatGPT, Gemini, Cursor Chat, Claude. No special setup needed.
- Tokens — hardcoded colors, inline styles, OKLCH compliance
- Accessibility — WCAG 2.1 AA, contrast, keyboard nav
- Performance — Lighthouse, Core Web Vitals, images
- SEO — meta tags, structured data, heading hierarchy
- Dark Mode — token parity, contrast in both modes
- Responsive — breakpoints, overflow, touch targets
- Cascade — design token consistency across tiers
Multi-Agent Review
Claude Code: /plenum — Scope-based parallel review
Spawns domain-specific review agents (Design, UX, Accessibility, Performance, SEO, Code) based on what changed. Consolidates findings, surfaces conflicts, produces a prioritized report. Nothing is auto-implemented.
Not using Claude Code? Use the self-audit prompts from system/prompts/ individually.
Quality Gates
AstroDeck uses skill chains to ensure every task meets quality standards before completion.
With AI
"Run a pre-launch review on my project. Check everything — design, accessibility, performance, SEO, and code quality."
In Claude Code, this triggers /plenum which spawns parallel review agents. In other tools, use the self-audit prompts from system/prompts/.
Manual
Each task type follows a skill chain — a sequence of domain checks run in order:
| Task | Skill Chain |
|---|---|
| New Section | ui-design → tailwind → accessibility → qa |
| New Page | astro → ui-design → content-seo → accessibility → qa |
| Theme Change | tailwind → ui-design → accessibility |
| Blog Content | content-seo → accessibility |
Each skill in the chain must be consulted in order. The last skill (usually qa) validates the final result.
Project Structure
A quick reference of key directories and what they contain.
astrodeck/
├── src/
│ ├── components/
│ │ ├── sections/ 16 pre-built page sections (3 Hero variants + 13 more)
│ │ └── ui/ 11 shadcn/ui components (Button, Card, Dialog, Accordion...)
│ ├── layouts/ Page templates (Base, FullWidth, Auth, Minimal, Article)
│ ├── pages/ File-based routing — each .astro file = one route
│ ├── content/blog/ Markdown blog posts with Content Collections
│ ├── styles/globals.css Design tokens, OKLCH colors, Tailwind config
│ ├── registry.json Machine-readable component catalog
│ └── lib/utils.ts Utility functions
├── public/ Static assets (fonts, images, favicon)
├── AGENTS.md AI assistant instructions (AGENTS.md standard)
├── PROJECT.md Your project-specific AI overrides
├── .cursor/rules Cursor AI rules
├── .github/copilot-instructions.md GitHub Copilot instructions
├── .windsurfrules Windsurf AI rules
├── astro.config.mjs Astro + Vite + integrations config
└── package.json Dependencies and npm scriptsWant to dive deeper? Check out the source code and full README on GitHub.
View on GitHub