简体中文 | English | 🚀 Quick Start
A modern web application to help you manage and track all your subscription services in one place.
👉 New to SubTrack? Check out our Quick Start Guide for step-by-step deployment instructions!
- 📊 Subscription Management: Add, edit, and delete subscriptions with detailed information
- 💰 Cost Tracking: Automatic calculation of monthly/yearly spending
- 🔔 Smart Reminders: Multi-channel renewal reminders (Email/DingTalk/Feishu)
- 📈 Statistics: Spending trends and category analytics
- 🌍 Multi-language: Support Chinese and English
- 🎨 Icon Support: Automatically fetch subscription service icons
- 👥 Admin System: User management, registration control, and system settings
- ✅ Email notifications (Resend)
- ✅ DingTalk group bot
- ✅ Feishu/Lark group bot
- ✅ Can be used in combination
- ✅ Group by urgency
- ✅ Custom remind days before
- 🔄 Multiple billing cycles (Monthly/Quarterly/Semi-annually/Annually/Custom)
- 💱 Multi-currency support (CNY/USD/EUR/GBP)
- 🏷️ Category management
- 🔗 Website links
- 📝 Notes
- ✅/❌ Active/Cancelled status
- Node.js 18+
- PostgreSQL 14+
- npm or pnpm
- Clone the repository
git clone https://github.com/yourusername/SubTrack.git
cd SubTrack- Install dependencies
npm install- Configure environment variables
cp .env.example .envEdit .env file:
# Database
DATABASE_URL="postgresql://user:password@localhost:5432/subscriptions"
POSTGRES_PASSWORD="your-secure-password"
# JWT Secret
JWT_SECRET="your-super-secret-jwt-key"
# App URL
NEXT_PUBLIC_APP_URL="http://localhost:3000"
# Default Admin Account
DEFAULT_ADMIN_EMAIL="admin@example.com"
DEFAULT_ADMIN_PASSWORD="admin123456"
DEFAULT_ADMIN_NAME="System Administrator"
# Email Reminder (Optional)
RESEND_API_KEY="re_xxxxxxxxxxxx"
EMAIL_FROM="SubTrack <noreply@yourdomain.com>"
# DingTalk Notification (Optional)
DINGTALK_WEBHOOK="https://oapi.dingtalk.com/robot/send?access_token=xxx"
DINGTALK_SECRET="SECxxxxxxxxx"
# Feishu Notification (Optional)
FEISHU_WEBHOOK="https://open.feishu.cn/open-apis/bot/v2/hook/xxx"
FEISHU_SECRET="xxxxxxxxx"
# Webhook Secret
WEBHOOK_SECRET="random-string-here"- Initialize database
npx prisma migrate dev- Start development server
npm run dev- Open application
http://localhost:3000
- Admin System Guide - User management and system settings
- Framework: Next.js 14 (App Router)
- Language: TypeScript
- Styling: TailwindCSS
- State Management: Zustand
- Date Handling: Day.js
- Charts: Recharts
- Form Validation: Zod
- Runtime: Node.js
- Framework: Next.js API Routes
- Database: PostgreSQL
- ORM: Prisma
- Authentication: JWT + bcrypt
- Email: Resend
- Instant Messaging: DingTalk/Feishu Webhook
- Cron Jobs: cron-job.org
SubTrack/
├── app/ # Next.js App Router
│ ├── (auth)/ # Auth pages
│ ├── (dashboard)/ # Dashboard pages
│ └── api/ # API routes
├── components/ # React components
│ ├── layout/ # Layout components
│ ├── subscription/ # Subscription components
│ └── ui/ # Base UI components
├── lib/ # Utilities
│ ├── auth/ # Auth utilities
│ ├── email/ # Email services
│ ├── notification/ # Notification services
│ ├── i18n/ # Internationalization
│ └── store/ # State management
├── prisma/ # Database config
│ └── schema.prisma # Data models
└── public/ # Static assets
- Beautiful HTML template
- Grouped by urgency
- Clickable links
- Markdown format
- Support @mentions
- Group sharing
- Interactive card
- With buttons
- Better visual design
All channels can be used individually or in combination!
Supported languages:
- 🇨🇳 Simplified Chinese
- 🇺🇸 English
How to switch:
- Language toggle button in top navigation
- Auto-save user preference
The easiest way to deploy SubTrack is using Docker with pre-built images from GitHub Container Registry.
# 1. Clone the repository
git clone https://github.com/davaded/SubTrack.git
cd SubTrack
# 2. Configure environment variables
cp .env.example .env
# Edit .env with your settings
# 3. Deploy with Docker Compose (using pre-built images)
docker-compose -f docker-compose.prod.yml pull
docker-compose -f docker-compose.prod.yml up -dNote: This uses pre-built images from GitHub Container Registry (ghcr.io/davaded/subtrack:latest).
# Pull the latest image
docker pull ghcr.io/davaded/subtrack:latest
# Or pull a specific version
docker pull ghcr.io/davaded/subtrack:v1.0.0📖 Detailed Guide: See GITHUB_DEPLOY.md for complete Docker deployment instructions.
- Fork this project
- Import to Vercel
- Configure environment variables
- Deploy
- Build project
npm run build- Start production server
npm start- Use PM2 for process management
pm2 start npm --name "subtrack" -- start📖 More Options: See BUILD_DEPLOY.md for all deployment methods.
Contributions are welcome! Please follow these steps:
- Fork this project
- Create feature branch (
git checkout -b feature/AmazingFeature) - Commit changes (
git commit -m 'Add some AmazingFeature') - Push to branch (
git push origin feature/AmazingFeature) - Open Pull Request
This project is licensed under the MIT License - see LICENSE file for details
- Bug Reports: GitHub Issues
- Feature Requests: GitHub Discussions
- Next.js - React Framework
- Prisma - ORM
- Resend - Email Service
- TailwindCSS - CSS Framework
- Zustand - State Management
If this project helps you, please give it a Star ⭐
Made with ❤️ by SubTrack Team
-
Admin Login
- After first deployment, a default admin account is automatically created
- Login with the credentials from your
.envfile (DEFAULT_ADMIN_EMAIL / DEFAULT_ADMIN_PASSWORD) - Important: Change the default password immediately after first login!
-
Configure System Settings (Admin Only)
- Navigate to
/admin/settings - Choose registration mode:
- Open: Anyone can register
- Approval: New users need admin approval
- Closed: Registration disabled
- Set site name and user limits
- Navigate to
-
Create User Account (or approve registrations)
- If registration is open, users can register at
/register - If approval mode, admin can approve users at
/admin/users
- If registration is open, users can register at
-
Add Your First Subscription
- Click "Add Subscription" on the dashboard
- Fill in the subscription details:
- Name (e.g., "Netflix")
- Amount and currency
- Billing cycle (monthly, quarterly, etc.)
- First billing date
- Category (optional)
- Reminder settings
-
View Your Dashboard
- See overview of monthly and yearly costs
- View upcoming renewals
- Track active subscriptions
Add a Subscription: Click "Add Subscription" button → Fill form → Save
Edit a Subscription: Click subscription card → "Edit" button → Update details → Save
Delete a Subscription: Click subscription card → "Delete" button → Confirm
Search & Filter: Use the search bar and category filter on the subscriptions page
- Monthly: Renews every month
- Quarterly: Renews every 3 months
- Semi-Annually: Renews every 6 months
- Annually: Renews every year
- Custom: Set your own cycle in days
The system automatically calculates the next billing date based on your first billing date and chosen cycle.
SubTrack/
├── app/ # Next.js app directory
│ ├── (dashboard)/ # Protected dashboard routes
│ │ ├── page.tsx # Dashboard home
│ │ └── subscriptions/ # Subscription pages
│ ├── api/ # API routes
│ │ ├── auth/ # Authentication endpoints
│ │ └── subscriptions/ # Subscription endpoints
│ ├── login/ # Login page
│ ├── register/ # Registration page
│ ├── globals.css # Global styles
│ └── layout.tsx # Root layout
├── components/ # React components
│ ├── layout/ # Layout components
│ ├── subscription/ # Subscription components
│ └── ui/ # UI components
├── hooks/ # Custom React hooks
├── lib/ # Utility libraries
│ ├── auth.ts # Authentication utilities
│ ├── date-utils.ts # Date calculation utilities
│ ├── prisma.ts # Prisma client
│ └── validations.ts # Zod schemas
├── prisma/ # Database schema
│ └── schema.prisma
├── store/ # Zustand stores
└── public/ # Static files
POST /api/auth/register- Register a new userPOST /api/auth/login- Login userPOST /api/auth/logout- Logout userGET /api/auth/me- Get current user
GET /api/subscriptions- List all subscriptions (with filters)POST /api/subscriptions- Create a new subscriptionGET /api/subscriptions/[id]- Get subscription detailsPUT /api/subscriptions/[id]- Update subscriptionDELETE /api/subscriptions/[id]- Delete subscriptionGET /api/subscriptions/stats- Get statisticsGET /api/subscriptions/upcoming- Get upcoming renewals
-
Push your code to GitHub
-
Deploy to Vercel
-
Add Environment Variables in Vercel dashboard:
DATABASE_URLJWT_SECRETNEXT_PUBLIC_APP_URL
-
Choose Database:
- Vercel Postgres (paid, integrated)
- Supabase (free tier available)
See the Deployment Guide for detailed instructions on self-hosting with:
- Ubuntu server
- PostgreSQL
- Nginx
- PM2
The application uses a warm, friendly color palette:
- Background:
#fffffe - Headline:
#33272a - Sub-headline:
#594a4e - Card Background:
#faeee7 - Highlight:
#ff8ba7(Pink) - Secondary:
#ffc6c7(Light Pink) - Tertiary:
#c3f0ca(Green)
- Core: id, email (unique), password (hashed), name, defaultCurrency
- Admin System: role (user/admin), status (pending/active/suspended)
- Approval: approvedBy, approvedAt
- Security: mustChangePassword, lastLoginAt
- Timestamps: createdAt, updatedAt
- Core: id, userId (FK), name, amount, currency
- Billing: billingCycle, customCycleDays, firstBillingDate, nextBillingDate
- Details: category, websiteUrl, logoUrl, notes
- Reminder: remindDaysBefore, isActive
- Timestamps: createdAt, updatedAt
- Config: registrationMode (open/approval/closed), siteName, maxUsersLimit
- Timestamps: createdAt, updatedAt
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License - feel free to use this project for personal or commercial purposes.
If you encounter any issues or have questions:
- Check the documentation
- Search existing issues
- Create a new issue with detailed information
Future features planned:
- Email notifications for renewals
- Data export (CSV/PDF)
- Data import from CSV
- Calendar view
- Spending trends and analytics
- Multi-language support
- Mobile app (React Native)
- Shared subscriptions for families
Built with ❤️ using Next.js, TypeScript, and PostgreSQL