An open API service indexing awesome lists of open source software.

https://github.com/edycutjong/blinksplit

โšก Snap a receipt. AI splits it. Drop a Solana Blink in the group chat. Everyone pays in one click.
https://github.com/edycutjong/blinksplit

ai bill-splitting blinks frontier gpt4o-vision hackathon nextjs solana solana-actions supabase usdc

Last synced: 1 day ago
JSON representation

โšก Snap a receipt. AI splits it. Drop a Solana Blink in the group chat. Everyone pays in one click.

Awesome Lists containing this project

README

          


BlinkSplit โšก


Snap a receipt. AI splits it. Drop a Solana Blink in the group chat. Everyone pays in one click.


BlinkSplit


[![Live Demo](https://img.shields.io/badge/๐Ÿš€_Live-Demo-06b6d4?style=for-the-badge)](https://blinksplit.edycu.dev)
[![Pitch Video](https://img.shields.io/badge/๐ŸŽฌ_Pitch-Video-ef4444?style=for-the-badge)](https://youtu.be/PToTJLDjYNM)
[![Pitch Deck](https://img.shields.io/badge/๐Ÿ“Š_Pitch-Deck-f59e0b?style=for-the-badge)](https://blinksplit.edycu.dev/pitch)
[![Built for Frontier](https://img.shields.io/badge/Colosseum-Frontier_Hackathon-8b5cf6?style=for-the-badge)](https://superteam.fun/earn/listing/100xdevs-frontier-hackathon-track)


![Next.js](https://img.shields.io/badge/Next.js_16-black?style=flat&logo=next.js)
![Solana](https://img.shields.io/badge/Solana-9945FF?style=flat&logo=solana&logoColor=white)
![Supabase](https://img.shields.io/badge/Supabase-3ECF8E?style=flat&logo=supabase&logoColor=white)
![OpenAI](https://img.shields.io/badge/GPT--4o_Vision-412991?style=flat&logo=openai&logoColor=white)
![TypeScript](https://img.shields.io/badge/TypeScript-3178C6?style=flat&logo=typescript&logoColor=white)
[![BlinkSplit CI](https://github.com/edycutjong/blinksplit/actions/workflows/ci.yml/badge.svg)](https://github.com/edycutjong/blinksplit/actions/workflows/ci.yml)

---

## ๐Ÿ“ธ See it in Action


BlinkSplit App Demo

> **Three steps, zero app downloads.** Snap โ†’ Split โ†’ Blink.

---

## ๐Ÿ’ก The Problem & Solution

Splitting a dinner bill with friends is still painful in 2026. Venmo requires everyone to have the same app. Bank transfers take days. And someone always "forgets" to pay.

**BlinkSplit** solves this by combining **AI receipt parsing** with **Solana Blinks** โ€” shareable payment links that work inside any app (X/Twitter, Telegram, Discord). Your friends click the link, sign with their Solana wallet, and you receive USDC instantly. No app downloads. No sign-ups. No IOUs.

**Key Features:**
- โšก **AI-Powered Receipt OCR** โ€” GPT-4o Vision parses line items, tax, and tips in seconds
- ๐Ÿ”— **Solana Blinks** โ€” One-click USDC payments via shareable URLs (works in X, Telegram, Discord)
- ๐Ÿ“ฑ **Zero App Required** โ€” Friends just click the link and sign with any Solana wallet (Phantom, Backpack, Solflare)
- ๐Ÿ’ฐ **Instant USDC Settlement** โ€” No holding periods, no price volatility, funds arrive instantly
- ๐Ÿ“Š **Real-Time Tracking** โ€” Live payment status dashboard powered by Supabase Realtime
- ๐Ÿงช **Demo Mode** โ€” Fully functional without API keys using built-in demo data

---

## ๐Ÿ—๏ธ Architecture & Tech Stack

| Layer | Technology |
|-------|-----------|
| **Frontend** | Next.js 16, React 19, Tailwind CSS v4 |
| **AI** | GPT-4o Vision (receipt OCR) |
| **Database** | Supabase (PostgreSQL + Realtime) |
| **Blockchain** | Solana Devnet โ€” Blinks + USDC SPL |
| **Deploy** | Vercel |

> ๐Ÿ“ **[Full architecture deep-dive โ†’](docs/ARCHITECTURE.md)** โ€” System diagram, database schema, API endpoints, and Solana integration details.

---

## ๐Ÿ† Sponsor Tracks Targeted

### Solana Actions / Blinks (Primary Integration)

BlinkSplit is a **pure Solana Actions showcase**. The entire value proposition IS the Blink:

| Integration Point | File | What it Does |
|---|---|---|
| `GET` Action endpoint | [`src/app/api/actions/pay/[paymentId]/route.ts`](src/app/api/actions/pay/%5BpaymentId%5D/route.ts) | Returns `ActionGetResponse` with dynamic icon, title, and USDC amount |
| `POST` Action endpoint | [`src/app/api/actions/pay/[paymentId]/route.ts`](src/app/api/actions/pay/%5BpaymentId%5D/route.ts) | Constructs `VersionedTransaction` with `createTransferCheckedInstruction` for USDC SPL token transfer |
| Actions manifest | [`public/actions.json`](public/actions.json) | Maps domain URLs to Action endpoints for Blink discovery |
| Blink generator | [`src/lib/blinks.ts`](src/lib/blinks.ts) | Generates unique Blink URLs for each payer in a split |

**Solana Details:**
- **Network:** Devnet (mainnet-ready code)
- **USDC Mint (Devnet):** `4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU`
- **Transaction Type:** `createTransferCheckedInstruction` (SPL token transfer)
- **Wallet Support:** Phantom, Backpack, Solflare (any Actions-compatible wallet)

---

## ๐Ÿ“ Project Structure

```
blinksplit/
โ”œโ”€โ”€ src/
โ”‚ โ”œโ”€โ”€ app/
โ”‚ โ”‚ โ”œโ”€โ”€ page.tsx # Landing page (glassmorphism hero)
โ”‚ โ”‚ โ”œโ”€โ”€ split/[id]/page.tsx # Split assignment + Blink generation
โ”‚ โ”‚ โ”œโ”€โ”€ split/[id]/blinks/page.tsx # Blink cards + payment tracker
โ”‚ โ”‚ โ”œโ”€โ”€ history/page.tsx # Split history dashboard
โ”‚ โ”‚ โ”œโ”€โ”€ api/
โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ actions/pay/[paymentId]/route.ts # โญ Solana Action endpoints
โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ splits/route.ts # Create split session
โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ splits/[id]/route.ts # Get/update split
โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ splits/[id]/generate-blinks/route.ts
โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ splits/[id]/pay/route.ts # Mark payment complete
โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ parse-receipt/route.ts # GPT-4o Vision OCR
โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ health/route.ts # Health check
โ”‚ โ”‚ โ””โ”€โ”€ layout.tsx
โ”‚ โ””โ”€โ”€ lib/
โ”‚ โ”œโ”€โ”€ blinks.ts # Blink URL generation
โ”‚ โ”œโ”€โ”€ receipt-parser.ts # Receipt parsing logic
โ”‚ โ”œโ”€โ”€ store.ts # Client-side state management
โ”‚ โ””โ”€โ”€ supabase.ts # Supabase client
โ”œโ”€โ”€ db/
โ”‚ โ””โ”€โ”€ schema.sql # Supabase schema (JSONB-based)
โ”œโ”€โ”€ public/
โ”‚ โ”œโ”€โ”€ logo.svg # Brand logo
โ”‚ โ””โ”€โ”€ actions.json # Solana Actions manifest
โ”œโ”€โ”€ .env.example # โญ Environment variable template
โ”œโ”€โ”€ package.json
โ””โ”€โ”€ README.md # You are here
```

---

## ๐Ÿš€ Run it Locally (For Judges)

### Quick Start

```bash
# 1. Clone the repo
git clone https://github.com/edycutjong/blinksplit.git
cd blinksplit

# 2. Install dependencies
npm install

# 3. Set up environment variables
cp .env.example .env.local
# Fill in your API keys (see below) โ€” or skip for demo mode!

# 4. Run the app
npm run dev
```

Open [http://localhost:3000](http://localhost:3000) and you're in!

### Environment Variables

| Variable | Required? | Where to Get |
|----------|-----------|--------------|
| `NEXT_PUBLIC_RPC_URL` | Optional | [Helius](https://helius.dev) โ€” defaults to public devnet RPC |
| `NEXT_PUBLIC_FEE_ACCOUNT` | Optional | Your Solana wallet address (Phantom/Solflare) |
| `OPENAI_API_KEY` | Optional | [OpenAI](https://platform.openai.com/api-keys) โ€” falls back to demo data |
| `NEXT_PUBLIC_SUPABASE_URL` | Optional | [Supabase](https://supabase.com/dashboard) |
| `NEXT_PUBLIC_SUPABASE_ANON_KEY` | Optional | Supabase Dashboard โ†’ Settings โ†’ API |

> **๐Ÿ’ก Note for Judges:** All API keys are **optional**! The app includes a "Try Demo Receipt" button that works with zero configuration. Click it to see the full flow with pre-loaded sample data.

### CI & Quality

```bash
# Run the full CI pipeline (lint + typecheck + 100% test coverage)
npm run ci
```

| Check | Command | Status |
|-------|---------|--------|
| ESLint | `npm run lint` | โœ… Zero warnings |
| TypeScript | `npm run typecheck` | โœ… Strict mode |
| Tests | `npm run test:coverage` | โœ… 109 tests, **100% coverage** |

---

## ๐Ÿงช Test Coverage

```
16 test files | 109 tests passed | 100% coverage across all metrics
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
File | Stmts | Branch | Funcs | Lines
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
All files | 100 | 100 | 100 | 100
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
```

---

## ๐Ÿงฐ Key Libraries

| Package | Purpose |
|---------|---------|
| `@solana/actions` | Solana Actions/Blinks SDK โ€” metadata + tx construction |
| `@solana/web3.js` | Solana RPC connection, transaction building |
| `@solana/spl-token` | USDC (SPL token) transfer instructions |
| `@supabase/supabase-js` | Database client + Realtime subscriptions |
| `framer-motion` | Glassmorphism UI animations |
| `lucide-react` | Icon library |

---

## ๐Ÿ‘ค Built By

**Edy Cu Tjong** โ€” Solo developer

- [![X](https://img.shields.io/badge/@edycutjong-000000?style=flat-square&logo=x&logoColor=white)](https://x.com/edycutjong)
- [![GitHub](https://img.shields.io/badge/@edycutjong-181717?style=flat-square&logo=github&logoColor=white)](https://github.com/edycutjong)

---

## ๐Ÿ“„ License

This project is licensed under the [MIT License](LICENSE).

---


Built with โ˜• and โšก for the Colosseum Frontier Hackathon