decision(ops): choose the plans, region, and preview database for the hosted instance

Open
#759 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
25/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Active
Tech stack
next.js, playwright, supabase, typescript

Research direction

Read docs/operations/self-hosting.md, docs/internal/hosted-instance.md, and the region and preview database guidance in docs/operations/deploy.md. The issue requires Eddie to choose plans and a region first, so a contributor cannot complete the documentation until that decision is recorded here; then update the listed docs and link the choice from #90 and #91.

Written by the indexing model from the issue text.

Description

area: ops decision enhancement impact: high priority: P1 size: XS

Context

Found by the Fable pre-production review on 2026-12-02 (main at cedc1914; every line reference below re-checked on main at cde5aa3b). Sources: platform triage report, new issue 6, and deploy readiness report, new issue 5.

No doc names a plan for the hosted instance; only incidental notes exist (docs/operations/self-hosting.md:72 leaves backups to "your Supabase plan"; docs/operations/deploy.md:27 only advises a region). The choice decides #90 (backups) and #91 (log retention and alerting), and the Supabase region cannot be changed after the project is created. Whether the existing Vercel team that owns stack-dash is on Hobby or Pro is unverified.

What the code needs from the plan:

  • Function duration: the tick declares maxDuration = 120 (src/app/api/jobs/tick/route.ts:14) and the provider callback maxDuration = 300 (src/app/api/connections/[provider]/callback/route.ts:40). Both fit Hobby only with Fluid compute (Vercel docs: 300 s default and maximum).
  • Logs: users see reference ids that resolve only in server logs (src/lib/log/logger.ts:46 writes to stdout and stderr only).
  • Backups: provider tokens are sealed with STACKDASH_ENCRYPTION_KEY, which lives outside the database, so a backup is useless without the escrowed key, and the database is useless without a backup.
  • Preview database: previews run unreviewed branch code and should use a separate staging project (deploy.md:210-212), but one staging database cannot match every branch's migrations.

Vendor facts, read from the pricing pages on 2026-12-02 (supabase.com/pricing, vercel.com/pricing):

  • Supabase Free: $0, no automatic backups, 1 day of API and database logs, projects paused after 1 week of inactivity (a tick every minute counts as activity [INFERENCE]), 2 active projects.
  • Supabase Pro: from $25 a month including one Micro project; extra projects from $10 a month each; daily backups kept 7 days; 7 days of logs; log drains $60 a month each; branching $0.01344 per branch hour.
  • Vercel Hobby: $0, 1 hour of runtime logs, no drains, one developer seat.
  • Vercel Pro: $20 a month per developer seat, 1 day of runtime logs (30 days with Observability Plus, paid per event), drains $0.50 per GB.
  • Vercel's fair use terms limit Hobby to non-commercial use [not re-read today; check before choosing].

This is Eddie's choice (vendor plans), so the options are below.

Option Pros Cons Effort Impact
Status quo: nothing decided; Free and Hobby by default $0 a month No backup of sealed provider tokens (#90 cannot be met); reference ids unsearchable after 1 hour (#91 cannot be met); commercial use on Hobby is against Vercel's terms [unverified today] XS (nothing) Every outside tester: a lost database means every connection must be redone, and a reported error cannot be traced after an hour
A. Supabase Pro (production only), Vercel Hobby with Fluid compute Daily backups for 7 days, 7 days of Supabase logs; about $25 a month Vercel logs still 1 hour; no drain on Hobby, so #91 needs an external error tracker that receives errors directly; Hobby terms question remains XS for the decision Data is recoverable; app errors still need #91 (a) before the first real sync
B. Supabase Pro with a second Micro project for staging, Vercel Pro (one seat) Backups, staging database for previews, Vercel logs for 1 day and drains available, commercial use allowed About $25 + $10 + $20 = $55 a month before usage XS for the decision Covers #90 and the preview database; #91 (a) can be a drain or a tracker
C. Option B with Supabase branching instead of a staging project Each preview can get its own database matching its migrations Billed per branch hour; branching setup is not documented in this repository; previews sit behind Vercel SSO today S (docs and setup) on top of B Previews stop sharing one staging schema; cost grows with open pull requests

Files each option touches:

Option Files
Status quo none
A, B docs/operations/self-hosting.md (What you need), docs/internal/hosted-instance.md, docs/operations/deploy.md:27 (region) and :210-212 (preview database)
C the same, plus a branching section in deploy.md

Recommendation: B. The deciding argument: #90 and #91 both need a paid plan on each vendor, and the staging project is what deploy.md:212 already asks previews to use. Second choice: A, if the Vercel team turns out to be Pro already or the log need is met by an external tracker.

Region: choose the Supabase region next to the Vercel functions region (deploy.md:27); record both on this issue.

Plan

  1. Eddie confirms which plan the Vercel team that owns stack-dash is on.
  2. Eddie picks an option and a region on this issue.
  3. Record the minimums in self-hosting.md "What you need" and the hosted choice in hosted-instance.md.
  4. Link the choice from #90 and #91.

Acceptance criteria

  • The chosen plans, region, and preview database approach are recorded on this issue with monthly cost.
  • self-hosting.md "What you need" states the minimum plans and why (backups, function duration).
  • hosted-instance.md names the hosted plans and region.
  • #90 and #91 cite the choice.
  • Playwright e2e: none needed, docs only.

Files and areas

docs/operations/self-hosting.md, docs/internal/hosted-instance.md, docs/operations/deploy.md (region and preview database lines only).

Non-goals: creating projects or changing plans (Eddie's), the error tracker vendor choice (#91), the staged build decision (separate decision issue).

Verification

npm run lint; the docs e2e spec still passes.


Branch: <issue-number>-hosted-plans

Model: anthropic/claude-opus-5-5 | Reasoning effort: unknown

Dominant language
TypeScript
Stars
13
Forks
2
Avg merge
5h 20m
Merged PRs (30d)
287

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from eddiejaoude/StackDash

All issues in eddiejaoude/StackDash

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.