A modern, full-stack web application for tracking and managing your subscriptions with intelligent email notifications and comprehensive analytics.
- Real-time Overview - Monitor monthly and yearly costs at a glance
- Interactive Charts - Visualize spending patterns with Chart.js
- Monthly spending history timeline
- Subscriptions breakdown by cost
- Category distribution analysis
- Monthly vs Yearly comparison
- Smart Calculations - Automatic cost projections and totals
- Complete CRUD Operations - Create, read, update, and delete subscriptions
- Rich Metadata - Track name, cost, billing cycle, start date, and next payment
- Category System - Organize with 10+ pre-defined categories
- Entertainment, Productivity, Gaming, Music, Education, Cloud Storage, Fitness, News, Software, Other
- Status Tracking - Mark subscriptions as active, inactive, or cancelled
- Age Calculation - See how long you've been subscribed to each service
- Advanced Filtering - Filter by category and status
- Email Reminders - Get notified before payment dates
- Customizable Timing - Set reminder days (1-30 days before payment)
- Ethereal Test Mode - Test notifications without real email setup
- Production Ready - Easy integration with real SMTP services
- Responsive Design - Mobile-friendly Bootstrap interface
- Color-Coded Categories - Visual distinction for easy identification
- Status Badges - Quick visual status indicators
- Empty States - Helpful guidance when no data exists
- Error Handling - User-friendly error messages
- Loading States - Smooth loading indicators
- JWT Authentication - Secure token-based auth
- Password Hashing - BCrypt password protection
- Protected Routes - Client and server-side route protection
- Session Management - Automatic token handling
- React 18 - Modern React with Hooks
- TypeScript - Type-safe development
- React Router v6 - Client-side routing
- Bootstrap 5 - Responsive UI framework
- React Bootstrap - Bootstrap components for React
- Chart.js - Data visualization
- Axios - HTTP client with interceptors
- Node.js - JavaScript runtime
- Express.js - Web framework
- TypeScript - Type-safe backend
- SQLite - Development database
- PostgreSQL - Production database
- Sequelize ORM - Database management
- JWT - Authentication tokens
- BCrypt - Password hashing
- Nodemailer - Email service
- Node-cron - Scheduled tasks
- Node.js 16.x or higher
- npm 7.x or higher
- Git for version control
-
Clone the repository
git clone https://github.com/yourusername/tracksub.git cd tracksub -
Install Backend Dependencies
cd backend npm install -
Install Frontend Dependencies
cd ../frontend npm install -
Configure Environment Variables
Create
.envfile in thebackenddirectory:DATABASE_URL=sqlite:./database.sqlite JWT_SECRET=your_random_secret_key_here PORT=5000 NODE_ENV=development # Email Configuration (Optional for development) EMAIL_HOST=smtp.ethereal.email EMAIL_PORT=587 EMAIL_USER=your-ethereal-user EMAIL_PASS=your-ethereal-password EMAIL_FROM=noreply@tracksub.app
-
Start Development Servers
Terminal 1 - Backend
cd backend npm run devBackend runs on
http://localhost:5000Terminal 2 - Frontend
cd frontend npm startFrontend runs on
http://localhost:3000 -
Access the Application
Open your browser and navigate to
http://localhost:3000
-
Prepare Repository
git add . git commit -m "Ready for deployment" git push origin main
-
Create Render Web Service
- Go to Render Dashboard
- Click "New +" β "Web Service"
- Connect your GitHub repository
- Configure service:
- Name:
tracksub - Environment:
Node - Build Command:
bash build.sh - Start Command:
cd backend && node dist/index.js
- Name:
-
Set Environment Variables
DATABASE_URL=<your-postgres-url> JWT_SECRET=<generate-random-32-char-string> NODE_ENV=production EMAIL_HOST=<your-smtp-host> EMAIL_PORT=587 EMAIL_USER=<your-smtp-user> EMAIL_PASS=<your-smtp-password> EMAIL_FROM=noreply@yourdomain.com -
Deploy
- Click "Create Web Service"
- Wait for deployment to complete
- Access your app at the provided Render URL
The application can be deployed to any Node.js hosting platform:
- Heroku - Add Procfile:
web: cd backend && node dist/index.js - Railway - Similar configuration to Render
- DigitalOcean App Platform - Use provided buildpacks
- AWS/Azure/GCP - Deploy as containerized application
tracksub/
βββ backend/
β βββ src/
β β βββ index.ts # Express app setup
β β βββ auth.ts # Authentication routes
β β βββ subscriptions.ts # Subscription routes
β β βββ settings.ts # Settings routes
β β βββ models.ts # Database models
β β βββ emailService.ts # Email notification service
β βββ dist/ # Compiled JavaScript
β βββ package.json
βββ frontend/
β βββ src/
β β βββ api/
β β β βββ axios.ts # API client
β β βββ components/
β β β βββ NavigationBar.tsx
β β βββ pages/
β β β βββ HomePage.tsx
β β β βββ LoginPage.tsx
β β β βββ RegisterPage.tsx
β β β βββ AddSubscriptionPage.tsx
β β β βββ EditSubscriptionPage.tsx
β β β βββ SubscriptionsPage.tsx
β β β βββ SettingsPage.tsx
β β βββ categories.ts # Category definitions
β β βββ App.tsx # Root component
β βββ package.json
βββ build.sh # Production build script
βββ README.md
POST /api/auth/register- Create new user accountPOST /api/auth/login- User login
GET /api/subscriptions- Get all user subscriptionsGET /api/subscriptions/:id- Get single subscriptionPOST /api/subscriptions- Create new subscriptionPUT /api/subscriptions/:id- Update subscriptionDELETE /api/subscriptions/:id- Delete subscription
GET /api/settings- Get user settingsPUT /api/settings- Update notification preferences
POST /api/notifications/test- Send test notification email
- Visit Settings page
- Configure notification timing
- Click "Send Test Notification"
- Check console for Ethereal preview URL
Replace Ethereal credentials with real SMTP service:
- Gmail - Use App Password
- SendGrid - API integration
- AWS SES - Simple Email Service
- Mailgun - SMTP service
| Variable | Description | Required | Default |
|---|---|---|---|
DATABASE_URL |
Database connection string | Yes | sqlite:./database.sqlite |
JWT_SECRET |
Secret key for JWT tokens | Yes | - |
PORT |
Server port number | No | 5000 |
NODE_ENV |
Environment mode | No | development |
EMAIL_HOST |
SMTP server host | Yes | - |
EMAIL_PORT |
SMTP server port | Yes | 587 |
EMAIL_USER |
SMTP username | Yes | - |
EMAIL_PASS |
SMTP password | Yes | - |
EMAIL_FROM |
Sender email address | Yes | - |
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the project
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Your Name - @jankln
- React Bootstrap for UI components
- Chart.js for data visualization
- Ethereal Email for testing email functionality
- Render.com for hosting platform
Made with β€οΈ by [Jan Klein]