Skip to content

ashwin47/splitmysub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

SplitMySub

SplitMySub Dashboard

Split subscription costs effortlessly with friends, family, and colleagues

A modern Rails 8 application with Svelte frontend for managing shared subscriptions

Features β€’ Quick Start β€’ Installation β€’ Documentation


πŸš€ Overview

SplitMySub is a comprehensive subscription cost-sharing platform that eliminates the hassle of manually tracking and collecting payments for shared subscriptions. Whether you're sharing Netflix with roommates, Spotify with family, or any other subscription service, SplitMySub automates the entire process.

Built with modern technologies:

  • Backend: Ruby on Rails 8.0 with SQLite database
  • Frontend: Svelte 5 with Inertia.js for seamless SPA experience
  • Styling: Tailwind CSS with shadcn/ui components
  • Authentication: Passwordless magic link system
  • Deployment: Kamal for containerized deployment

✨ Features

🏠 Project Management

  • Create and manage subscription projects (Netflix, Spotify, etc.)
  • Set custom billing cycles and renewal dates
  • Configure payment instructions and cost splitting
  • Track project members and their payment status

πŸ‘₯ User & Invitation System

  • Magic Link Authentication - No passwords required
  • Email-based user invitations with email verification
  • Role-based access (Project Creator vs Member)
  • Seamless onboarding for new users
  • Secure invitation flow with audit logging

πŸ’³ Payment Tracking

  • Upload payment evidence (receipts, screenshots, transaction IDs)
  • Project creators can approve/reject payments
  • Complete payment history with downloadable evidence
  • Status tracking for each billing cycle

πŸ”” Smart Reminders

  • Automated email reminders before payment due dates
  • Telegram notifications via webhook-based bot integration
  • Configurable reminder timing (default: 7 days before)
  • Escalating reminder sequence (gentle β†’ follow-up β†’ final notice)
  • Customizable reminder templates

πŸ“Š Dashboard & Analytics

  • Personal dashboard showing all subscriptions
  • Payment obligations calendar view
  • Overdue payment indicators
  • Complete payment history tracking

πŸ”’ Security & Privacy

  • Secure file handling for payment evidence
  • CSRF protection and security headers
  • Rails 8 native rate limiting for sensitive endpoints
  • Admin-only access controls
  • Email verification for invitations
  • Audit logging for security events

πŸ“Έ Screenshots

Project Dashboard
Project Dashboard
Manage all your subscription projects
Create New Project
Create New Project
Set up subscription sharing
Invite System
Invite Members
Send email invitations
Project Invitations
Project Invitations
Manage project members
Payment Tracking
Payment Tracking
Upload and track payments
Project Payments
Project Payments
View payment history

πŸš€ Quick Start

Prerequisites

  • Ruby 3.4.4
  • Node.js 22.12
  • Git

1. Clone and Install

git clone https://github.com/ashwin47/splitmysub.git
cd splitmysub
bundle install
npm install

2. Database Setup

rails db:setup
rails db:seed  # Optional: creates sample data

3. Start Development Server

bin/dev

Visit http://localhost:3100 to see the application running.

πŸ›  Installation

Local Development

# 1. Clone repository
git clone https://github.com/ashwin47/splitmysub.git
cd splitmysub

# 2. Install dependencies
bundle install && npm install

# 3. Setup database
rails db:create db:migrate db:seed

# 4. Start development server
bin/dev

Docker Development

# Start with live reloading
docker-compose -f docker-compose.dev.yml up --build

Access at http://localhost:3000 (Docker) or http://localhost:3100 (traditional).

βš™οΈ Configuration

Basic Environment Setup

Create a .env file in the project root:

# Application
APP_HOST=localhost
APP_PROTOCOL=http

# Email (required for magic links)
RESEND_API_KEY=re_xxxxxxxxxxxxxxxxxxxxxxxxxx
# OR use SMTP
SMTP_USERNAME=your-email@gmail.com
SMTP_PASSWORD=your-app-password

# Admin Access
ADMIN_PASSWORD=your-admin-password

For detailed configuration including production setup, email providers, and security options, see:

πŸ“– Usage

Creating Your First Project

  1. Sign Up/Login - Use magic link authentication
  2. Create Project - Set up your subscription (Netflix, Spotify, etc.)
  3. Configure Details - Set cost, billing cycle, payment instructions
  4. Invite Members - Send email invitations to friends/family
  5. Track Payments - Members upload payment evidence
  6. Manage Renewals - Automated reminders handle the rest

For Project Creators

  • Dashboard: View all your projects and their status
  • Member Management: Invite/remove members, track payments
  • Payment Approval: Review and approve payment evidence

For Project Members

  • Payment Tracking: Upload receipts and track approval status
  • Reminder System: Receive automated payment reminders via email and Telegram
  • Multi-Project: Participate in multiple subscription projects

πŸ— Architecture

Key Technologies

  • Rails 8: Latest Rails with modern defaults and native rate limiting
  • Svelte 5: Reactive frontend framework
  • Inertia.js: SPA experience without API complexity
  • SQLite: Embedded database (zero configuration required)
  • SolidQueue: Background job processing
  • Tailwind CSS: Utility-first CSS framework
  • Kamal: Modern deployment tool

Project Structure

splitmysub/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ controllers/           # Rails controllers
β”‚   β”œβ”€β”€ frontend/             # Svelte frontend
β”‚   β”‚   β”œβ”€β”€ components/       # Reusable components
β”‚   β”‚   β”œβ”€β”€ pages/           # Inertia.js pages
β”‚   β”‚   └── lib/             # Frontend utilities
β”‚   β”œβ”€β”€ models/              # ActiveRecord models
β”‚   β”œβ”€β”€ services/            # Business logic
β”‚   └── jobs/                # Background jobs
β”œβ”€β”€ config/
β”‚   β”œβ”€β”€ deploy.yml           # Kamal deployment
β”‚   └── routes.rb            # Application routes
β”œβ”€β”€ docs/                    # Documentation
└── test/                    # Test files

For detailed architecture information, see docs/SYSTEM_ARCHITECTURE.md.

πŸ§ͺ Testing

# Run all tests
rails test

# Run specific test files
rails test test/models/user_test.rb

# Run system tests
rails test:system

For comprehensive testing scenarios and manual testing procedures, see docs/TESTING_SCENARIOS.md.

πŸš€ Deployment

Production Deployment

Quick Deploy with Kamal:

# 1. Configure server in config/deploy.yml
# 2. Set up secrets in .kamal/secrets
bin/kamal setup
bin/kamal deploy

For complete deployment instructions including:

  • Environment variables setup
  • Email configuration
  • Security configuration
  • Troubleshooting

See docs/DEPLOYMENT.md

Self-Hosting

For complete self-hosting instructions including Docker setup, manual installation, and maintenance procedures, see docs/SELF_HOSTING.md.

πŸ“š Documentation

πŸ”§ Development

Local Development Commands

# Start development server with live reloading
bin/dev

# Access Rails console
rails console

# Run database migrations
rails db:migrate

# Code quality checks
rubocop          # Linter
brakeman         # Security audit

🀝 Contributing

We welcome contributions!

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Development Setup

git clone https://github.com/ashwin47/splitmysub.git
cd splitmysub
bundle install && npm install
rails db:setup
rails test

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments


Made with ❀️ for the subscription-sharing community

Report Bug β€’ Request Feature