ASD Angular Supabase

April 3, 2026 · View on GitHub

Production-grade Angular + Supabase boilerplate with full ASD platform integration. Zero local toolchain needed — everything runs inside Docker via asd sandbox shell.

Tech Stack

LayerTechnology
FrontendAngular 21+ (SSR, standalone components, signals)
StylingTailwind CSS 4 + DaisyUI 5
Database & AuthSupabase (PostgreSQL + Auth + Edge Functions)
PaymentsMollie
Unit TestsVitest
E2E TestsPlaywright
Package Managerpnpm 10+
Task RunnerJust
OrchestrationASD CLI
CI/CDGitHub Actions

Quick Start

Prerequisites

1. Clone & enter sandbox

git clone https://github.com/asd-engineering/asd-angular-supabase.git
cd asd-angular-supabase
asd sandbox shell

This drops you into a Docker container with Node.js, pnpm, ASD CLI, and all tooling pre-installed.

2. Start the full stack

asd run dev

This single command:

  1. Bootstraps local Supabase (PostgreSQL, Auth, Studio, Edge Functions)
  2. Starts Caddy reverse proxy with TLS
  3. Applies network configuration (routes, tunnel seeds, basic auth)
  4. Starts ttyd (web terminal) and code-server (VS Code in browser)
  5. Starts Angular dev server on port 4200
  6. Displays the ASD Hub URL

3. Open the app

Available Commands

Just recipes

CommandDescription
just devStart full development environment
just startStart infrastructure only
just stopStop all services
just downStop all services and remove data
just sandboxEnter ASD sandbox container
just check-allRun all quality checks
just testUnit tests (watch mode)
just test-runUnit tests (CI mode)
just test-e2ePlaywright E2E tests
just docker-prodBuild and run production image
just docker-buildBuild Docker image
just docker-releaseBuild and push Docker image

ASD automation sequences

CommandDescription
asd run devFull stack startup
asd run startInfrastructure only
asd run stopStop services
asd run downStop + clean
asd run check-allLint, typecheck, format, test, duplication
asd run test-e2ePlaywright E2E tests

pnpm scripts

CommandDescription
pnpm devAngular dev server
pnpm buildProduction build
pnpm testUnit tests (watch)
pnpm test:runUnit tests (CI)
pnpm lintESLint
pnpm typecheckTypeScript type check
pnpm formatPrettier auto-format
pnpm format:checkPrettier check
pnpm duplication:checkCode duplication threshold

Architecture

Project Structure

src/app/
├── core/                    # Singletons, guards, interceptors
│   ├── guards/              # Route guards (auth.guard.ts)
│   ├── services/            # Global services (supabase, auth, payment)
│   └── types/               # TypeScript types (database.types.ts)
├── shared/                  # Reusable UI components
│   └── components/          # toast, confirm-modal, avatar
├── features/                # Feature routes (lazy-loaded)
│   ├── auth/                # Login, signup, callback
│   ├── home/                # Public home page
│   ├── pricing/             # Pricing plans
│   ├── payment/             # Payment callback
│   └── dashboard/           # Protected dashboard
│       ├── settings/        # User settings
│       └── orders/          # Order history
├── layouts/                 # Page layouts
│   ├── main-layout/         # Header + footer + content
│   └── auth-layout/         # Centered card layout
├── app.routes.ts            # Main routing config
└── app.routes.server.ts     # SSR render modes

Path Aliases

AliasPath
@core/*src/app/core/*
@shared/*src/app/shared/*
@features/*src/app/features/*
@env/*src/environments/*

Key Patterns

  • Standalone components — no NgModules, all components are standalone
  • Signals — Angular signals for reactive state
  • Lazy loading — all feature routes are lazy-loaded
  • Functional guardsauthGuard is a CanActivateFn
  • SSR with client-side auth — dashboard and payment callback use RenderMode.Client

Quality Tools

ToolPurposeConfig
ESLintLintingeslint.config.js
PrettierFormatting.prettierrc
TypeScriptType checkingtsconfig.app.json
jscpdDuplication detectionthreshold 15%
commitlintCommit message format.commitlintrc.json
lint-stagedPre-commit checks.lintstagedrc.json
HuskyGit hooks.husky/

Git Hooks

HookAction
pre-commitlint-staged (ESLint + Prettier on staged files)
commit-msgcommitlint (conventional commits)
pre-pushtypecheck + unit tests

CI/CD

GitHub Actions workflows run on push to main and pull requests:

WorkflowFileChecks
Buildbuild.ymlpnpm build
Lintinglinting.ymlESLint + TypeScript
Formatformat.ymlPrettier
Teststests.ymlVitest unit tests
Duplicationduplication.ymljscpd threshold
E2Eplaywright-e2e.ymlPlaywright
Dockerdocker.ymlBuild build + prod images

Docker

Development (ASD Sandbox)

# Enter sandbox — full ASD toolkit, pnpm, Node.js 22
just sandbox
# or
docker compose -f docker/docker-compose.yml run --rm dev

Production

# Build and run SSR server on port 3000
just docker-prod
# or
docker compose -f docker/docker-compose.prod.yml up --build

Multi-stage targets

TargetBasePurpose
devasd-sandbox:latestDevelopment with full ASD toolkit
buildnode:22-bookwormCI build verification
prodnode:22-bookworm-slimSSR production server

Tunnels & Remote Access

Expose your local dev environment to the internet with HTTPS and basic auth:

asd expose

This creates an SSH tunnel through the ASD Tunnel Server, routed through Caddy for authentication. All services (app, studio, ttyd, code-server) are accessible via subdomains of the tunnel URL.

Architecture: tunnel → Caddy → basic auth → reverse_proxy → service

DevInCi Cloud IDE

Launch a full cloud development environment via GitHub Actions:

just devinci

This triggers a workflow that:

  1. Spins up a runner with ASD sandbox
  2. Starts ttyd (web terminal) and code-server (VS Code)
  3. Opens an SSH tunnel for browser access
  4. Keeps the session alive until timeout or manual stop

Manage sessions:

  • just devinci-active — list active sessions
  • just devinci-watch — watch the latest run
  • just devinci-stop — stop the latest session

Payments (Mollie)

Architecture

Angular (client)  →  Supabase Edge Function  →  Mollie API
                  ←  redirect to checkout     ←
Mollie webhook    →  Supabase Edge Function  →  update orders table

Setup

  1. Get a Mollie API key from mollie.com
  2. Set the secret in Supabase:
    npx supabase secrets set MOLLIE_API_KEY=test_xxxxx
    
  3. Deploy edge functions:
    npx supabase functions deploy create-payment --no-verify-jwt
    npx supabase functions deploy mollie-webhook --no-verify-jwt
    

Flow

  1. User selects a plan on /pricing
  2. create-payment edge function creates a Mollie payment and an order record
  3. User is redirected to Mollie checkout
  4. After payment, user returns to /payment/callback
  5. Mollie sends webhook to mollie-webhook edge function
  6. Order status updated in database
  7. User sees order history at /dashboard/orders

Supabase

Local development

just supa-start       # Start local Supabase
just supa-stop        # Stop local Supabase
just supa-status      # Check status
just supa-reset       # Reset database (re-runs migrations)
just supa-types-local # Regenerate TypeScript types

Migrations

Migrations live in supabase/migrations/. Apply with:

just supa-reset

Claude Code

This project includes a CLAUDE.md with full project context for Claude Code. Use the /asd-setup skill to interactively generate or update the asd.yaml configuration.

Troubleshooting

Supabase won't start

Ensure Docker is running and ports 54321-54323 are free:

docker ps
just supa-status

pnpm install fails

Make sure you're using Node.js 22+ and pnpm 10+:

node -v && pnpm -v

Inside the sandbox container, pnpm is pre-installed via corepack.

Tunnel not connecting

Check that ASD_API_KEY is set in your .env and the tunnel server is reachable:

asd tunnel status

Commit rejected by commitlint

Commits must follow Conventional Commits:

feat: add pricing page
fix: resolve auth redirect
chore: update dependencies

Edge functions return stale data

After database migrations, redeploy edge functions:

npx supabase functions deploy create-payment --no-verify-jwt
npx supabase functions deploy mollie-webhook --no-verify-jwt