Docs

Everything you
need to know.

AstroStack templates are standard Astro 5 projects. No lock-in, no proprietary abstractions. This page covers setup, integrations, and deployment.

01 — Getting Started

Up and running in minutes.

Every AstroStack template ships as a standard Astro 5 project. Clone, install, configure your env vars, and deploy. No scaffolding tools, no magic CLIs.

1
git clone <template-url> my-project

Clone your purchased template

2
cd my-project && npm install

Install dependencies

3
cp .env.example .env

Fill in your API keys

4
npm run dev

Dev server starts on :4321

02 — Project Structure

What's inside the box.

All templates follow the same folder layout. Everything you'll actually edit lives in src/.

src/
└─ components/
└─ layouts/
└─ Layout.astro
└─ pages/
└─ index.astro
└─ api/
└─ checkout.ts
└─ webhook.ts
└─ styles/
└─ global.css
public/
astro.config.ts
tailwind.config.ts
.env.example

03 — Environment Variables

Keys you'll need.

Every template ships with a .env.example listing the exact variables it needs. Copy it to .env and fill in your values before running the dev server.

All templates

SITE_URL
https://yourdomain.com

Your deployed domain. No trailing slash.

Stripe — Digital Storefront · Invoice Portal · Preorder Pro

STRIPE_SECRET_KEY
sk_live_...

Stripe dashboard → Developers → API keys

STRIPE_WEBHOOK_SECRET
whsec_...

Stripe dashboard → Developers → Webhooks

STRIPE_PRICE_*
price_...

One ID per product. Create in Stripe → Products.

Supabase — Micro SaaS Dashboard · Invoice Portal

SUPABASE_URL
https://xxx.supabase.co

Project URL from Supabase dashboard

SUPABASE_ANON_KEY
eyJ...

Public anon key — safe to expose client-side

SUPABASE_SERVICE_ROLE_KEY
eyJ...

Server-only. Never expose to the browser.

Appwrite — Preorder Pro

APPWRITE_ENDPOINT
https://cloud.appwrite.io/v1

Your Appwrite endpoint. Cloud or self-hosted.

APPWRITE_PROJECT_ID
your-project-id

Found in Appwrite console → Settings

APPWRITE_API_KEY
your-api-key

Server-only. Create in Appwrite → API Keys.

Clerk — Waitlist Pro · Micro SaaS Dashboard

PUBLIC_CLERK_PUBLISHABLE_KEY
pk_live_...

Publishable key from Clerk dashboard

CLERK_SECRET_KEY
sk_live_...

Server-only secret key

Puter.js — AI Explorer

PUTER_APP_ID
your-app-id

App ID from puter.com. Free tier available.

04 — Stripe Setup

Accepting payments.

Templates that collect payments use Stripe Checkout. Create products in the Stripe dashboard, paste the price IDs into your .env, and the API routes handle the rest.

01

Create a product

Stripe dashboard → Products → Add product. Set a one-time price. Copy the price_xxx ID.

02

Add price IDs to .env

Paste each price_xxx into the corresponding STRIPE_PRICE_* variable in your .env.

03

Register the webhook

Stripe → Developers → Webhooks → Add endpoint. URL: https://yourdomain.com/api/webhook. Events: checkout.session.completed, payment_intent.payment_failed.

04

Test locally

stripe listen --forward-to localhost:4321/api/webhook — gives you a local STRIPE_WEBHOOK_SECRET for dev.

05

Go live

Swap test keys for live keys in production. Update the webhook endpoint to your live URL.

05 — Deployment

Ship it.

Templates with API routes require server-side rendering. Set output to 'server' or 'hybrid' in astro.config.ts and install the adapter for your host.

Vercel

npm i @astrojs/vercel

Recommended. Zero config.

Netlify

npm i @astrojs/netlify

Add netlify.toml if needed.

Cloudflare

npm i @astrojs/cloudflare

Edge runtime. Fast globally.

Node

npm i @astrojs/node

Self-hosted. Set mode: 'standalone'.

06 — License

One purchase. Yours forever.

All templates are sold under a single-use commercial license. One purchase covers one project. No recurring fees, no seat limits, no expiry.

  • Use in a single commercial or personal project
  • Modify and extend the code freely
  • Deploy to production indefinitely
  • Use across local, staging, and production for the same project
  • Resell, sublicense, or redistribute the source code
  • Use the same purchase across multiple unrelated projects
  • Claim the template as your own original work

Questions?

If anything here is unclear or your situation isn't covered, reach out before purchasing.

hello@astrostack.dev