feat(deploy): prepare the Vercel showcase with Supabase (#59) - #64
Merged
Merged
Conversation
…rverless drain budget (#59) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DJ5vaKvTYiMvdngT4d3xo1
…t a worker (#59) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DJ5vaKvTYiMvdngT4d3xo1
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DJ5vaKvTYiMvdngT4d3xo1
…document new variables (#59) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DJ5vaKvTYiMvdngT4d3xo1
…nit (#59) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DJ5vaKvTYiMvdngT4d3xo1
…contract (#59) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DJ5vaKvTYiMvdngT4d3xo1
…Fluid compute (#59) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DJ5vaKvTYiMvdngT4d3xo1
… own time, role-level statement timeout (#59 review) - UPLOAD_MAX_PER_HOUR (required with APP_ENV=showcase): 429 before anything is stored - after() drains subtract the time the invocation already spent - bootstrap: passwords via \prompt (not on the command line), ALTER ROLE app_rw SET statement_timeout - Bearer scheme case-insensitive; runbook and ADR details Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DJ5vaKvTYiMvdngT4d3xo1
…pabase-59 # Conflicts: # CHANGELOG.md # src/worker.ts
…view) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DJ5vaKvTYiMvdngT4d3xo1
Owner
Author
Frischer Review (read-only Subagent) – Ergebnis und UmgangNichts blockierend. Bestätigt: Drain-Route mit Vergleich in konstanter Zeit, 404 ohne
Nach den Änderungen und dem Merge von Generated by Claude Code |
15 tasks
…pabase-59 # Conflicts: # CHANGELOG.md # docs/technical/architecture.md # src/features/requests/index.ts
Fluory
marked this pull request as ready for review
September 24, 2026 17:10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Warum
Fixes #59 · Auftrag des Orchestrators (2026-09-24): „Bereite Vercel Hosting vor aber mit Supabase statt Neon“. ADR-0001 D11 sah Vercel + Neon + R2 vor. Es werden keine Konten, Schlüssel, Cloud-Ressourcen oder Deploys angelegt – nur Code, Konfiguration und Anleitung.
Arbeitsstand
/api/jobs/drain(CRON_SECRET),after()-Drain nach Upload, Freigabe und Neuverarbeitung (JOB_DRAIN_INLINE=true), Worker nutzt dieselbe Verdrahtung (src/job-drain.ts),vercel.json(fra1, 300 s, täglicher Cron), Demo-Banner (DEMO_MODE=true), Upload-Limit pro Person und Stunde (UPLOAD_MAX_PER_HOUR, Pflicht auf dem Showcase), ADR-Amendment zu D11, Runbookdocs/technical/deployment-vercel.md,scripts/supabase-bootstrap.sql, neue Variablen in.env.example; frischer Review eingearbeitet;verify+ E2E grün.auth→identity).after().Was ist passiert (Klartext)
Das Projekt ist jetzt so vorbereitet, dass es auf Vercel laufen kann, mit Supabase für Datenbank und Dateiablage (statt Neon und Cloudflare R2 – ein Anbieter weniger). Auf Vercel gibt es keinen dauerhaft laufenden Hintergrund-Prozess; deshalb stößt die App die Verarbeitung direkt nach dem Hochladen und nach der Freigabe selbst an, zusätzlich einmal täglich per Zeitplan und über „Erneut verarbeiten“. Damit eine öffentliche Demo keine unkontrollierten KI-Kosten verursacht, darf jede Person nur eine begrenzte Zahl Anfragen pro Stunde hochladen. Ein Banner „Demo – nur synthetische Daten“ lässt sich einschalten. Eine Schritt-für-Schritt-Anleitung beschreibt, was du bei Supabase, Vercel und für den KI-Dienst anlegen musst. Lokal ändert sich nichts.
Plan-Pflicht (SYSTEM.md §4)
Impact Manifest
jobs/Worker-Verdrahtung,intake(Upload-Limit),requests(Zählung),app(Route, Actions, Layout),config, Doku/ADR.GET|POST /api/jobs/drain(BearerCRON_SECRET, 404 ohne Secret);POST /api/requestskann 429 antworten (nur mitUPLOAD_MAX_PER_HOUR); neue VariablenCRON_SECRET,JOB_DRAIN_INLINE,DEMO_MODE,UPLOAD_MAX_PER_HOUR. Keine Migration.set_config, unbenannte Prepared Statements, pg-boss ohne LISTEN, transaktionsgebundene Advisory-Locks);statement_timeoutzusätzlich an der Rolle.Geändert
src/app/api/jobs/drain/route.ts,src/app/_server/{drain,drain-request}.ts,src/job-drain.ts,src/worker.tssrc/app/api/requests/route.ts(429,after()),src/app/requests/actions.ts,src/app/requests/[id]/actions.ts(after())src/features/intake/{submit,files,index}.ts,src/features/requests/{repository,index}.ts(Upload-Limit)src/app/_components/demo-banner.tsx,src/app/layout.tsx,src/app/globals.csssrc/config/env.ts,.env.example,vercel.jsondocs/decisions/ADR-0001-pilot-architecture.md(Amendment D11),docs/technical/deployment-vercel.md,operations.md,architecture.md(Karte + Ausnahmenregister),scripts/supabase-bootstrap.sql, CHANGELOGdrain-request.test.ts,demo-banner.test.ts,deployment.test.ts,env.test.ts,tests/integration/{drain,drain-route,intake}.test.tsNachweis (SYSTEM.md §11)
verify:changed: grünverify: grün nach Review und Merge vonmain– unit 188, integration 125verify:full/ E2E-Spec:review-smoke,line-items-smoke2/2 grünDoku-Entscheidung (genau eine)
docs/technical/deployment-vercel.md,operations.mddocs/technical/architecture.mddocs/decisions/ADR-0001-pilot-architecture.md(Amendment D11)[Unreleased](sichtbares Feature oder Verhalten – im selben PR, nie „später")Entferntes oder Umbenanntes: Worker-Verdrahtung nach
src/job-drain.tsverschoben; Registereintrag „Upload ohne Rate-Limit“ ersetzt;docs/gegreptDateigrößen und neue Bausteine (SYSTEM.md §7)
Dateien über 500 Zeilen im Diff (Ausnahmen: generierter Code, Lockfiles, Fixtures, Migrationen, Schemas, Ressourcen, Doku, Konfiguration):
Über 800 Zeilen mit neuer Fachlogik oder über 1000 Zeilen (P1/P2): nicht betroffen
Neue Shared-Komponente, Utility-Datei, Adapter oder fachlicher Service:
drain,drainExports,src/worker.ts) und Rate-Limits (Better Authrate_limitgilt nur für Auth-Routen); gefunden und wiederverwendet –src/job-drain.tsbündelt nur die Verdrahtung aus dem Worker; das Upload-Limit zählt vorhandenerequests-Zeilen statt einer neuen TabelleSubagent-Einsätze
Risiken / offene Punkte
🤖 Generated with Claude Code
https://claude.ai/code/session_01DJ5vaKvTYiMvdngT4d3xo1