Personal starter template for building and customizing websites. Stack: Astro 7, Tailwind CSS 4, DaisyUI 5, TypeScript, Biome (lint + format), pnpm.
src/
pages/ # File-based routes (.astro, .ts)
components/ # Reusable Astro/UI components
layouts/ # Page layout wrappers
config/ # Site-wide configuration (branding.config.ts β primary entry point for customization)
styles/ # Global CSS (Tailwind + DaisyUI imports)
assets/ # Images and SVGs processed by Astro β use <Image /> from astro:assets
public/ # Static files copied as-is (favicon.ico, favicon.svg)
pnpm install # Install dependencies
pnpm dev # Start dev server with HMR
pnpm build # Production build β dist/
pnpm preview # Serve production build locally
pnpm lint # Lint (Biome CI mode, no writes)
pnpm lint:fix # Lint + auto-fix
pnpm format # Auto-format entire repo
pnpm check # TypeScript + Astro diagnostics
pnpm astro sync # Regenerate .astro TS typessrc/config/branding.config.ts is the single source of truth for all site-level data. Edit this first when customizing a site:
- Site metadata:
name,tagline,description,ogImage,siteUrl,logo - Navigation:
nav(header links),footerGroups(footer link columns) - Social:
socialarray of{ platform, href }β rendered in the footer - Business info (optional):
phone,email,address,hours,coordinates - Copyright:
copyrightβ company name used in the footer copyright line - Form target (optional):
formActionβ URL for contact form POST submissions
astro.config.mjs reads brandingConfig.site.siteUrl for the site field. Keep them in sync.
Two content patterns are in use:
- Props-driven β
Hero.astroaccepts all copy and image as explicit props. Content is passed fromindex.astroat the call site. - Hardcoded content β
Offerings.astro,Story.astro,Reviews.astro,Contact.astrohave inline placeholder copy (castle-themed demo). Edit these component files directly when customizing a site.
Layout.astro wraps every page with BaseHead + Header + <slot> + Footer. BaseHead.astro accepts optional prop overrides and falls back to brandingConfig defaults. Layout.astro also exposes <slot name="head" /> inside <head> for per-page <link> or <script> injection.
@lucide/astro is the icon library. Import named icons directly from the package:
import { ChessKnight, Menu, Crown, Swords, Trophy, Star } from '@lucide/astro'Browse available icons at https://lucide.dev/icons/
Follow the conventions and patterns you detect in surrounding code. Formatting rules are defined in biome.json and enforced by Biome.
- Always prefer DaisyUI component classes over raw Tailwind classes when a DaisyUI equivalent exists.
- Use DaisyUI semantic color names (
primary,secondary,base-100, etc.) over raw Tailwind or hex colors. - Images in
src/assets/must use<Image />fromastro:assetsβ never a plain<img>tag.
- The user is a software engineer. You are a speed tool, not a decision-maker. Write code he would have written himself.
- Match existing conventions exactly. Never introduce a new pattern without calling it out explicitly.
- Only do what was asked. Do not refactor surrounding code, add comments, or clean up anything outside the stated task scope. If you notice something worth improving, mention it as a separate suggestion β never just do it.
- Before finalizing any implementation, surface trade-offs, alternatives, or concerns proactively.
- Flag security implications (XSS, injection, auth issues, etc.) even when not asked.
- Flag performance anti-patterns even when not asked.
- If a requested approach has a clearly better alternative, say so with reasoning β don't silently implement the suboptimal path.
- Do not use
npmoryarnβ this repo usespnpmexclusively. - Do not start alternative web servers (
python -m http.server,npx serve, etc.) β usepnpm devorpnpm preview. - Do not use raw hex colors or hardcoded Tailwind color classes when a DaisyUI semantic token covers the use case.
- Do not install packages without confirming with the user first.
- Astro (LLM-optimized): https://docs.astro.build/llms.txt
- Astro (full): https://docs.astro.build/
- DaisyUI (LLM-optimized): https://daisyui.com/llms.txt
- DaisyUI (full): https://daisyui.com/docs/