A comprehensive subscription management platform built with Next.js 14, featuring real-time tracking, team collaboration, and advanced analytics. NotifSubs helps you monitor, organize, and optimize your recurring subscriptions while providing powerful insights into your spending patterns.
- Track Unlimited Subscriptions - Monitor all your recurring payments in one place
- Smart Categorization - Organize subscriptions with custom tags and categories
- Payment Method Management - Link multiple payment methods and track usage
- Renewal Reminders - Never miss a payment with customizable notifications
- Subscription Status Tracking - Monitor active, paused, or cancelled subscriptions
- Spending Analytics - Visualize your subscription costs with interactive charts
- Cost Trends - Track spending patterns over time
- Category Breakdown - Analyze spending by subscription type
- Upcoming Renewals - Get alerts for payments due soon
- Revenue Analytics - For businesses, track subscription revenue
- Team Management - Create and manage teams for collaborative tracking
- Role-Based Access - Admin, member, and viewer roles
- Shared Subscriptions - Track team-wide subscriptions
- Team Analytics - Collaborative insights and reporting
- Email Notifications - Configurable email alerts for renewals
- Push Notifications - Real-time updates and reminders
- Custom Reminder Periods - Set reminder timing (e.g., 3 days before renewal)
- Notification Preferences - Granular control over notification types
- Multi-Provider Auth - Google, GitHub, and email/password authentication
- Two-Factor Authentication - Enhanced security with 2FA support
- Role-Based Access Control - Admin and user roles with appropriate permissions
- Secure Data Handling - Encrypted passwords and secure session management
- User Management - Admin dashboard for user oversight
- Subscription Analytics - Platform-wide subscription insights
- Revenue Tracking - Monitor platform revenue and user growth
- System Notifications - Manage platform-wide announcements
- Next.js 14 - React framework with App Router
- TypeScript - Type-safe development
- Tailwind CSS - Utility-first CSS framework
- Radix UI - Accessible component primitives
- Lucide React - Beautiful icon library
- Recharts - Data visualization library
- Next.js API Routes - Server-side API endpoints
- Prisma - Type-safe database ORM
- PostgreSQL - Primary database
- NextAuth.js - Authentication solution
- Zod - Schema validation
- Paddle - Payment processing and subscription management
- MailerSend - Email delivery service
- Vercel Blob - File storage
- Upstash Redis - Rate limiting and caching
Before you begin, ensure you have the following installed:
- Node.js 18.0 or later
- pnpm (recommended) or npm
- PostgreSQL database
- Git
git clone https://github.com/srddevj/subscriptions-management-system.git
cd subscriptions-management-systempnpm install
# or
npm installCreate a .env.local file in the root directory:
# Database
DATABASE_URL="postgresql://username:password@localhost:5432/notifsubs"
# NextAuth.js
NEXTAUTH_URL="http://localhost:3000"
NEXTAUTH_SECRET="your-secret-key-here"
# OAuth Providers
GOOGLE_CLIENT_ID="your-google-client-id"
GOOGLE_CLIENT_SECRET="your-google-client-secret"
GITHUB_CLIENT_ID="your-github-client-id"
GITHUB_CLIENT_SECRET="your-github-client-secret"
# Email Service
MAILERSEND_API_KEY="your-mailersend-api-key"
MAILERSEND_FROM_EMAIL="noreply@yourdomain.com"
# Payment Processing
PADDLE_API_KEY="your-paddle-api-key"
PADDLE_ENVIRONMENT="sandbox" # or "production"
# File Storage
BLOB_READ_WRITE_TOKEN="your-vercel-blob-token"
# Rate Limiting
UPSTASH_REDIS_REST_URL="your-upstash-redis-url"
UPSTASH_REDIS_REST_TOKEN="your-upstash-redis-token"# Generate Prisma client
pnpm prisma generate
# Run database migrations
pnpm prisma db push
# (Optional) Seed the database
pnpm prisma db seedpnpm dev
# or
npm run devOpen http://localhost:3000 in your browser.
subscriptions-management-system/
βββ app/ # Next.js App Router
β βββ (admin)/ # Admin dashboard routes
β βββ (dashboard)/ # User dashboard routes
β βββ api/ # API routes
β βββ globals.css # Global styles
βββ components/ # Reusable components
β βββ admin/ # Admin-specific components
β βββ auth/ # Authentication components
β βββ dashboard/ # Dashboard components
β βββ landing/ # Landing page components
β βββ settings/ # Settings components
β βββ teams/ # Team management components
β βββ ui/ # UI component library
βββ lib/ # Utility libraries
β βββ auth.ts # Authentication configuration
β βββ db.ts # Database connection
β βββ email/ # Email templates and utilities
β βββ notifications/ # Notification system
β βββ subscription/ # Subscription management
β βββ utils.ts # General utilities
βββ prisma/ # Database schema and migrations
β βββ migrations/ # Database migrations
β βββ schema.prisma # Database schema
βββ public/ # Static assets
βββ types/ # TypeScript type definitions
The application uses PostgreSQL with the following key models:
- User - User accounts with authentication and preferences
- Subscription - User subscriptions with pricing and cycle information
- PaymentMethod - User payment methods (cards, bank accounts)
- Tag - Subscription categorization system
- Team - Team management for enterprise features
- Notification - User notifications and alerts
- Account/Session - NextAuth.js authentication
- CustomerSubscription - Paddle integration
- SubscriptionStatus - Payment status tracking
- AdminNotification - Admin system notifications
- Go to Google Cloud Console
- Create a new project or select existing
- Enable Google+ API
- Create OAuth 2.0 credentials
- Add authorized redirect URIs:
http://localhost:3000/api/auth/callback/google(development)https://yourdomain.com/api/auth/callback/google(production)
- Go to GitHub Settings β Developer settings β OAuth Apps
- Create a new OAuth App
- Set authorization callback URL:
http://localhost:3000/api/auth/callback/github(development)https://yourdomain.com/api/auth/callback/github(production)
- Sign up at MailerSend
- Create an API token
- Set up your domain for sending
- Configure the
MAILERSEND_FROM_EMAILwith your verified domain
- Sign up at Paddle
- Create API keys (sandbox and production)
- Set up webhook endpoints for subscription events
- Configure products and pricing plans
-
Connect Repository
# Install Vercel CLI npm i -g vercel # Deploy vercel
-
Environment Variables
- Add all environment variables in Vercel dashboard
- Set
NEXTAUTH_URLto your production domain - Configure database connection string
-
Database
- Use Vercel Postgres or external PostgreSQL service
- Run migrations:
vercel env pull .env.local && pnpm prisma db push
FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
COPY . .
RUN npm run build
EXPOSE 3000
CMD ["npm", "start"]- Set
NODE_ENV=production - Configure production database
- Set up SSL certificates
- Configure CDN for static assets
- Set up monitoring and logging
- Configure backup strategies
POST /api/auth/register- User registrationPOST /api/auth/session-refresh- Refresh user session
GET /api/subscriptions- Get user subscriptionsPOST /api/subscriptions- Create new subscriptionPATCH /api/subscriptions/[id]- Update subscriptionDELETE /api/subscriptions/[id]- Delete subscription
GET /api/teams- Get user teamsPOST /api/teams- Create new teamPATCH /api/teams/[id]- Update teamDELETE /api/teams/[id]- Delete team
GET /api/admin/stats- Platform statisticsGET /api/admin/users- User managementGET /api/admin/subscriptions- All subscriptions
# Run tests
pnpm test
# Run tests in watch mode
pnpm test:watch
# Run tests with coverage
pnpm test --coverage- Indexed queries for subscription lookups
- Efficient pagination for large datasets
- Optimized Prisma queries with selective fields
- Next.js Image optimization
- Dynamic imports for code splitting
- SWR for efficient data fetching
- Optimized bundle size
- Redis for rate limiting
- Browser caching for static assets
- Database query caching
- Encrypted password storage with bcrypt
- Secure session management
- CSRF protection
- Rate limiting on sensitive endpoints
- JWT token-based authentication
- Secure cookie configuration
- OAuth 2.0 integration
- Two-factor authentication support
- Input validation with Zod
- SQL injection prevention with Prisma
- XSS protection
- CORS configuration
We welcome contributions! Please follow these steps:
- Fork the repository
- Create a feature branch
git checkout -b feature/amazing-feature
- Commit your changes
git commit -m 'Add amazing feature' - Push to the branch
git push origin feature/amazing-feature
- Open a Pull Request
- Follow TypeScript best practices
- Write tests for new features
- Update documentation
- Follow the existing code style
- Ensure all tests pass
This project is licensed under the MIT License - see the LICENSE file for details.
- Documentation - Check this README and inline code comments
- Issues - Open an issue on GitHub
- Discussions - Use GitHub Discussions for questions
# Check database connection
pnpm prisma db push
# Reset database
pnpm prisma db push --force-reset- Verify OAuth provider configuration
- Check environment variables
- Ensure callback URLs are correct
- Verify MailerSend configuration
- Check API key permissions
- Test with sandbox environment
- Mobile app (React Native)
- Advanced reporting and analytics
- Subscription price tracking
- Integration with more payment providers
- Advanced team collaboration features
- API for third-party integrations
- v1.0.0 - Initial release with core subscription management
- v1.1.0 - Added team collaboration features
- v1.2.0 - Enhanced analytics and reporting
- v1.3.0 - Mobile responsiveness improvements
- Next.js Team - For the amazing React framework
- Prisma Team - For the excellent database ORM
- Vercel - For seamless deployment platform
- Radix UI - For accessible component primitives
- Tailwind CSS - For utility-first CSS framework
Built with β€οΈ by [Your Name]
For more information, visit our website or contact us at email@example.com.
