Skip to content

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.

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 15+ pre-built sections. 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

TokenUsed forTailwind class
--color-backgroundPage backgroundbg-background
--color-foregroundMain texttext-foreground
--color-primaryButtons, links, accentsbg-primary, text-primary
--color-cardCard backgroundsbg-card
--color-mutedSubtle backgroundsbg-muted
--color-muted-foregroundSecondary text, descriptionstext-muted-foreground
--color-borderAll bordersborder-border
--color-destructiveError states, deletebg-destructive
--radiusGlobal border radiusrounded-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

Project Structure

A quick reference of key directories and what they contain.

astrodeck/
├── src/
│   ├── components/
│   │   ├── sections/      15+ pre-built page sections
│   │   └── ui/            shadcn/ui components (Button, Card, Badge...)
│   ├── 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
│   └── 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
├── astro.config.mjs       Astro + Vite + integrations config
└── package.json           Dependencies and npm scripts

Want to dive deeper? Check out the source code and full README on GitHub.

View on GitHub