Skip to content

Migration wing-command to Tinyfish SDK #134

Closed
KrishnaAgarwal7531 wants to merge 5 commits into
tinyfish-io:mainfrom
KrishnaAgarwal7531:mig-wing-command
Closed

Migration wing-command to Tinyfish SDK #134
KrishnaAgarwal7531 wants to merge 5 commits into
tinyfish-io:mainfrom
KrishnaAgarwal7531:mig-wing-command

Conversation

@KrishnaAgarwal7531
Copy link
Copy Markdown
Contributor

@KrishnaAgarwal7531 KrishnaAgarwal7531 commented Apr 7, 2026

Migrates Wing Command from raw TinyFish HTTP calls to the official SDK, and tears out the Supabase + Redis infrastructure that was never needed for this use case. The app now runs entirely in-memory — no database to provision, no cache to configure, just two API keys and you're running.
The app itself finds the best chicken wing spots near you by zip code. Pick a flavor persona, and it fires parallel browser agents at DoorDash, Uber Eats, Grubhub, and Google simultaneously, streaming results back as each source finishes rather than waiting for all of them.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 7, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 21f89981-2091-4d88-8913-0c49d786b3c2

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@simantak-dabhade simantak-dabhade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: changes requested

Code migration is the cleanest pass I've seen from this batch — SDK usage is idiomatic (client.agent.stream with typed EventType / RunStatus), Supabase and Redis are fully gone from the runtime, .env.local is correctly not tracked, no shadcn UI dump. Nice work there.

Two things to fix before merge.

🔴 README is heavily out of date

The code removed Supabase + Redis + PostGIS + the Python cron scraper, but the README still documents all of it. A user following this README today would spend 30 minutes provisioning services they don't need and still not be able to run the recipe. Needs a full rewrite of the following sections:

  • Architecture diagram (lines ~25-35) — currently shows Supabase (PostgreSQL + PostGIS), Upstash Redis, lib/tinyfish-scraper.ts, lib/cache.ts. None of those exist.
  • Scraping Flow (line 60) — step 6 says "Cache in Redis (15-min TTL) + persist to Supabase". That path is gone; it's pure in-memory now.
  • Prerequisites (line 67) — drop "Supabase project" and the Upstash Redis line.
  • Environment Variables (lines 73-90) — instructs users to create .env.local with SUPABASE_SERVICE_ROLE_KEY, NEXT_PUBLIC_SUPABASE_URL, NEXT_PUBLIC_SUPABASE_ANON_KEY, UPSTASH_REDIS_REST_URL, UPSTASH_REDIS_REST_TOKEN, and TINYFISH_API_URL. The actual .env.example only needs TINYFISH_API_KEY + GROQ_API_KEY. Match them, and have README say cp .env.example .env.local instead of hand-authoring.
  • Database Setup (lines 92-107) — tells users to run supabase/schema.sql. That directory doesn't exist anymore. Delete the whole section.
  • Render config (lines 137-161)render.yaml example still lists NEXT_PUBLIC_SUPABASE_URL, NEXT_PUBLIC_SUPABASE_ANON_KEY, SUPABASE_SERVICE_ROLE_KEY, UPSTASH_REDIS_REST_URL, UPSTASH_REDIS_REST_TOKEN. Strip to just TINYFISH_API_KEY + GROQ_API_KEY.
  • Cron Job section (lines 166-172) — references scraper/scrape_wings.py which doesn't exist. Delete.
  • Project Structure (lines 176-209) — lists lib/tinyfish-scraper.ts, lib/supabase.ts, lib/cache.ts, lib/menu.ts, supabase/, scraper/. All gone. Also mentions /api/menu/route.ts — actual routes are /api/scout + /api/discover.
  • Tech Stack (lines 222-231) — drop Database: Supabase (PostgreSQL + PostGIS) and Cache: Upstash Redis.
  • Constraint Checklist (lines 211-220) — still relevant but re-verify claims since infra changed.

🔴 Regression: engines field dropped

On main, wing-command/package.json has:

"engines": { "node": "22.x" }

This PR removes it. Please restore — it's one of only two recipes in the cookbook that pins Node, and the repo is moving toward standardizing on this.

🟡 Nits (not blocking)

  • PR body is empty — add a short description of what was migrated.
  • Next 14.2.35 — outdated vs the rest of the pack (most recipes are on Next 16). Will be handled by a separate repo-wide sweep, no action needed here.

✅ What's working well

  • /api/scout/route.ts is another solid SDK reference (alongside scholarship-finder's search route).
  • lib/types.ts:3 and lib/geocode.ts:3 explicitly call out "No Supabase. No Redis. Pure in-memory." — good signal that the teardown was intentional.
  • .env.example format with inline sign-up URLs.
  • No .env.local leak this time. (Unlike #132.)

Push README rewrite + engines restore and we'll re-review.

@KrishnaAgarwal7531 KrishnaAgarwal7531 changed the title Migration wing-command Migration wing-command to Tinyfish SDK Apr 18, 2026
Copy link
Copy Markdown
Contributor

@simantak-dabhade simantak-dabhade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good progress — all 3 asks from the last review are resolved. README rewritten, engines field restored, PR body filled in. Grep sweeps all clean.

Two remaining issues before we can merge:

1. Build fails — missing isPast on CountdownTime type

npm run build fails with:

./components/CommandJumbotron.tsx:50:19
Type error: Property 'isPast' does not exist on type 'CountdownTime'.

lib/types.ts:76 defines CountdownTime with days, hours, minutes, seconds but is missing isPast: boolean. Meanwhile lib/utils.ts:113,121 returns isPast in the object, and both CommandJumbotron.tsx:50 and utils.ts:126 read it.

Fix: add isPast: boolean to the CountdownTime interface in lib/types.ts.

2. Switch from Groq to OpenAI or Gemini

The recipe uses Groq (groq-sdk, GROQ_API_KEY) for LLM calls, but Groq is currently not opening up access for new accounts. This makes the recipe impossible to run for new users — violates clone-runnable.

Please switch the LLM integration to either OpenAI (openai package, OPENAI_API_KEY) or Google Gemini (@google/generative-ai, GEMINI_API_KEY). Update:

  • The SDK import and client initialization
  • .env.example (swap GROQ_API_KEY for the new key, with sign-up URL comment)
  • README.md env vars section and prerequisites
  • package.json dependencies

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.

3 participants