-
Notifications
You must be signed in to change notification settings - Fork 106
Add home-snipe - Mino Use Case #14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
pranavjana
wants to merge
2
commits into
tinyfish-io:main
Choose a base branch
from
pranavjana:pranav/home-snipe
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
|
||
| # dependencies | ||
| /node_modules | ||
| /.pnp | ||
| .pnp.* | ||
| .yarn/* | ||
| !.yarn/patches | ||
| !.yarn/plugins | ||
| !.yarn/releases | ||
| !.yarn/versions | ||
|
|
||
| # testing | ||
| /coverage | ||
|
|
||
| # next.js | ||
| /.next/ | ||
| /out/ | ||
|
|
||
| # production | ||
| /build | ||
|
|
||
| # misc | ||
| .DS_Store | ||
| *.pem | ||
|
|
||
| # debug | ||
| npm-debug.log* | ||
| yarn-debug.log* | ||
| yarn-error.log* | ||
| .pnpm-debug.log* | ||
|
|
||
| # env files (can opt-in for committing if needed) | ||
| .env* | ||
|
|
||
| # vercel | ||
| .vercel | ||
|
|
||
| # typescript | ||
| *.tsbuildinfo | ||
| next-env.d.ts |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,169 @@ | ||
| # TinyFish - HDB Deal Sniper | ||
|
|
||
| **Live Demo:** https://home-snipe.vercel.app | ||
|
|
||
| Real-time Singapore HDB resale deal finder that uses the **Source → Extract → Present** pipeline pattern. Gemini generates property listing URLs, Mino browser agents scrape them in parallel, and Gemini analyzes results to identify underpriced deals. | ||
|
|
||
| **Status**: ✅ Working | ||
|
|
||
| --- | ||
|
|
||
| ## Demo | ||
|
|
||
|  | ||
|
|
||
| --- | ||
|
|
||
| ## How Mino API is Used | ||
|
|
||
| The Mino API powers browser automation for this use case. See the code snippet below for implementation details. | ||
|
|
||
| ### Code Snippet | ||
|
|
||
| ```bash | ||
| npm install | ||
| export MINO_API_KEY=your_key | ||
| export GEMINI_API_KEY=your_key | ||
| npm run dev | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## How to Run | ||
|
|
||
| ### Prerequisites | ||
|
|
||
| - Node.js 18+ | ||
| - Mino API key (get from [mino.ai](https://mino.ai)) | ||
|
|
||
| ### Setup | ||
|
|
||
| 1. Clone the repository: | ||
| ```bash | ||
| git clone https://github.com/tinyfish-io/TinyFish-cookbook | ||
| cd TinyFish-cookbook/home-snipe | ||
| ``` | ||
|
|
||
| 2. Install dependencies: | ||
| ```bash | ||
| npm install | ||
| ``` | ||
|
|
||
| 3. Create `.env.local` file: | ||
| ```bash | ||
| MINO_API_KEY=xxx # Browser automation | ||
| GEMINI_API_KEY=xxx # URL generation + deal analysis | ||
| ``` | ||
|
|
||
| 4. Run the development server: | ||
| ```bash | ||
| npm run dev | ||
| ``` | ||
|
|
||
| 5. Open [http://localhost:3000](http://localhost:3000) in your browser | ||
|
|
||
| --- | ||
|
|
||
| ## Architecture Diagram | ||
|
|
||
| ```mermaid | ||
| flowchart TB | ||
| subgraph Input[USER INPUT] | ||
| Form[Town + Flat Type + Discount %] | ||
| end | ||
| subgraph Phase1[PHASE 1: URL GENERATION] | ||
| Gemini1[Gemini AI] | ||
| URLs[10 Property URLs] | ||
| end | ||
| subgraph Phase2[PHASE 2: PARALLEL SCRAPING] | ||
| A1[Agent 1] | ||
| A2[Agent 2] | ||
| A3[Agent 3] | ||
| A10[Agent 10...] | ||
| end | ||
| subgraph Phase3[PHASE 3: DEAL ANALYSIS] | ||
| Gemini2[Gemini AI] | ||
| Deals[Underpriced Deals] | ||
| end | ||
| subgraph Output[RESULTS] | ||
| UI[Live Results Sidebar] | ||
| end | ||
| Form --> Gemini1 | ||
| Gemini1 --> URLs | ||
| URLs --> A1 | ||
| URLs --> A2 | ||
| URLs --> A3 | ||
| URLs --> A10 | ||
| A1 --> Gemini2 | ||
| A2 --> Gemini2 | ||
| A3 --> Gemini2 | ||
| A10 --> Gemini2 | ||
| Gemini2 --> Deals | ||
| Deals --> UI | ||
| A1 -.-> UI | ||
| A2 -.-> UI | ||
| A3 -.-> UI | ||
| A10 -.-> UI | ||
| ``` | ||
|
|
||
| ```mermaid | ||
| sequenceDiagram | ||
| participant U as User | ||
| participant FE as Frontend | ||
| participant API as API Route | ||
| participant G as Gemini AI | ||
| participant M as Mino Agents | ||
| U->>FE: Select town, flat type, discount | ||
| FE->>API: POST /api/search | ||
| API->>G: Generate property URLs | ||
| G-->>API: 10 URLs from property sites | ||
| API->>M: Launch 10 parallel agents | ||
| M-->>API: Stream live URLs | ||
| API-->>FE: Forward streaming URLs | ||
| FE-->>U: Show live agent grid | ||
| M-->>API: Extract listings | ||
| API-->>FE: Stream raw listings | ||
| FE-->>U: Update results sidebar | ||
| API->>G: Analyze for deals | ||
| G-->>API: Underpriced listings | ||
| API-->>FE: DEALS_FOUND | ||
| FE-->>U: Highlight deals | ||
| ``` | ||
|
|
||
| ```mermaid | ||
| classDiagram | ||
| class RawListing { | ||
| +string address | ||
| +string block | ||
| +string street | ||
| +string town | ||
| +string flatType | ||
| +string floorLevel | ||
| +string sqft | ||
| +number askingPrice | ||
| +string timePosted | ||
| +string agentName | ||
| +string agentPhone | ||
| +string listingUrl | ||
| +string source | ||
| } | ||
| class DealResult { | ||
| +string address | ||
| +string town | ||
| +string flatType | ||
| +number askingPrice | ||
| +number marketValue | ||
| +number discountPercent | ||
| +string timePosted | ||
| +string reasoning | ||
| } | ||
| class AgentStatus { | ||
| +number id | ||
| +string url | ||
| +string status | ||
| +string streamingUrl | ||
| +string[] steps | ||
| } | ||
| ``` | ||
|
|
||
|
|
||
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use a markdown link instead of a bare URL.
This avoids MD034 and keeps formatting consistent.
✏️ Suggested change
📝 Committable suggestion
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)
3-3: Bare URL used
(MD034, no-bare-urls)
🤖 Prompt for AI Agents