Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions credit-aggregator/.gitignore
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
163 changes: 163 additions & 0 deletions credit-aggregator/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
# TinyFish - Singapore Credit Card Aggregator

## Demo

![credit-aggregator Demo](./assets/e74cd381-8291-4a76-b23d-c5220cc33260.jpg)

**Live Demo:** https://credit-aggregator.vercel.app/
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Use markdown link syntax for the URL.

Per markdownlint (MD034), bare URLs should be wrapped in angle brackets or use proper link syntax.

Proposed fix
-**Live Demo:** https://credit-aggregator.vercel.app/
+**Live Demo:** <https://credit-aggregator.vercel.app/>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
**Live Demo:** https://credit-aggregator.vercel.app/
**Live Demo:** <https://credit-aggregator.vercel.app/>
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)

7-7: Bare URL used

(MD034, no-bare-urls)

🤖 Prompt for AI Agents
In `@credit-aggregator/README.md` at line 7, Replace the bare URL after the
"**Live Demo:**" text with proper Markdown link syntax; specifically, change the
line that currently reads "**Live Demo:** https://credit-aggregator.vercel.app/"
to use a link like "**Live Demo:**
[https://credit-aggregator.vercel.app/](https://credit-aggregator.vercel.app/)"
or "**Live Demo:** [Live Demo](https://credit-aggregator.vercel.app/)" so it
conforms to markdownlint (MD034).


A real-time credit card comparison tool that aggregates data from 6 major Singapore financial comparison websites using parallel Mino browser agents. Users describe their requirements in natural language, and the system dispatches concurrent AI agents to scrape and consolidate matching credit cards.

**Status**: ✅ Working

---

## Demo

*[Demo video/screenshot to be added]*

Comment on lines +15 to +18
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Remove duplicate "Demo" section.

This section duplicates the heading from line 3 and contains only placeholder text. Consider removing it entirely since line 5 already shows a demo image and line 7 links to the live demo.

Proposed fix
-## Demo
-
-*[Demo video/screenshot to be added]*
-
----
-
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)

15-15: Multiple headings with the same content

(MD024, no-duplicate-heading)

🤖 Prompt for AI Agents
In `@credit-aggregator/README.md` around lines 15 - 18, Remove the duplicate
"Demo" section in the README by deleting the second "## Demo" heading and its
placeholder line ("*[Demo video/screenshot to be added]*"); keep the original
demo content already present earlier (the demo image and live demo link) and
ensure no other references or anchors rely on that duplicate heading "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_api_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/credit-aggregator
```

2. Install dependencies:
```bash
npm install
```

3. Create `.env.local` file:
```bash
# Add your environment variables here
MINO_API_KEY=sk-mino-...
```

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 UI[USER INTERFACE]
Input[Natural Language Input]
Progress[Site Progress Grid]
Results[Results Display]
end
subgraph API[API LAYER]
SSE[SSE Stream Handler]
Orchestrator[Parallel Orchestrator]
end
subgraph Agents[MINO BROWSER AGENTS]
A1[SingSaver]
A2[MoneySmart]
A3[Seedly]
A4[MileLion]
A5[SuiteSmile]
A6[MainlyMiles]
end
subgraph Processing[RESULT PROCESSING]
Parser[Result Parser]
Dedup[Deduplication Engine]
end
Input --> SSE
SSE --> Orchestrator
Orchestrator --> A1
Orchestrator --> A2
Orchestrator --> A3
Orchestrator --> A4
Orchestrator --> A5
Orchestrator --> A6
A1 --> Parser
A2 --> Parser
A3 --> Parser
A4 --> Parser
A5 --> Parser
A6 --> Parser
Parser --> Dedup
Dedup --> Results
SSE -.-> Progress
```

```mermaid
sequenceDiagram
participant U as User
participant FE as Frontend
participant API as API Route
participant M as Mino Agents
U->>FE: Enter requirements
FE->>API: POST /api/compare-cards
API->>M: Launch 6 parallel agents
M-->>API: Stream site_step events
API-->>FE: Forward SSE updates
FE-->>U: Update progress UI
M-->>API: site_complete with cards
API->>API: Deduplicate and merge
API-->>FE: Final results
FE-->>U: Display cards
```

```mermaid
stateDiagram-v2
[*] --> site_start
site_start --> site_step
site_step --> site_step
site_step --> site_complete
site_step --> site_error
site_complete --> [*]
site_error --> [*]
```

```mermaid
classDiagram
class CreditCard {
+string name
+string issuer
+string annualFee
+string rewards
+string signUpBonus
+string apr
+string[] highlights
+string source
}
class SiteStatus {
+string name
+string status
+string[] steps
+string error
}
```


Loading