Settle is a modern expense-sharing application designed for friends, roommates, travel groups, and anyone who needs to split costs effortlessly. Whether you're organizing a group trip, sharing household expenses, or splitting dinner bills, Settle makes it simple to track who owes what and settle debts transparently.
- ๐ฅ Group Management - Create and manage expense groups for any occasion
- ๐ฑ Smart Receipt Scanning - AI-powered OCR extracts expense details automatically
- ๐งฎ Flexible Splitting - Equal splits, percentages, or custom amounts
- ๐ Secure & Private - End-to-end encryption and privacy-first design
- ๐ฑ Mobile Optimized - Responsive design that works on all devices
- โก Instant Settlements - Clear dashboard shows debts and settlements
- ๐ง Group Invitations - Email-based invitation system
- ๐จ Beautiful UI - Modern design with smooth animations
- Next.js 15.4.1 - React framework with App Router
- React 19.1.0 - Latest React with concurrent features
- TypeScript 5.0 - Type-safe JavaScript
- Tailwind CSS 4.0 - Utility-first CSS framework
- GSAP 3.13.0 - Professional animation library
- Radix UI - Headless UI components
- Lucide React - Beautiful SVG icons
- Next Themes - Dark/light mode support
- Prisma 6.12.0 - Modern database toolkit
- PostgreSQL - Robust relational database
- NextAuth.js 4.24.7 - Authentication solution
- Prisma Accelerate - Database connection pooling
- Google Gemini AI - Receipt text analysis
- Tesseract.js - Client-side OCR processing
- Node Tesseract OCR - Server-side OCR fallback
- Nodemailer 6.10.1 - Email delivery
- React Email - Email template framework
- bcrypt/bcryptjs - Password hashing
- Zod 4.0.5 - Schema validation
- NextAuth Prisma Adapter - Secure session management
- ESLint 9 - Code linting
- Prettier - Code formatting
- tsx 4.20.3 - TypeScript execution
- Turbopack - Fast bundler (development)
- shadcn/ui - Re-usable component library
- Class Variance Authority - Styling utilities
- clsx & tailwind-merge - Conditional styling
- React Fast Marquee - Marquee animations
- Recharts - Chart components
- Sonner - Toast notifications
- Node.js 18+
- npm/yarn/pnpm/bun
- PostgreSQL database
- Google Gemini API key (for AI features)
git clone https://github.com/Namann-14/settle.git
cd settle
npm install
# or
yarn install
# or
pnpm install
# or
bun install
Copy the example environment file and configure your settings:
cp .env.example .env
Fill in your environment variables (see Environment Variables section below).
# Generate Prisma client
npx prisma generate
# Run database migrations
npx prisma migrate dev
# (Optional) Seed the database
npx prisma db seed
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
Open http://localhost:3000 to see your application.
Create a .env
file in the root directory with the following variables:
DATABASE_URL="postgresql://username:password@localhost:5432/settle"
DIRECT_URL="postgresql://username:password@localhost:5432/settle"
NEXTAUTH_SECRET="your-nextauth-secret-here"
NEXTAUTH_URL="http://localhost:3000"
# Google OAuth (optional)
GOOGLE_CLIENT_ID="your-google-client-id"
GOOGLE_CLIENT_SECRET="your-google-client-secret"
EMAIL_PROVIDER="gmail"
EMAIL_USER="your-email@gmail.com"
EMAIL_PASSWORD="your-app-password"
EMAIL_FROM="Settle <your-email@gmail.com>"
# Alternative SMTP settings
SMTP_HOST="smtp.gmail.com"
SMTP_PORT="587"
GEMINI_API_KEY="your-gemini-api-key"
See our detailed setup guides:
- Real OCR Processing: Uses Tesseract.js for client-side text extraction
- AI Analysis: Google Gemini analyzes extracted text for intelligent data extraction
- Automatic Detection: Finds total amounts, merchant names, dates, and individual items
- Privacy-First: OCR happens in your browser, images aren't stored on servers
- Create expense groups for any occasion
- Invite members via email with secure tokens
- Role-based permissions (creator vs. member)
- Real-time debt calculations and settlements
- Equal Split: Divide expenses evenly among participants
- Percentage Split: Custom percentage allocation
- Unequal Split: Specific amounts for each person
- Complex Scenarios: Handle tips, taxes, and partial participation
- Password hashing with bcrypt
- Secure session management with NextAuth.js
- Database-level security with Prisma
- Email verification for invitations
- No sensitive data stored unnecessarily
Our database uses PostgreSQL with Prisma ORM:
- Users - User accounts with authentication
- Groups - Expense sharing groups
- Expenses - Individual transactions
- ExpenseSplits - How expenses are divided
- Settlements - Debt clearance records
- GroupInvitations - Email-based group invites
POST /api/auth/signup
- User registrationPOST /api/auth/signin
- User loginGET /api/auth/session
- Get current session
GET /api/groups
- List user's groupsPOST /api/groups
- Create new groupPOST /api/groups/[id]/invites
- Send group invitationGET /api/groups/invites/verify
- Verify invitation token
GET /api/expenses
- List expensesPOST /api/expenses
- Create new expensePUT /api/expenses/[id]
- Update expenseDELETE /api/expenses/[id]
- Delete expense
POST /api/receipts/process
- Process receipt imagePOST /api/receipts/analyze-text
- Analyze extracted text
GET /api/settlements
- List settlementsPOST /api/settlements
- Create settlement
# Start development server with Turbopack
npm run dev
# Build for production
npm run build
# Start production server
npm run start
# Lint code
npm run lint
# Email template development
npm run email
# Test email configuration
npm run test:email
# Database operations
npx prisma studio # Database GUI
npx prisma generate # Generate client
npx prisma migrate dev # Run migrations
npx prisma migrate reset # Reset database
- Connect your GitHub repository to Vercel
- Configure environment variables in Vercel dashboard
- Deploy automatically on every push to main branch
# Build the application
npm run build
# Start production server
npm run start
- Set up PostgreSQL database (e.g., Supabase, PlanetScale)
- Configure email service (Gmail, SendGrid, etc.)
- Set up Google Gemini API for AI features
- Update NEXTAUTH_URL to your domain
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Next.js - The React framework for production
- Prisma - Next-generation ORM for TypeScript
- Tailwind CSS - Utility-first CSS framework
- Radix UI - Low-level UI primitives
- shadcn/ui - Re-usable components
- Google Gemini - AI-powered text analysis
- Tesseract.js - OCR library
- ๐ง Email: support@settle.app
- ๐ Issues: GitHub Issues
- ๐ Documentation: Project Wiki
Made with โค๏ธ
Splitting expenses made simple