{"id":50960045,"url":"https://github.com/rbbydotdev/foobar","last_synced_at":"2026-06-18T12:30:52.326Z","repository":{"id":364169624,"uuid":"1266530742","full_name":"rbbydotdev/foobar","owner":"rbbydotdev","description":"AI ghost-text SQL autocomplete over web-request analytics — SQLite WASM, all client-side","archived":false,"fork":false,"pushed_at":"2026-06-11T23:54:00.000Z","size":189,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-12T00:12:49.913Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rbbydotdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-11T17:51:15.000Z","updated_at":"2026-06-11T23:53:56.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/rbbydotdev/foobar","commit_stats":null,"previous_names":["rbbydotdev/foobar"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/rbbydotdev/foobar","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbbydotdev%2Ffoobar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbbydotdev%2Ffoobar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbbydotdev%2Ffoobar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbbydotdev%2Ffoobar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rbbydotdev","download_url":"https://codeload.github.com/rbbydotdev/foobar/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbbydotdev%2Ffoobar/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34491225,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-18T02:00:06.871Z","response_time":128,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-18T12:30:48.973Z","updated_at":"2026-06-18T12:30:52.321Z","avatar_url":"https://github.com/rbbydotdev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# foobar\n\nA single-page demo of **AI tab / ghost-text autocomplete** for SQL, over **web-request analytics** data — everything runs client-side in the browser (SQLite compiled to WASM), so it deploys to GitHub Pages as static files.\n\nType SQL in the CodeMirror editor and an OpenRouter model streams a **ghost-text completion** you accept with **Tab**. Schema-aware **dropdown** autocomplete runs alongside it, and results render in a paginated table that updates as you type.\n\n## Features\n\n- **SQLite in the browser** — `@sqlite.org/sqlite-wasm`, in-memory, snapshotted to IndexedDB so data survives reloads (no server, no cross-origin-isolation headers needed).\n- **Seeded analytics data** — a `requests` table generated with `@faker-js/faker` (deterministic), including an intentional 5xx error spike.\n- **AI ghost text** — Copilot-style inline completions from any OpenRouter model via the Vercel AI SDK. `Tab` accepts, `Esc` dismisses, `⌘I` opens an inline \"ask AI to edit\" prompt.\n- **Schema autocomplete** — `@codemirror/lang-sql` dropdown completions driven by the live DB schema (no AI required).\n- **Run-as-you-type** — read-only queries execute debounced through TanStack Query; mutations require an explicit `⌘↵` so a half-typed `DELETE` can't run.\n- **Bring-your-own provider** — add an OpenRouter API key + model; everything is stored locally.\n- **Share links** — copy a link that base64-encodes the model + key in a `?provider=` param. Opening it imports the provider automatically (and strips the param). Handy for sharing a ready-to-go setup with teammates.\n- **Anomaly → AI** — optional (default **off**): detect 5xx spikes and send them to the model for a diagnosis + follow-up queries. Dropdown-controlled (off / manual / auto).\n- Light + dark themes, TanStack Table results (sort, paginate, dynamic columns).\n\n## Stack\n\nVite · React 19 · TypeScript · Tailwind v4 · shadcn/ui (radix) · CodeMirror 6 · TanStack Query + Table · `@sqlite.org/sqlite-wasm` · Vercel AI SDK + `@openrouter/ai-sdk-provider` · Zustand.\n\n## Develop\n\n```bash\npnpm install\npnpm dev      # http://localhost:5173/foobar/\npnpm build    # type-check + production build to dist/\npnpm preview\n```\n\n## Using AI autocomplete\n\n1. Click the **AI** control in the header → **Add provider**.\n2. Paste an [OpenRouter API key](https://openrouter.ai/keys) and pick a model (the catalog loads from OpenRouter).\n3. Toggle **AI autocomplete** on, then start typing SQL. Ghost text appears after a short pause — press `Tab` to accept.\n\n\u003e The API key lives in your browser (localStorage) and is embedded in share links. This is a demo — don't use a production key.\n\n## Deploy\n\nPushing to `main` builds and publishes to GitHub Pages via `.github/workflows/deploy.yml`. The Vite `base` is set to `/foobar/`; change it in `vite.config.ts` if you rename the repo.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frbbydotdev%2Ffoobar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frbbydotdev%2Ffoobar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frbbydotdev%2Ffoobar/lists"}