Skip to content

Repository files navigation

SmartSplit AI

A fast, accurate, and low-friction way to split shared purchases among groups. Upload a receipt photo, let participants select their items, and automatically calculate everyone's share with tax and tip allocation.

Problem

Splitting shared purchases like groceries, household goods, or group meals is inefficient and often awkward. The traditional process involves manually typing items, calculating totals, tracking who owes what, and following up on reimbursements. SmartSplit AI eliminates this friction by automating the entire workflow.

Key Features

  • Smart Receipt Parsing - Upload a receipt photo and AI extracts items and prices automatically
  • Collaborative Selection - Each participant gets a unique SMS link to select their items
  • Automatic Calculation - Proportionally splits tax and tip based on item selections
  • SMS Notifications - Automated text messages with personalized payment amounts and Venmo links
  • No Login Required - Access via secure, unguessable tokens delivered by SMS
  • Real-time Updates - Auto-finalizes when all participants complete their selections

How It Works

  1. Upload Receipt - Organizer uploads a receipt photo at the home page
  2. Review & Edit - AI extracts items into an editable table
  3. Invite Participants - Send SMS invites to all participants (including yourself)
  4. Select Items - Each participant clicks their link and selects items they're splitting
  5. Auto Calculate - When everyone finishes, the system calculates totals with tax/tip allocation
  6. Receive Payment Info - Everyone gets an SMS with their amount and the organizer's Venmo handle

Tech Stack

  • Frontend: Next.js 16 (App Router), React 19, TailwindCSS 4
  • Backend: Next.js API Routes (Route Handlers)
  • Database: Supabase (PostgreSQL)
  • AI/OCR: OpenAI API for receipt parsing
  • SMS: Twilio for notifications
  • Language: TypeScript with Zod validation

Getting Started

Prerequisites

  • Node.js 20+
  • npm, yarn, pnpm, or bun
  • Supabase account and project
  • Twilio account (for SMS)
  • OpenAI API key (for receipt parsing)

Environment Setup

Create a .env file in the project root with the following variables:

# Supabase Configuration
NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key

# Twilio Configuration
TWILIO_ACCOUNT_SID=your_twilio_account_sid
TWILIO_AUTH_TOKEN=your_twilio_auth_token
TWILIO_PHONE_NUMBER=your_twilio_phone_number

# OpenAI Configuration
OPENAI_API_KEY=your_openai_api_key

# Application URL (for generating links in SMS)
NEXT_PUBLIC_APP_URL=http://localhost:3000

Installation

  1. Clone the repository
git clone https://github.com/xndxcsd/smart_split.git
cd smart_split
  1. Install dependencies
npm install
# or
yarn install
# or
pnpm install
  1. Set up your Supabase database using the schema in /supabase

  2. Run the development server

npm run dev
# or
yarn dev
# or
pnpm dev
  1. Open http://localhost:3000 in your browser

Project Structure

smart_split/
├── app/                      # Next.js App Router
│   ├── page.tsx             # Home page - receipt upload
│   ├── api/                 # API routes
│   └── split/               # Split session pages
│       └── [slug]/
│           ├── organizer/   # Organizer dashboard
│           ├── p/           # Participant selection pages
│           │   └── [participantToken]/
│           └── result/      # Final calculation results
├── components/              # React components
│   ├── create-split-form.tsx
│   ├── organizer-items-editor.tsx
│   ├── organizer-split-settings.tsx
│   ├── organizer-actions.tsx
│   ├── participant-selection.tsx
│   └── resend-manage-link.tsx
├── lib/                     # Utilities and services
├── supabase/               # Database schema and migrations
└── public/                 # Static assets

Database Schema

  • split_sessions - Main session metadata (slug, organizer info, status)
  • receipts - Receipt images and parsed data
  • items - Individual line items from receipts
  • participants - People involved in the split
  • selections - Many-to-many relationship between participants and items

API Endpoints

  • POST /api/upload - Upload and parse receipt
  • GET/PATCH /api/split/[slug] - Manage split session
  • POST /api/split/[slug]/items - Add/edit items
  • POST /api/split/[slug]/participants - Manage participants
  • POST /api/split/[slug]/send-invites - Send SMS invites
  • POST /api/split/[slug]/select - Submit participant selections
  • GET /api/split/[slug]/result - Get final calculations

Development Status

This is an MVP prototype demonstrating the core SmartSplit AI workflow. Current limitations:

  • OCR accuracy varies with receipt formatting
  • No user authentication or history
  • Manual Venmo payment (no API integration)
  • Local file storage in development

Success Metrics (Goals)

  • Reduce receipt splitting time from ~15 minutes to under 3 minutes
  • 75%+ of participants pay within 24 hours
  • 80%+ of receipts parsed without manual correction

Resources

Contributing

This project was developed as a proof-of-concept demo. For questions or collaboration inquiries, please refer to the repository.

License

Private - educational/demonstration purposes only.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages