Skip to content

Migrate scholarship-finder to TinyFish SDK#131

Open
KrishnaAgarwal7531 wants to merge 5 commits intotinyfish-io:mainfrom
KrishnaAgarwal7531:mig-scholarship-finder
Open

Migrate scholarship-finder to TinyFish SDK#131
KrishnaAgarwal7531 wants to merge 5 commits intotinyfish-io:mainfrom
KrishnaAgarwal7531:mig-scholarship-finder

Conversation

@KrishnaAgarwal7531
Copy link
Copy Markdown
Contributor

@KrishnaAgarwal7531 KrishnaAgarwal7531 commented Apr 7, 2026

Migrated scholarship-finder to @tiny-fish/sdk. Deleted the two dead routes (/api/discover and /api/scrape) — /api/search already handles Groq-powered URL discovery and parallel TinyFish agent scraping in one SSE stream. Removed 35 unused shadcn components that were causing missing @radix-ui dep errors, fixed package.json to remove scroll-area and add the missing toggle and tooltip packages, added commented .env.example for both keys, and added a README.md. Also removed the mid-search live results section from page.tsx — cards were rendering at different heights and without working select/compare controls, so results now only appear once all agents complete. Tested end to end — search, live agent streaming, and results with comparison all working.

@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: c50bf632-7ba0-4bac-ae45-5f564a910670

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

The working endpoint (/api/search) is actually really nice — typed EventType / RunStatus, parallel agents, fallback URLs, sensible error surfacing. That's the template. But there's a bunch of dead weight around it that's breaking the build.

🔴 Build fails — type error in dead api/scrape/route.ts

./src/app/api/scrape/route.ts:59:29
Type error: 'raw.replace' is of type 'unknown'.

event.result from the SDK is structured (not a markdown-wrapped string), so raw.replace(/```json|```/g, "") is both a type error and incorrect at runtime.

The easier fix here: delete this route entirely. Nothing in the UI calls /api/scrapesrc/hooks/useScholarshipSearch.ts only fetches /api/search.

🔴 Dead routes

/api/discover is also unreferenced. /api/search already does its own Groq discovery inline at STEP 1 with its own FALLBACK_URLS. Please delete both /api/discover and /api/scrape.

🔴 Missing @radix-ui/* deps for dead UI components

src/components/ui/ has 48 shadcn files but only 5 of the ~23 needed @radix-ui/* packages are in package.json. Once the scrape type error is fixed, typecheck will fail next on accordion.tsx, alert-dialog.tsx, etc.

The live app only imports Select (from SearchForm) and the toast types (from use-toast). Delete the unused ui/*.tsx files — same fix as #129. Quick way to find keepers:

grep -rho "from \"@/components/ui/[^\"]*\"" src/{app,components,hooks} | sort -u

🔴 No README.md

Required by CONTRIBUTING.md. Please add one with title, live link, description, demo, code snippet, run steps, architecture diagram.

🟡 .env.example needs comments

Currently just:

TINYFISH_API_KEY=
GROQ_API_KEY=

Playbook requires a one-line comment per var with "get your key at" URL. See tutor-finder/.env.example (PR #129) for the format.

🟡 Nits (not blocking)

  • PR body is empty — please add a description of what was migrated + testing notes.
  • Title migration scholarship-finder → suggest Migrate scholarship-finder to TinyFish SDK.

✅ What's working well

  • /api/search/route.ts is a solid SDK reference — typed events, parallel agents, RunStatus check, proper fallback, clear error paths.
  • Supabase, Mino, Vite artifacts all fully removed.
  • .env / .env.local in .gitignore.

Once those land, push and we'll re-review.

@KrishnaAgarwal7531 KrishnaAgarwal7531 changed the title migration scholarship-finder Migrate scholarship-finder to TinyFish SDK Apr 18, 2026
@KrishnaAgarwal7531
Copy link
Copy Markdown
Contributor Author

Migrated scholarship-finder to @tiny-fish/sdk. Deleted the two dead routes (/api/discover and /api/scrape) — /api/search already handles Groq-powered URL discovery and parallel TinyFish agent scraping in one SSE stream. Removed 35 unused shadcn components that were causing missing @radix-ui dep errors, fixed package.json to remove scroll-area and add the missing toggle and tooltip packages, added commented .env.example for both keys, and added a README.md. Also removed the mid-search live results section from page.tsx — cards were rendering at different heights and without working select/compare controls, so results now only appear once all agents complete. Tested end to end — search, live agent streaming, and results with comparison all working.

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 — 5 of 6 original asks are fixed. Dead routes deleted (only api/search/ remains), README added and well-written, .env.example has sign-up URL comments, PR body filled in.

Two remaining issues:

1. Build fails — 12 dead UI files (one breaks the build)

You trimmed ui/ from 48 to 13 files, but 12 of the remaining 13 are still unused. Only select.tsx is imported by app code (SearchForm.tsx). The rest have zero references:

button.tsx, dialog.tsx, input.tsx, label.tsx, separator.tsx,
sheet.tsx, skeleton.tsx, toast.tsx, toaster.tsx, toggle.tsx,
tooltip.tsx, use-toast.ts

label.tsx breaks the build because it imports @radix-ui/react-label which isn't in package.json:

./src/components/ui/label.tsx:2:33
Type error: Cannot find module '@radix-ui/react-label'

Fix: delete all 12 files. Keep only select.tsx. Then also trim the excess radix deps from package.json — the only needed one is @radix-ui/react-select.

2. Switch from Groq to OpenAI or Gemini

Same issue as wing-command (#134) — Groq is not opening up access for new accounts, which makes this recipe impossible to clone-and-run. search/route.ts uses groq-sdk for URL discovery.

Please switch to OpenAI (openai package, OPENAI_API_KEY) or Google Gemini (@google/generative-ai, GEMINI_API_KEY). Update the SDK import, client init, .env.example, and README.

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