Skip to content

MuhammadTanveerAbbas/Subsight

Repository files navigation

Subsight Logo

Subsight

The open-source subscription tracker that gives you full control over your recurring spending

Live Demo License TypeScript React Next.js Supabase Tailwind CSS Groq


Subsight Dashboard

Overview

Most people have no idea how much they're spending on subscriptions every month. Subsight fixes that β€” it's a self-hosted, open-source subscription tracker with an AI-powered dashboard that gives you real-time visibility into every recurring charge. Unlike Truebill or Rocket Money, you own your data, it's free forever, and you can self-host it in minutes.


✨ Features

  • πŸš€ Real-time Dashboard β€” KPI metrics, monthly spend, active subscriptions, and upcoming renewals at a glance
  • 🧠 AI Auto-Fill β€” Type a service name and Groq AI fills in the provider, category, price, and billing cycle automatically
  • 🎭 Simulation Mode β€” Toggle subscriptions on/off to preview how cancellations affect your monthly budget before committing
  • πŸ“Š Advanced Analytics β€” Monthly spending bar charts, category donut breakdown, and annual totals with trend indicators
  • πŸ“€ Multi-Format Export β€” Export your full subscription list to JSON, CSV, or a formatted PDF report
  • πŸ”” Renewal Alerts β€” Email reminders sent 1, 3, 7, or 14 days before a subscription renews via SMTP
  • 🎯 Spending Goals β€” Set monthly or annual budget targets per category and track progress
  • 🏷️ Custom Categories β€” Create your own categories with custom colors and icons beyond the built-in set
  • πŸ” Duplicate Detection β€” Smart Levenshtein-based detection warns you before adding a subscription you already track
  • πŸ’± Multi-Currency Support β€” Track subscriptions in USD, EUR, GBP, JPY, CAD, and AUD with automatic conversion
  • πŸ”’ Supabase Auth + RLS β€” Secure authentication with Google OAuth and row-level security so your data stays yours
  • πŸŒ— Dark & Light Theme β€” Fully themed UI that persists across sessions

πŸ›  Tech Stack

Category Technology
Framework Next.js 15 (App Router + Turbopack)
Language TypeScript 5
Styling Tailwind CSS v3 + shadcn/ui (Radix UI)
Backend Supabase (Auth + PostgreSQL + RLS)
AI Groq AI (fast + quality models)
Charts Recharts
Forms React Hook Form + Zod
PDF Export jsPDF + html2canvas
Email Nodemailer (SMTP)
Payments Stripe (Pro plan billing)
Testing Vitest + Playwright
Deployment Vercel


πŸš€ Quick Start

Prerequisites

Installation

# 1. Clone the repo
git clone https://github.com/MuhammadTanveerAbbas/Subsight-Tracker.git
cd Subsight-Tracker

# 2. Install dependencies
pnpm install

# 3. Set up environment variables
cp .env.example .env.local
# Fill in your values (see Environment Variables section below)

# 4. Run the development server
pnpm dev

# 5. Open in browser
http://localhost:3000

πŸ” Environment Variables

Create a .env.local file in the root directory:

# Supabase (required)
NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key

# App URL (required for Stripe + emails)
NEXT_PUBLIC_APP_URL=https://your-app.vercel.app

# Groq AI (Pro AI features)
GROQ_API_KEY=your_groq_api_key_here

# Google OAuth (Supabase Auth)
NEXT_PUBLIC_GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret

# Stripe (Pro billing)
STRIPE_SECRET_KEY=your_stripe_secret_key
STRIPE_PRICE_ID=your_stripe_price_id
STRIPE_WEBHOOK_SECRET=your_stripe_webhook_secret

# SMTP (Pro email reminders)
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USER=your-email@gmail.com
SMTP_PASS=your-app-password
SMTP_FROM=noreply@subsight.com

# Cron security (Vercel Cron -> /api/reminders/send)
CRON_SECRET=generate-a-random-secret-here

Get your keys:


πŸ“ Project Structure

Subsight-Tracker/
β”œβ”€β”€ public/                  # Static assets (icons, manifest, sw.js)
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ app/
β”‚   β”‚   β”œβ”€β”€ (app)/           # Authenticated app routes (dashboard)
β”‚   β”‚   β”œβ”€β”€ (auth)/          # Auth UI routes (sign-in, sign-up, forgot-password)
β”‚   β”‚   β”œβ”€β”€ (marketing)/     # Public marketing routes (landing, pricing, privacy, terms)
β”‚   β”‚   β”œβ”€β”€ api/             # API routes (AI autofill, AI summary, Stripe, reminders)
β”‚   β”‚   └── auth/            # Supabase auth callback + reset-password
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ auth/            # Google sign-in button
β”‚   β”‚   β”œβ”€β”€ marketing/       # Nav + footer for marketing pages
β”‚   β”‚   └── ui/              # shadcn/ui component library
β”‚   β”œβ”€β”€ contexts/            # Auth, loading, and subscription React contexts
β”‚   β”œβ”€β”€ hooks/               # Custom hooks (use-mobile, use-toast)
β”‚   β”œβ”€β”€ lib/                 # Core utilities and service clients
β”‚   β”‚   β”œβ”€β”€ supabase/        # Supabase client + server helpers
β”‚   β”‚   β”œβ”€β”€ groq-service.ts  # AI auto-fill + spending summary
β”‚   β”‚   β”œβ”€β”€ email-service.ts # SMTP renewal reminder emails
β”‚   β”‚   β”œβ”€β”€ export.ts        # JSON / CSV / PDF export
β”‚   β”‚   β”œβ”€β”€ currency.ts      # Multi-currency conversion
β”‚   β”‚   β”œβ”€β”€ duplicates.ts    # Duplicate subscription detection
β”‚   β”‚   β”œβ”€β”€ renewal-calculator.ts # Next renewal date logic
β”‚   β”‚   β”œβ”€β”€ stripe.ts        # Stripe billing helpers
β”‚   β”‚   β”œβ”€β”€ types.ts         # Shared TypeScript types
β”‚   β”‚   └── validation.ts    # Zod schemas
β”‚   β”œβ”€β”€ types/               # Supabase database types
β”‚   └── middleware.ts        # Auth middleware (route protection)
β”œβ”€β”€ e2e/                     # Playwright end-to-end tests
β”œβ”€β”€ .env.example             # Environment variables template
β”œβ”€β”€ package.json
└── README.md

πŸ“¦ Available Scripts

Command Description
pnpm dev Start development server with Turbopack
pnpm build Type-check then build for production
pnpm start Start production server
pnpm lint Run Next.js ESLint
pnpm typecheck Run TypeScript type checking
pnpm test Run Vitest unit tests (watch mode)
pnpm test:unit Run Vitest unit tests once
pnpm test:e2e Run Playwright end-to-end tests
pnpm test:coverage Run tests with coverage report

🌐 Deployment

This project is deployed on Vercel.

Deploy Your Own

Deploy with Vercel

  1. Click the button above
  2. Connect your GitHub account
  3. Add all environment variables in the Vercel dashboard
  4. Deploy

πŸ—Ί Roadmap

  • Real-time subscription dashboard
  • AI auto-fill via Groq
  • Simulation mode
  • Multi-format export (JSON, CSV, PDF)
  • Renewal email alerts
  • Spending goals
  • Custom categories
  • Duplicate detection
  • Multi-currency support
  • Stripe Pro billing
  • Mobile app (React Native)
  • Bank auto-detection via Plaid
  • Team / shared workspace support
  • Browser extension for auto-capture

🀝 Contributing

Contributions are welcome! Feel free to:

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

πŸ“„ License

Distributed under the MIT License. See LICENSE for more information.


πŸ‘¨β€πŸ’» Built by The MVP Guy

Muhammad Tanveer Abbas SaaS Developer | Building production-ready MVPs in 14–21 days

Portfolio Twitter LinkedIn GitHub

If this project helped you, please consider giving it a ⭐

About

Modern subscription tracking app with AI-powered insights.

Topics

Resources

License

Stars

Watchers

Forks

Contributors