Repository navigation
NL1: the text-to-SQL app on Workers and Supabase - #2
Merged
pullely merged 1 commit intoOct 28, 2026
Merged
Conversation
The template in apps/web on Next.js 16.3.8 (the Cloudflare adapter refuses 15.5), built by @opennextjs/cloudflare into one Worker with Static Assets. Its four server actions are upstream's, with two changes: the model comes from lib/ai/models.ts — Workers AI's Llama 4 Scout through the AI binding, in JSON mode for the three structured outputs, or OpenAI's gpt-5.4-mini straight from OpenAI once OPENAI_API_KEY is a Worker secret (the gateway model string is gone) — and the SQL runs through lib/db.ts's runReadOnlyQuery(): app_private.run_read_only as query_reader, in a READ ONLY transaction with a 5 s statement timeout, after the template's own string check, which stays. @vercel/postgres becomes a postgres client per call over the HYPERDRIVE binding, rendered into wrangler.jsonc from the wiring document the infra/terraform/cloudflare-hyperdrive root publishes over the infra/terraform/supabase project. The table (upstream's CREATE TABLE), sixty fictional sample companies, row-level security and query_reader with its function are packages/db migrations applied by infra/db-migrate before the Worker deploys; tooling/migrations/csv-to-sql.mjs turns the owner's CB Insights CSV into one more. lib/site.ts is the name seam the layout and the header read, the source link where Vercel's deploy button was, and the origin. tests/web (the actions and the string check, the model on Workers AI through the real provider and on OpenAI, the client and the read-only path, the health check, the origin and the name) and tests/db (the manifest, the schema and the sample, row-level security, every refusal of the read-only path — writes, DDL, other schemas, a DELETE in hex, a step back up to the owner — and the CSV loader, on PGlite). typecheck, lint, test and build are green; the Worker is 1.52 MiB gzipped. Co-Authored-By: Claude <noreply@anthropic.com> Orun-Task: NL-2
pullely
deleted the
orun/NL-2-the-text-to-sql-app-on-workers-and-supabase
branch
October 28, 2026 10:49
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.
The template in apps/web on Next.js 16.3.8 (the Cloudflare adapter refuses 15.5), built by @opennextjs/cloudflare into one Worker with Static Assets. Its four server actions are upstream's, with two changes: the model comes from lib/ai/models.ts — Workers AI's Llama 4 Scout through the AI binding, in JSON mode for the three structured outputs, or OpenAI's gpt-5.4-mini straight from OpenAI once OPENAI_API_KEY is a Worker secret (the gateway model string is gone) — and the SQL runs through lib/db.ts's runReadOnlyQuery(): app_private.run_read_only as query_reader, in a READ ONLY transaction with a 5 s statement timeout, after the template's own string check, which stays. @vercel/postgres becomes a postgres client per call over the HYPERDRIVE binding, rendered into wrangler.jsonc from the wiring document the infra/terraform/cloudflare-hyperdrive root publishes over the infra/terraform/supabase project. The table (upstream's CREATE TABLE), sixty fictional sample companies, row-level security and query_reader with its function are packages/db migrations applied by infra/db-migrate before the Worker deploys; tooling/migrations/csv-to-sql.mjs turns the owner's CB Insights CSV into one more. lib/site.ts is the name seam the layout and the header read, the source link where Vercel's deploy button was, and the origin. tests/web (the actions and the string check, the model on Workers AI through the real provider and on OpenAI, the client and the read-only path, the health check, the origin and the name) and tests/db (the manifest, the schema and the sample, row-level security, every refusal of the read-only path — writes, DDL, other schemas, a DELETE in hex, a step back up to the owner — and the CSV loader, on PGlite). typecheck, lint, test and build are green; the Worker is 1.52 MiB gzipped.
🤖 Generated with Claude Code