Skip to content

SN7k/Splitaa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

61 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ’ฐ Splitaa - Smart Expense Splitter

Split bills, track expenses, and settle up with friends effortlessly.

React Angular PHP License

๐ŸŽฏ Overview

Splitaa is a comprehensive expense splitting platform designed to help groups manage shared expenses efficiently. Whether it's a trip with friends, shared household bills, or group dining, Splitaa makes it simple to track who paid what and who owes whom.

Image

โœจ Key Features

  • ๐Ÿ” Secure Authentication - Email/password and Google OAuth via Clerk
  • ๐Ÿ‘ฅ Group Management - Create groups for trips, households, or events
  • ๐Ÿ’ธ Expense Tracking - Add expenses with custom splits and categories
  • ๐Ÿงฎ Smart Settlements - Optimized balance calculation and payment tracking
  • ๐Ÿ“Š Admin Dashboard - Comprehensive analytics and user management
  • ๐Ÿ“ฑ Responsive Design - Works seamlessly on desktop and mobile
  • ๐ŸŽซ QR Code Support - Generate and scan codes for quick group joining

๐Ÿ—๏ธ Architecture

The project consists of three main applications:

๐Ÿ“ฆ Splitaa
โ”œโ”€โ”€ ๐ŸŽจ Client (React + Vite)      # User-facing web application
โ”œโ”€โ”€ ๐Ÿ”ง Admin (Angular 20)         # Admin dashboard and analytics
โ””โ”€โ”€ โš™๏ธ  Server (PHP + MySQL)      # RESTful API backend

๐Ÿš€ Quick Start

Prerequisites

  • Node.js 18+ and npm
  • PHP 7.4+ with MySQL
  • Apache/XAMPP or any PHP server
  • Clerk Account (for authentication)

Installation

# 1. Clone the repository
git clone https://github.com/SN7k/Splitaa.git
cd Splitaa

# 2. Setup Backend
cd server
# Import database/schema.sql into MySQL
# Configure config/database.php with your credentials

# 3. Setup Client
cd ../client
npm install
# Create .env file with your Clerk key:
# VITE_CLERK_PUBLISHABLE_KEY=pk_test_your_key_here
# VITE_API_URL=http://localhost:8000/api

# 4. Setup Admin (Optional)
cd ../admin
npm install

Running the Application

# Terminal 1 - Start Backend
cd server/public
php -S localhost:8000

# Terminal 2 - Start Client
cd client
npm run dev
# Access at http://localhost:5173

# Terminal 3 - Start Admin (Optional)
cd admin
npm start
# Access at http://localhost:4200

๐Ÿ“š Documentation

Detailed guides available in the /doc folder:

๐Ÿ› ๏ธ Tech Stack

Frontend (Client)

  • React 18.3 - UI library
  • Vite - Build tool and dev server
  • React Router - Navigation
  • Bootstrap 5 - UI framework
  • Clerk - Authentication
  • QR Code - Generate and scan QR codes

Backend (Server)

  • PHP 7.4+ - Server-side language
  • MySQL 5.7+ - Database
  • JWT - Token-based authentication
  • RESTful API - Clean architecture with MVC pattern

Admin Dashboard

  • Angular 20 - Progressive web framework
  • TypeScript - Type-safe development
  • Bootstrap - Responsive UI components

๐Ÿ“ก API Endpoints

Authentication

  • POST /api/auth/register - Register new user
  • POST /api/auth/login - Login user
  • GET /api/auth/me - Get current user

Expenses

  • GET /api/expenses - List all expenses
  • POST /api/expenses - Create expense
  • GET /api/expenses/{id} - Get expense details
  • DELETE /api/expenses/{id} - Delete expense

Groups

  • GET /api/groups - List user groups
  • POST /api/groups - Create new group
  • POST /api/groups/{id}/add-member - Add member to group

Settlements

  • GET /api/settlements - List settlements
  • POST /api/settlements - Record payment
  • GET /api/settlements/calculate - Calculate balances

Full API documentation available in server/README.md

๐ŸŽจ Features in Detail

User Features

  • โœ… Email/password and social login
  • โœ… Add friends and manage friend list
  • โœ… Create and join expense groups
  • โœ… Track individual and group expenses
  • โœ… Split expenses equally or custom amounts
  • โœ… View balance with friends
  • โœ… Record and track settlements
  • โœ… Generate group invite QR codes

Admin Features

  • โœ… User management dashboard
  • โœ… Expense analytics and reports
  • โœ… Group activity monitoring
  • โœ… System health metrics
  • โœ… Data export capabilities

๐Ÿ”’ Security

  • JWT-based authentication with secure token handling
  • Password hashing using bcrypt
  • CORS protection
  • SQL injection prevention with prepared statements
  • Environment-based configuration
  • Secure OAuth implementation via Clerk

๐ŸŒ Deployment

Splitaa can be deployed to various platforms:

  • Client: Netlify, Vercel, or any static hosting
  • Server: Traditional hosting (cPanel), Google Cloud, or Docker
  • Database: MySQL, Aiven, or any MySQL-compatible service

Deployment guides available:

๐Ÿงช Testing

# Test backend API
curl http://localhost:8000/health

# Test authentication
# See doc/POSTMAN_TESTING_GUIDE.md for detailed API testing

๐Ÿ“ License

This project is licensed under the MIT License.

๐Ÿ‘จโ€๐Ÿ’ป Development Team

Crafted with passion by a dedicated team:

  • @SN7k - Team Lead | Full-Stack Developer (Frontend & Backend)
  • @RAHUL - Frontend Developer
  • @SAPTARSHI - Testing, Documentation & Research

๐Ÿค Contributing

Contributions, issues, and feature requests are welcome!


Made with passion for making expense splitting simple and stress-free! ๐Ÿš€

About

Split bills, track expenses, and settle up with friends effortlessly.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published