+ Modern REST API — simple to integrate with BetterAuth
– Newer service; less track record than Postmark at high volume
~ Same-day switch to SendGrid or Postmark via SMTP fallback
G
Background Jobs
Async tasks: affiliate data sync, compatibility indexing, notifications
Postgres-Based
Options Evaluated
Postgres SKIP LOCKED → pg-boss Selected
BullMQ + Redis
Graphile Worker
Why Postgres-Based Wins
+ No additional service — Postgres handles the queue
+ Transactional job enqueue — no lost jobs on crash
+SKIP LOCKED is production-grade at this scale
– Not appropriate for sub-second job latency requirements
~ "Can Postgres do this? Yes." — add Redis only when proven necessary
H
Monitoring & Error Tracking
Know when production breaks before riders report it
Sentry + UptimeRobot
Options Evaluated
Sentry + UptimeRobot Selected
Datadog
Custom logging (Axiom / Loki)
Bugsnag
Why Sentry + UptimeRobot Win
+ Sentry free tier: 5K errors/mo — more than enough at launch
+ UptimeRobot: free uptime checks every 5 minutes
+ Sentry is open-source — self-hostable if cost becomes an issue
– No APM / distributed tracing at this tier
~ Datadog is the upgrade path at serious scale; not justified at $0
3
Portability Assessment
How easily can we leave each vendor if we need to?
Design principle: every service in this stack was chosen to be replaceable. Standard protocols and open-source tooling are non-negotiable constraints, not aspirations.
Vendor
What For
Standard Protocol
Migration Path
Effort
Fly.io
Container hosting
Docker image
Same image → Railway, Render, or Cloud Run
1 day
Neon
Primary database
Postgres wire protocol
pg_dump → any managed Postgres host
2–4 hours
BetterAuth
Authentication
Library (no vendor)
Data is in your Postgres; swap library or self-implement
1–3 days
Cloudflare R2
File storage
S3-compatible API
rclone sync r2: s3: — any S3-compatible store
Half day
Resend
Transactional email
REST API + SMTP fallback
Switch to SendGrid or Postmark same day via SMTP
Same day
Sentry
Error tracking
Open-source (self-hostable)
Self-host on Fly.io or switch SDK to Bugsnag
1–2 days
Stripe
Retailer billing
Proprietary API
Customer export possible; rebuilding Billing Portal is 2–4 weeks
2–4 weeks
4
Accounts & CLI Tools Needed
Everything you need to set up before writing the first line of app code.
Accounts to Create
GitHub — source of truth for code + CI/CD
Fly.io — container hosting + DNS/SSL
Neon — serverless Postgres database
Cloudflare — R2 object storage (when photos ship)
Resend — transactional email
Sentry — error tracking dashboard
Stripe — retailer subscription billing
RevZilla Affiliate — parts affiliate revenue
Amazon Associates — parts affiliate revenue
Google OAuth credentials — social login via BetterAuth
CLI Tools to Install
Node.js 20+ — runtime for SvelteKit dev
pnpm — package manager (preferred over npm)
Docker — container build + local Postgres
flyctl — Fly.io deploy + secrets management
Neon CLI — branch management for dev environments
git — version control (obviously)
Local Development Setup
Use Docker Compose to run a Neon-compatible Postgres instance locally (standard Postgres image is fine — Neon branching only matters for CI/staging). Commit an .env.example file documenting every required environment variable with placeholder values. Never commit a populated .env.
5
Dependency Budget
Complexity compounds. Every new service costs time, money, and incident surface area.
MVP Stack
5
external services
Fly.ioNeonGitHubResendSentry
Growth Stack
7
external services
+ R2+ UptimeRobot
Hard Limit
∞?
No. Stop here.
Justify first
Hard limit rule: No new external service may be added without answering the question "What does the existing stack definitively cannot do here?" — not "it would be nicer" or "the docs look cleaner." Document the answer in this register before merging.
6
Cost Projection
Free to launch. First real bill appears around Month 3–4 when you get traction.