Opinionated AI-first Astro starter with HTMX, Alpine.js, Tailwind CSS, DaisyUI, Supabase, and Resend.
It includes a public site, email/password auth, password reset and change flows, an authenticated /app area, versioned database migrations, and documentation plus agent skills for working in the repo.
Server-first HTML by default; minimal client JavaScript.
| Layer | Tool | Role |
|---|---|---|
| App framework | Astro 7 (server mode, Vercel adapter) | Routes, layouts, SSR, endpoints |
| Server-driven UI | HTMX | Partial page updates |
| Local UI state | Alpine.js | Toggles, drawers, small client state |
| Styling | Tailwind CSS 4 + DaisyUI 5 | Layout and components (lofi theme) |
| Backend | Supabase | Auth, Postgres, RLS |
| Resend | Transactional email (server-only) |
- Home (
/), About (/about), Contact (/contact) — placeholders to replace - Public chrome: About / Contact / Log in on desktop; mobile drawer (
PublicSidebar) - 404 with the same public chrome
- Dynamic
robots.txtandsitemap.xmlfrom site config - Canonical URLs, Open Graph tags, and web manifest from
src/config/site.ts
- Sign in (
/auth/signin) — email + password via Supabase - Request access (
/auth/signup) — emails the requester and admin; does not create accounts - Reset password (
/auth/reset-password) — email link → callback → change password - Change password (
/app/account/change-password) — fresh recovery/login sessions change directly; older sessions must confirm the current password - Sign out from the app sidebar
- Auth pages use focused chrome (no navigation)
- PKCE auth flow, request-scoped Supabase clients, rate limiting on public abuse-prone routes
- Routes under
/appgated by auth middleware - Landing page at
/app - App sidebar with
AppandAccountsections user_profilesrow created automatically when an auth user is created
- Vertical feature partials (method dispatch, validation, server work, HTML fragment):
- Public:
src/pages/public-features/<feature>.astro - Private:
src/pages/app/private-features/<feature>.astro
- Public:
- Chrome modes: public, authenticated, focused
- Site identity in
src/config/site.ts(name, URL, OG image, email addresses) - Schema in
supabase/migrations/(idempotent, with RLS) - Deploy target: Vercel (
npm run buildrunsastro checkthenastro build)
AGENTS.md— how to work in this repositorydocs/engineering/— architecture, stack, schema, API, conventions, design, UX, security, commands, deployment, ADRsdocs/product/— product-specific docs.agents/skills/— skills for DaisyUI, Supabase, Resend, email, delivery, and related work
- Node.js
>=22.12.0and npm>=9.6.5(Astro 7) - A Supabase project
- A Resend account with a verified sending domain
npm installcp .env.example .env| Variable | Purpose |
|---|---|
SUPABASE_URL |
Supabase project URL |
SUPABASE_ANON_KEY |
Publishable/anon key (RLS protects data) |
RESEND_API_KEY |
Server-only key for transactional email |
See docs/engineering/DEPLOYMENT.md for environment notes.
Apply the migration that creates user_profiles, RLS, and the auth trigger:
supabase link --project-ref <your-project-ref>
supabase db pushOr paste supabase/migrations/20260726170059_init_user_profiles.sql into the Supabase SQL editor. The script is idempotent.
- Enable the email provider with password sign-in.
- Add redirect URLs to the allowlist:
- Local:
http://localhost:4321/api/auth/callback - Production:
https://<your-domain>/api/auth/callback
- Local:
/auth/signup only sends access-request emails; it does not create accounts. Create the first user in the Supabase dashboard (Authentication → Users → Add user), then sign in at /auth/signin.
npm run devOpen http://localhost:4321.
- Edit
src/config/site.ts— product name, public URL, OG image, and email addresses. - Replace assets in
public/(favicons,apple-touch-icon.png,android-chrome-*.png) and updatepublic/site.webmanifest. - Point
SITE.ogImageat a 1200×630 social image. - Replace placeholder copy on
/,/about, and/contact. - Fill in
docs/product/PRD.mdanddocs/product/FEATURES.md. - Set
SITE.urlto the production origin before deploying.
| Command | Purpose |
|---|---|
npm run dev |
Dev server |
npm run dev:host |
Dev server on the local network |
npm run build |
Type-check (astro check) + production build |
npm run preview |
Serve the production build locally |
Full list: docs/engineering/COMMANDS.md.
| Path | Contents |
|---|---|
AGENTS.md |
Working in this repo (humans and agents) |
docs/engineering/ |
How the starter kit works |
docs/product/ |
What is being built on top of it |
.agents/skills/ |
Agent skills |
Read AGENTS.md before changing code.
MIT — see LICENSE.md.