A modern expense splitting application built with Next.js, Convex, and Clerk authentication. Split bills with friends, track group expenses, and settle up easily.
- Secure Authentication - Powered by Clerk (Google OAuth, Email/Password)
- 1-on-1 & Group Expenses - Split bills with individuals or groups
- Flexible Splitting - Equal, percentage, or exact amount splits
- Dashboard - View your balances and spending at a glance
- Settlements - Record payments and track who owes what
- User Search - Find and add friends easily
- Email Notifications - Powered by Resend and Inngest
- Responsive Design - Works on desktop and mobile
- Modern UI - Built with Tailwind CSS and ShadCN UI
- Frontend: Next.js 15 , React 19
- Backend: Convex (Real-time database and serverless functions)
- Authentication: Clerk
- Styling: Tailwind CSS v4
- UI Components: ShadCN UI
- Background Jobs: Inngest
- Email: Resend
- Charts: Recharts
- Icons: Lucide React
- Clone and install:
git clone https://github.com/Vedant-0102/Splitz.git
cd splitz
npm install- Set up Convex:
npx convex dev- Configure environment variables:
Create .env.local:
# Convex (auto-generated by `npx convex dev`)
CONVEX_DEPLOYMENT=dev:your-deployment
NEXT_PUBLIC_CONVEX_URL=https://your-deployment.convex.cloud
# Clerk
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_your_key
CLERK_SECRET_KEY=sk_test_your_key
NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in
NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up
CLERK_JWT_ISSUER_DOMAIN=https://your-domain.clerk.accounts.dev
# Resend (for email notifications)
RESEND_API_KEY=re_your_key
# Gemini API
GEMINI_API_KEY=your_gemini_key- Run development server:
npm run devsplitz/
├── app/
│ ├── (auth)/ # Authentication pages
│ ├── (main)/ # Main application
│ │ ├── contacts/ # Contacts & groups
│ │ ├── dashboard/ # Dashboard
│ │ ├── expenses/ # Expense management
│ │ ├── groups/ # Group details
│ │ ├── person/ # 1-on-1 expenses
│ │ └── settlements/ # Settlements
│ └── api/ # API routes
├── components/ # React components
│ └── ui/ # UI components
├── convex/ # Backend functions
│ ├── users.js
│ ├── expenses.js
│ ├── groups.js
│ ├── settlements.js
│ ├── dashboard.js
│ └── schema.js
├── hooks/ # Custom hooks
├── lib/ # Utilities
│ └── inngest/ # Background jobs
└── public/ # Static files
users.current()- Get current authenticated userusers.store(userData)- Store/update user from Clerkusers.search(query)- Search users by name or emailusers.all()- Get all users
expenses.create(expenseData)- Create new expenseexpenses.betweenUsers(userId)- Get expenses between two usersexpenses.delete(expenseId)- Delete expense
groups.get(groupId)- Get group detailsgroups.expenses(groupId)- Get group expensesgroups.create(groupData)- Create new group
settlements.create(settlementData)- Record paymentsettlements.data(entityType, entityId)- Get settlement history
dashboard.balances()- Get user balancesdashboard.totalSpent()- Get total spentdashboard.monthlySpending()- Get monthly spending datadashboard.groups()- Get user's groups
contacts.all()- Get all contactscontacts.createGroup(groupData)- Create contact group
The app tracks:
- What you owe to others (negative balance)
- What others owe you (positive balance)
- Net balance per person and group
Record when someone pays you back:
- Go to person/group page
- Click "Settle up"
- Enter amount and note
- Submit - balances update automatically
Create groups for:
- Trips and vacations
- Roommate expenses
- Events and parties
- Regular shared expenses
npm run devConvex:
npx convex deploy