Skip to content

feat: add Saigon Happy Hour Sniper cookbook app#83

Open
giaphutran12 wants to merge 18 commits intotinyfish-io:mainfrom
giaphutran12:feat-giaphutran12/saigon-happy-hour-sniper
Open

feat: add Saigon Happy Hour Sniper cookbook app#83
giaphutran12 wants to merge 18 commits intotinyfish-io:mainfrom
giaphutran12:feat-giaphutran12/saigon-happy-hour-sniper

Conversation

@giaphutran12
Copy link
Copy Markdown
Contributor

Summary

  • Adds Saigon Happy Hour Sniper — a live-updating dashboard that aggregates daily drink promos, happy hours, ladies' nights, and rooftop deals across bars/clubs in Ho Chi Minh City
  • Uses TinyFish SSE API to scrape 10 venue websites in parallel across 3 districts (D1, Thao Dien, D3), with optional Supabase caching
  • Architecture is a 1:1 copy of viet-bike-scout — same SSE streaming, multi-slot search, live browser preview iframes, optional Supabase cache with tryGetSupabase() graceful degradation

What's included

Layer Files Description
API src/app/api/search/route.ts SSE streaming endpoint, TinyFish orchestration, optional Supabase cache
Hook src/hooks/use-deal-search.ts Client-side SSE consumer with deal normalization
Normalization src/lib/normalize.ts 5 functions: VND price parsing, day ranges, time parsing, deal type mapping, venue validation
Tests src/lib/__tests__/normalize.test.ts 45 vitest test cases (all passing)
Components src/components/ deal-badge, venue-card, results-grid, live-preview-grid
Page src/app/page.tsx Multi-slot dashboard with global day/deal-type/price filters
Infra src/lib/env.ts, supabase.ts, district-sites.ts Env validation, Supabase client, venue URLs + goal prompt
Migration supabase/migrations/ deal_cache table (district + website unique constraint)
Docs README.md All 7 CONTRIBUTING.md sections + mermaid architecture diagram

Key features

  • 🍻 Multi-slot district search (up to 4 parallel)
  • 📅 Global day-of-week filter ("What's the best deal tonight?")
  • 🏷️ Deal type toggles (happy hour, ladies' night, brunch, live music, daily special)
  • 💰 Price sorting (cheapest deals first)
  • 🔴 Live TinyFish browser preview iframes
  • ⚡ Optional Supabase caching (app works without it)
  • ✅ 45 vitest tests for all normalization logic

Tech stack

Next.js 16, React 19, TypeScript (strict), Tailwind CSS 4, shadcn/ui, Zod 4, Supabase, Vitest

How to test

cd saigon-happy-hour-sniper
cp .env.example .env.local
# Fill in TINYFISH_API_KEY (required)
npm install
npm run dev
npm run build   # ✅ passes
npm run lint    # ✅ 0 errors
npx vitest run  # ✅ 45/45 pass

giaphutran12 and others added 18 commits March 5, 2026 20:17
…cout

Add Vietnam Bike Price Scout cookbook example
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 17, 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: 2d4b18b8-afe4-405e-b20a-a29709f921ce

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
📝 Coding Plan
  • Generate coding plan for human review comments

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.

Tip

CodeRabbit can suggest fixes for GitHub Check annotations.

Configure the reviews.tools.github-checks setting to adjust the time to wait for GitHub Checks to complete.

@giaphutran12
Copy link
Copy Markdown
Contributor Author

PR link: #83

Part of a 3-app contribution batch for Vietnamese market tools:

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.

1 participant