This file provides guidance for AI coding agents working in this repository.
A web-based collection of developer utility tools built with Astro 5, Svelte 5, and Tailwind CSS 4. Static site deployed to GitHub Pages.
pnpm install # Install dependencies
pnpm dev # Development server
pnpm build # Production build
pnpm preview # Preview production buildNote: No test framework configured. Consider Vitest if adding tests.
src/
├── components/tools/ # Tool Svelte components (*Tool.svelte)
├── data/tools.ts # Tool definitions and categories
├── layouts/Layout.astro # Main layout wrapper
├── pages/tools/ # Tool pages (kebab-case filenames)
└── styles/global.css # CSS variables and global styles
Order: 1) Framework (svelte, astro), 2) External libraries, 3) Local modules. Use relative imports with explicit extensions.
- Use
interfacefor object shapes, string literal unions for constrained types - Always type function parameters and state variables
<script lang="ts">
let value = $state(""); // State - NOT writable()
let isEmpty = $derived(value === ""); // Derived - NOT $:
$effect(() => { processValue(); }); // Effects - NOT $:
</script>| Element | Convention | Example |
|---|---|---|
| Svelte/Astro components | PascalCase | Base64Tool.svelte |
| Page files | kebab-case | data-converter.astro |
| Variables/functions | camelCase | handleCopy |
| Types/interfaces | PascalCase | Tool, Category |
| CSS variables | --color-* |
--color-primary |
- 2 spaces indentation, double quotes, semicolons required, trailing commas in multi-line
<div class="bg-(--color-bg) text-(--color-text)">
<button class="bg-(--color-primary) hover:bg-(--color-primary-hover)">Click</button>
</div>Theme variables defined in src/styles/global.css for :root and :root.dark.
- Create component:
src/components/tools/[ToolName]Tool.svelte - Create page:
src/pages/tools/[tool-name].astro - Register in
src/data/tools.tsunder appropriate category
---
import Layout from "../../layouts/Layout.astro";
import MyTool from "../../components/tools/MyTool.svelte";
---
<Layout title="My Tool" currentPath="/tools/my-tool">
<MyTool client:load />
</Layout>- Trigger: Git tags matching
v* - Platform: GitHub Pages (Node 24, pnpm 10)
- Environment:
PUBLIC_VERSIONset from tag
astro^5.x,svelte^5.x (runes),tailwindcss^4.x