Skip to content

About

Share expenses with family and friends

Resources

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

SplitWizard

A modern expense splitting and group budgeting application built with Next.js. SplitWizard makes it easy to track shared expenses, split bills, and settle debts within groups.

Features

  • Group Management: Create and manage multiple expense groups
  • Expense Tracking: Add, edit, and delete expenses with flexible splitting options
  • Smart Splitting: Split expenses equally or by custom percentages
  • Bill Splitter: Interactive bill splitting with item-level details
  • Balance Calculation: Real-time balance tracking for all group members
  • Recurring Expenses: Set up expenses that repeat daily, weekly, monthly, or yearly
  • Settlement Tracking: Mark and track when debts are settled between members
  • Multi-Currency Support: Handle expenses in different currencies
  • Authentication: Secure Google OAuth authentication via NextAuth.js
  • Share Groups: Invite members via shareable links

Tech Stack

  • Framework: Next.js 14 with App Router
  • Database: PostgreSQL with Prisma ORM
  • Authentication: NextAuth.js
  • UI Components: Radix UI + Tailwind CSS
  • Form Handling: React Hook Form + Zod validation
  • Styling: Tailwind CSS with custom components

Prerequisites

  • Node.js 20.x or higher
  • PostgreSQL database
  • Google OAuth credentials

Getting Started

  1. Clone the repository

    git clone <repository-url>
    cd splitwizard
  2. Install dependencies

    npm install
  3. Set up environment variables

    Create a .env.local file in the root directory:

    # Database
    POSTGRES_PRISMA_URL="postgresql://user:password@host:5432/dbname?pgbouncer=true&connect_timeout=15"
    POSTGRES_URL_NON_POOLING="postgresql://user:password@host:5432/dbname"
    
    # NextAuth
    NEXTAUTH_URL="http://localhost:3000"
    NEXTAUTH_SECRET="your-secret-key-here"
    
    # Google OAuth
    GOOGLE_CLIENT_ID="your-google-client-id"
    GOOGLE_CLIENT_SECRET="your-google-client-secret"
  4. Set up the database

    npx prisma migrate dev
  5. Run the development server

    npm run dev
  6. Open the app

    Navigate to http://localhost:3000

Available Scripts

  • npm run dev - Start development server
  • npm run build - Build for production
  • npm start - Start production server
  • npm run lint - Run ESLint
  • npm run apple-gen-secret - Generate Apple Sign-In secret

Project Structure

├── app/                    # Next.js app directory
│   ├── api/               # API routes
│   ├── dashboard/         # Dashboard pages
│   └── join/              # Group invitation pages
├── components/            # React components
│   ├── ui/               # Reusable UI components (Radix)
│   └── BillSplitter/     # Bill splitting feature
├── lib/                   # Utility functions
├── prisma/               # Database schema and migrations
├── actions/              # Server actions
└── public/               # Static assets

Database Schema

The application uses PostgreSQL with the following main models:

  • User: User accounts and profiles
  • Group: Expense groups
  • Expense: Individual expenses with lenders and borrowers
  • ExpenseSettlement: Debt settlement records

See prisma/schema.prisma for the complete schema.

Deployment

The application is optimized for deployment on Vercel but can be deployed to any platform that supports Next.js.

Deploy on Vercel

Deploy with Vercel

Make sure to configure the required environment variables in your deployment platform.

License

Private project - All rights reserved

About

Share expenses with family and friends

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages