A modern, real-time expense splitting app built with Next.js and Firebase.
Split bills with friends effortlessly! Track expenses, manage groups, and settle up with ease.
- π Real-time Updates - See changes instantly across all devices
- π₯ Group Management - Create and manage expense groups
- πΈ Bill Splitting - Split expenses equally or by custom amounts
- π Analytics - Visualize spending patterns with charts
- π Secure Authentication - Firebase Auth with email/password
- π¨ Beautiful UI - Modern design with Tailwind CSS and Radix UI
- π± Responsive - Works perfectly on mobile and desktop
- π Dark Mode - Easy on the eyes (coming soon)
- πΎ Offline Support - Continue tracking expenses without internet
- Node.js 18+ and npm
- Firebase account (Create one here)
-
Clone the repository
git clone https://github.com/pavan6cs/SwiftSplit.git cd SwiftSplit -
Install dependencies
npm install
-
Set up Firebase
- Create a new Firebase project at Firebase Console
- Enable Authentication (Email/Password)
- Enable Firestore Database
- Copy your Firebase config
-
Configure environment variables
cp .env.example .env.local
Edit
.env.localwith your Firebase credentials:NEXT_PUBLIC_FIREBASE_API_KEY=your_api_key NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com NEXT_PUBLIC_FIREBASE_PROJECT_ID=your_project_id NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=your_project.appspot.com NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=your_sender_id NEXT_PUBLIC_FIREBASE_APP_ID=your_app_id
-
Set up Firestore Security Rules
In Firebase Console β Firestore Database β Rules, add:
rules_version = '2'; service cloud.firestore { match /databases/{database}/documents { match /users/{userId} { allow read: if request.auth != null; allow write: if request.auth.uid == userId; } match /groups/{groupId} { allow read, write: if request.auth != null && request.auth.uid in resource.data.members; } match /bills/{billId} { allow read, write: if request.auth != null; } match /activities/{activityId} { allow read: if request.auth != null && request.auth.uid in resource.data.involved; } } } -
Run the development server
npm run dev
-
Open your browser
http://localhost:9002
SwiftSplit/
βββ src/
β βββ app/ # Next.js app directory
β β βββ dashboard/ # Dashboard page
β β βββ groups/ # Group management pages
β β βββ profile/ # User profile
β β βββ page.tsx # Landing/auth page
β βββ components/ # React components
β β βββ modals/ # Dialog components
β β βββ pages/ # Page-specific components
β β βββ layout/ # Layout components
β β βββ ui/ # UI components (Radix/shadcn)
β βββ context/ # React context providers
β β βββ AuthContext.tsx # Authentication state
β βββ hooks/ # Custom React hooks
β β βββ data/ # Data fetching hooks
β β βββ calculations/ # Calculation hooks
β βββ lib/ # Utilities and helpers
β β βββ utils/ # Utility functions
β β βββ firebase.ts # Firebase configuration
β β βββ types.ts # TypeScript types
β βββ ai/ # AI features (Genkit)
βββ public/ # Static assets
βββ .env.example # Environment variables template
βββ next.config.ts # Next.js configuration
βββ tailwind.config.ts # Tailwind CSS configuration
βββ tsconfig.json # TypeScript configuration
- Framework: Next.js 15 with Turbopack
- Language: TypeScript
- Styling: Tailwind CSS
- UI Components: Radix UI + shadcn/ui
- Icons: Lucide React
- Forms: React Hook Form + Zod
- Charts: Recharts
- BaaS: Firebase
- Database: Firestore (NoSQL)
- Authentication: Firebase Auth
- Hosting: Firebase Hosting / Vercel
- Package Manager: npm
- Linting: ESLint
- Type Checking: TypeScript
- Create bills and split them among group members
- Support for equal splits or custom amounts
- Track who owes whom with real-time balance updates
- Create multiple groups for different friend circles
- Add/remove members dynamically
- View group analytics and spending patterns
###3. Smart Balances
- Automatic calculation of who owes whom
- Simplified settlement suggestions
- Direct friend-to-friend expenses
- Track all group activities
- See who added what expense
- Monitor settlements and payments
- Manage personal information
- View expense history
- Track all group memberships
This project implements several security best practices:
- β Environment variables for sensitive data
- β Firebase security rules for database access control
- β User-friendly error messages (no system info leakage)
- β Input validation with Zod
- β Password reset functionality
β οΈ See SECURITY.md for details
Important: Never commit .env.local or any files containing secrets!
- Security Audit - Security considerations
- Contributing Guide - How to contribute
- Code of Conduct - Community guidelines
- Architecture - System design
- API Documentation - Firebase integration
We welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Found a bug? Have a feature idea? Please open an issue!
Please report security vulnerabilities to pavankumar6cs@gmail.com instead of opening public issues.
# Development
npm run dev # Start development server (port 9002)
# Building
npm run build # Build for production
npm start # Start production server
# Code Quality
npm run lint # Run ESLint
npm run typecheck # Run TypeScript compiler check
# AI Features (optional)
npm run genkit:dev # Start Genkit development- Push your code to GitHub
- Import your repository in Vercel
- Add environment variables in Vercel dashboard
- Deploy!
# Install Firebase CLI
npm install -g firebase-tools
# Login to Firebase
firebase login
# Initialize hosting
firebase init hosting
# Deploy
npm run build
firebase deploy- Basic expense tracking
- Group management
- Real-time updates
- User authentication
- Analytics dashboard
- Dark mode
- Push notifications
- Export to CSV/PDF
- Multiple currencies
- Receipt scanning (AI)
- Mobile app (React Native)
This project is licensed under the MIT License - see the LICENSE file for details.
- Next.js - The React framework
- Firebase - Backend infrastructure
- shadcn/ui - Beautiful UI components
- Radix UI - Accessible primitives
- Vercel - Deployment platform
Pavan Kumar - @pavan6cs - pavankumar6cs@gmail.com
Project Link: https://github.com/pavan6cs/SwiftSplit
If you find this project useful, please consider giving it a star!
Made with β€οΈ by Pavan Kumar