Skip to content

Bucket-backed DB persistence + dual-workspace Phase 1 (Workspace, Stage, Outreach) - #118

Open
futureaigh wants to merge 7 commits into
Gsync:mainfrom
futureaigh:dual-workspace-bucket-db
Open

futureaigh wants to merge 7 commits into
Gsync:mainfrom
futureaigh:dual-workspace-bucket-db

Conversation

@futureaigh

Copy link
Copy Markdown

What

Storage: Bucket, not Volume. The SQLite DB file (Prisma stays — it has no DuckDB provider, so an engine swap would mean rewriting 100+ call sites for zero single-user benefit) now persists to a Railway Bucket (jobsync-db, sjc) instead of the Railway Volume:

  • scripts/sync-db-bucket.mjs: dep-free SigV4 S3 client (GET/PUT/HEAD), download on boot, upload on 5-min timer + SIGTERM/SIGINT, syncs main file + WAL sidecars, exits 0 when unconfigured (local dev unaffected)
  • docker-entrypoint.sh + Dockerfile: restore before prisma migrate deploy, periodic push, scripts/ copied into the slim runner (zero new npm deps)
  • Service vars set via Railway CLI: AWS_ENDPOINT_URL, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_S3_BUCKET_NAME, AWS_DEFAULT_REGION=auto, S3_PATH_STYLE=false

Dual-workspace Phase 1 (PRD): Workspace/Stage/WorkspaceField/Outreach models + migration dual_workspace_outreach; workspace server actions (create with default SCHOOL/JOB pipelines, idempotent ensure-defaults, guarded delete); outreach actions (logOutreach auto-sets follow-up = sent + 12d, getFollowUpsDue, markOutreachReplied); followUpDueDate helper encoding the 10–14d rule; osui WorkspaceSwitcher component; seed-school-workspace.mjs seeding the SCHOOL workspace + 7 PI contacts (verified idempotent against local dev DB).

Tests

  • 27 new tests, all passing: bucket-sync (17, mocked fetch incl. SigV4 shape/determinism), outreach-follow-up, workspace.actions, outreach.actions
  • tsc --noEmit clean; prisma validate + migrate dev + generate green

Follow-ups (not in this PR)

  • Detach jobsync-volume after first successful bucket-backed deploy
  • Phases 2–5: workspace routing/dashboard, applications board/table/calendar, PI directory UI, MCP tools

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant