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.
- Host: GitHub
- URL: https://github.com/edycutjong/blinksplit
- Owner: edycutjong
- License: mit
- Created: 2026-05-09T01:54:52.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2026-05-09T02:46:10.000Z (about 1 month ago)
- Last Synced: 2026-05-09T03:41:38.412Z (about 1 month ago)
- Topics: ai, bill-splitting, blinks, frontier, gpt4o-vision, hackathon, nextjs, solana, solana-actions, supabase, usdc
- Language: TypeScript
- Homepage: https://blinksplit.edycu.dev
- Size: 1.05 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Agents: AGENTS.md
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.
[](https://blinksplit.edycu.dev)
[](https://youtu.be/PToTJLDjYNM)
[](https://blinksplit.edycu.dev/pitch)
[](https://superteam.fun/earn/listing/100xdevs-frontier-hackathon-track)





[](https://github.com/edycutjong/blinksplit/actions/workflows/ci.yml)
---
## ๐ธ See it in Action
> **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
- [](https://x.com/edycutjong)
- [](https://github.com/edycutjong)
---
## ๐ License
This project is licensed under the [MIT License](LICENSE).
---
Built with โ and โก for the Colosseum Frontier Hackathon