Architecture Overview

Component Service Region
Web App Cloudflare Pages Edge (global)
API Server AWS App Runner us-east-1
Worker AWS App Runner us-east-1
Database Neon Postgres us-east-1
Archives AWS S3 us-east-1
Secrets AWS Secrets Manager us-east-1

CI/CD Pipeline

Deployments are managed through GitHub Actions with OIDC authentication to AWS.

Workflow Triggers

Pipeline Steps

  1. Checkout code
  2. Install dependencies (pnpm install)
  3. Type check (pnpm typecheck)
  4. Run tests (pnpm test)
  5. Parser snapshot verification
  6. Build applications
  7. Deploy to target environment

Deploy Commands

# Deploy web app to Cloudflare Pages
pnpm --filter @posit/web deploy

# Deploy API to App Runner
pnpm --filter @posit/api deploy

# Deploy all
pnpm deploy:all

Parser Snapshot Gate

Critical: Deployments are blocked if parser snapshots change unexpectedly.

The parser snapshot gate ensures transaction parsing accuracy is maintained. If snapshots change:

  1. Review the diff carefully
  2. Verify changes against Solscan/Birdeye
  3. Update snapshots with pnpm test -- -u
  4. Get approval from parser code owner

Rollback

# Rollback web app
wrangler pages deployment rollback

# Rollback API (App Runner)
aws apprunner start-deployment --service-arn $SERVICE_ARN --source-configuration '...'

Domain Configuration

Domain Target
positlabs.io Marketing site (Cloudflare Pages)
app.positlabs.io Web app (Cloudflare Pages)
api.positlabs.io API server (App Runner)
dev.positlabs.io Developer portal (Cloudflare Pages + Access)
Note: DNS is managed through Cloudflare. API subdomain proxies through Cloudflare to App Runner.