Stop losing money to forgotten subscriptions.
Track every subscription, analyze your spending patterns, and never miss a renewal with SubSentry β your personal subscription command center.
π Get Started β’ π Features β’ ποΈ Architecture β’ π§ Setup
SubSentry is a modern subscription management application designed to help you take control of your recurring payments. Whether you have Netflix, Spotify, Adobe, or dozens of SaaS tools, SubSentry gives you complete visibility into your subscription ecosystemβand empowers you to make smarter financial decisions.
Built for the modern user who cares about their financial freedom.
- At-a-glance overview of monthly and yearly spending
- Active subscription count with renewal status
- Expense breakdown by category with interactive pie charts
- Monthly cost analysis with bar charts powered by Recharts
- 14-day advance notifications for upcoming subscription renewals
- Urgent alerts for subscriptions renewing within 3 days
- Real-time status badges showing days remaining (Today, 3d, 7d, etc.)
- Mark all read feature for notification management
- Category-wise breakdown of subscription costs
- Monthly vs. yearly spending comparisons
- Duplicate & wasteful subscription detection
- Intelligent insights on your most expensive subscriptions
- Per-subscription cost analysis
- Add/edit/delete subscriptions with a clean modal interface
- Track billing cycles (monthly or yearly)
- Store renewal dates and never forget again
- Add notes to subscriptions (coupon codes, family sharing, etc.)
- Categorize subscriptions (Entertainment, Fitness, Productivity, Education, Shopping, Other)
- GenZ-inspired dark design with glassmorphism cards
- Always-on glow effects with color-coded indicators
- Smooth hover interactions with scale and glow animations
- Responsive mobile-first layout
- Fully dark theme across all pages
- Email-based signup & login
- Password hashing with bcryptjs
- JWT-based session management with HTTP-only cookies
- Protected API routes and authenticated database access
- Daily cron job checks for upcoming renewals
- Automatic notifications (ready for email integration)
- Never miss a payment date
- Framework: Next.js 16.1.6 (React 19.2.3)
- Styling: Tailwind CSS 4
- UI Components: Radix UI (Dialog, Select, Dropdown)
- Charts: Recharts 3.8
- Icons: Lucide React
- Forms: React Hook Form + Zod
- State Management: React Context API
- Runtime: Node.js
- API: Next.js API Routes
- Database: MongoDB Atlas
- ODM: Mongoose 9.3.0
- Authentication: JWT + HTTP-only cookies
- Password Hashing: bcryptjs
- Task Scheduling: node-cron
- Language: TypeScript
- Linting: ESLint
- Build Tool: Turbopack (Next.js)
- Testing: Jest (ready to configure)
- Node.js v18+ (or use nvm)
- npm v9+
- MongoDB Atlas account (free tier available at mongodb.com)
- Git
git clone https://github.com/yourusername/SubSentry.git
cd SubSentrynpm installCreate a .env.local file in the project root:
# Database
MONGODB_URI=mongodb+srv://<username>:<password>@<cluster-name>.mongodb.net/<database-name>?appName=Cluster0
# Authentication
JWT_SECRET=your-super-secret-jwt-key-min-32-chars-recommended
# App Configuration
NEXT_PUBLIC_APP_URL=http://localhost:3000.env.local to version control. Add it to .gitignore.
npm run devOpen http://localhost:3000 in your browser. The app auto-reloads as you make changes.
npm run build
npm start- Go to MongoDB Atlas
- Create a free cluster
- Create a database user with secure password
- Whitelist your IP address (or use
0.0.0.0/0for development) - Copy the connection string and add to
.env.local
| Variable | Description | Example |
|---|---|---|
MONGODB_URI |
MongoDB connection string | mongodb+srv://user:pass@cluster.mongodb.net/subsentry |
JWT_SECRET |
Secret key for JWT signing | 64-character random string |
NEXT_PUBLIC_APP_URL |
Public app URL | http://localhost:3000 or your domain |
- Sign Up: Create a new account with email and password
- Add Subscriptions: Click "Add Subscription" to manually add your recurring services
- Track Spending: View analytics and spending breakdowns
- Get Alerts: Receive notifications for upcoming renewals
- Optimize: Identify and cancel unused subscriptions
- Click "Add Subscription" button
- Fill in:
- Service Name (e.g., Netflix, Spotify)
- Price (amount in βΉ)
- Billing Cycle (Monthly or Yearly)
- Renewal Date (when your subscription renews)
- Category (Entertainment, Fitness, Productivity, etc.)
- Notes (optional: add coupon codes or family member names)
- Click "Save Subscription"
- Stats Cards: Monthly spend, yearly spend, active subscriptions, upcoming renewals
- Recent Subscriptions: Quick view of your latest 5 subscriptions
- Spending Charts: Visual breakdown by category and monthly costs
- Upcoming Renewals: Color-coded alerts for renewals in the next 14 days
- Quick Insights: Auto-generated insights about your spending patterns
- Summary Cards: Total monthly/yearly spending and average cost per subscription
- Spending Insights: AI-powered recommendations and patterns
- Interactive Charts: Drill down into category and monthly spending
SubSentry/
βββ src/
β βββ app/
β β βββ api/ # API routes
β β β βββ auth/ # Authentication endpoints
β β β βββ cron/ # Scheduled tasks
β β β βββ notifications/ # Notification endpoints
β β β βββ subscriptions/ # Subscription CRUD
β β βββ dashboard/ # Dashboard page
β β βββ login/ # Login page
β β βββ register/ # Registration page
β β βββ analytics/ # Analytics page
β β βββ subscriptions/ # Subscriptions page
β β βββ globals.css # Global styles & theme
β β βββ layout.tsx # Root layout
β β βββ page.tsx # Landing page
β βββ components/
β β βββ auth-provider.tsx # Auth context & hooks
β β βββ navbar.tsx # Navigation bar
β β βββ dashboard/ # Dashboard components
β β βββ subscription/ # Subscription components
β β βββ charts/ # Chart components
β β βββ ui/ # Base UI components
β βββ lib/
β β βββ auth.ts # Auth utilities
β β βββ database.ts # DB connection
β β βββ utils.ts # Helper functions
β βββ models/ # Mongoose schemas
β β βββ User.ts
β β βββ Subscription.ts
β β βββ Notification.ts
β βββ cron/
β βββ renewalChecker.ts # Daily renewal check job
βββ public/ # Static assets
βββ .env.local # Environment variables (not in git)
βββ next.config.ts # Next.js configuration
βββ tailwind.config.ts # Tailwind configuration
βββ tsconfig.json # TypeScript configuration
βββ package.json # Dependencies
| Method | Endpoint | Description |
|---|---|---|
POST |
/api/auth/register |
Create new account |
POST |
/api/auth/login |
Sign in with email & password |
POST |
/api/auth/logout |
Sign out & clear session |
GET |
/api/auth/me |
Get authenticated user profile |
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/subscriptions |
Fetch all user subscriptions |
POST |
/api/subscriptions |
Create new subscription |
PUT |
/api/subscriptions/[id] |
Update subscription |
DELETE |
/api/subscriptions/[id] |
Delete subscription |
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/notifications |
Fetch all notifications |
PUT |
/api/notifications |
Mark all as read |
| Endpoint | Schedule | Description |
|---|---|---|
/api/cron/check-renewals |
Daily @ 8:00 AM | Check for upcoming renewals & create notifications |
- Background:
#050a18(Deep navy) - Surface:
rgba(15, 23, 55, 0.6)(Glassmorphism) - Primary:
#6366f1(Indigo) - Text:
#e2e8f0(Slate-200) - Borders:
rgba(99, 102, 241, 0.15)(Soft indigo)
- glass-card: Glassmorphic container with glow effect
- neon-btn: Gradient button with shadow glow on hover
- outline-btn: Transparent button with border
- Color-coded glows: Indigo, emerald, violet, amber, cyan
npm install -g vercel
vercel- Connect your GitHub repository
- Add environment variables in Vercel dashboard
- Auto-deploys on
git push
Works with any Node.js hosting (Railway, Render, Heroku, AWS, etc.)
Error: Failed to connect to MongoDB
Solution:
- Verify connection string in
.env.local - Check IP whitelist in MongoDB Atlas
- Ensure database user has correct permissions
- Test connection with MongoDB Compass
Error: Invalid JWT token
Solution:
- Clear browser cookies
- Restart dev server
- Verify
JWT_SECRETis set and consistent
# Clear cache and reinstall
rm -rf .next node_modules
npm install
npm run devAll amounts are displayed in Indian Rupees (βΉ).
Contributions are welcome! Follow these steps:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit changes:
git commit -m 'Add amazing feature' - Push to branch:
git push origin feature/amazing-feature - Open a Pull Request
This project is licensed under the MIT License β see the LICENSE file for details.
Have questions or feedback? Reach out:
- π GitHub Issues: Open an issue on the repository
- π¬ Email: contact@subsentry.dev
- Inspired by modern SaaS design principles
- Built with β€οΈ using Next.js, React, and Tailwind CSS
- Data visualization powered by Recharts
- UI components from Radix UI
Made with π for financial freedom
β If you find this useful, please consider starring the repository!