SellVia Docs — menu
DocsInfrastructure & DevOpsEnvironment Strategy

Environment Strategy

Infrastructure & DevOps/Environment Strategy.md
backendUpdated Aug 23, 2026

Environment Strategy

Purpose

Separating local development, staging, and production — directly from the earlier environment-strategy conversation, now the confirmed approach.

Environments

EnvironmentDomainDatabasePaddle modePurpose
Locallocalhost:3000sellvia_localTestIndividual development
Stagingstaging.wesellvia.comsellvia_stageTestPre-production testing, near-exact copy of prod
Productionwesellvia.comsellvia_prodLiveReal users, real money

Separation Rules (all from the original conversation, all still binding)

  • Never share a database between environments
  • Separate file storage buckets per environment
  • Paddle test mode for Local/Staging, live mode only for Production — this is especially critical now that SellVia is a real hosted-checkout payments system, not just a tracking tool; a test/live mixup here would mean real cards charged in a test environment or vice versa
  • Separate email sending (no risk of emailing real customers during staging tests)

Deployment Flow

feature/* branch → develop branch → Staging → main branch → Production

Nothing goes straight to Production. Every release passes through Staging first, which mirrors Production closely enough (per the original conversation) that a Staging pass is meaningful signal.

Configuration

Environment variables control all environment-specific behavior (DATABASE_URL, PADDLE_API_KEY, CLERK_SECRET_KEY, PAYMENT_MODE, etc.) — code itself never branches on environment name.

Open Questions

  • None blocking — this section is essentially a direct transcription of already-agreed environment strategy into the permanent documentation.

Update (2026-08-23): Paddle → Swich

Founder decisions, full reasoning in 02. Architecture Decision Log. The "Paddle mode" table column and every "Paddle test/live mode" reference above mean Swich now — same separation principle (test mode for Local/Staging, live only for Production), same severity of concern (a test/live mixup on a real payments system). PADDLE_API_KEY in the Configuration section is superseded by SWICH_API_KEY. CLERK_SECRET_KEY in that same line is separately stale, unrelated to this update — auth switched to Ory Kratos back on 2026-08-04.