subtrack
Proyek dari daftar awesome-indonesia.
Proyek dari daftar awesome-indonesia.
Stay ahead of every subscription.
A subscription tracking application with Telegram notifications. Track your recurring subscriptions, get reminded before renewal dates, and never miss a payment again.
🌐 Website: subnudge.app
git clone <repository-url>
cd subnudge
cd backend
# Install dependencies
bun install
# Copy environment variables
cp .env.example .env
Edit .env with your configuration:
DATABASE_URL=postgresql://user:password@localhost:5432/subnudge
BETTER_AUTH_SECRET=your-secret-key-here
BETTER_AUTH_URL=http://localhost:3000
TELEGRAM_BOT_TOKEN=your-bot-token-from-botfather
TELEGRAM_BOT_USERNAME=SubnudgeBot
NODE_ENV=development
PORT=3000
FRONTEND_URL=http://localhost:5173
ADMIN_EMAIL=admin@example.com
Run database migrations:
bun run db:migrate
Start the backend server:
bun run dev
The backend will be running at http://localhost:3000.
Open a new terminal:
cd frontend
# Install dependencies
bun install
# Copy environment variables
cp .env.example .env
Edit .env if needed:
VITE_API_URL=http://localhost:3000
VITE_TELEGRAM_BOT_USERNAME=SubnudgeBot
Start the frontend development server:
bun run dev
The frontend will be running at http://localhost:5173.
| Command | Description |
|---|---|
bun run dev |
Start development server with hot reload |
bun run build |
Build for production |
bun run start |
Start production server |
bun run db:generate |
Generate Drizzle migrations |
bun run db:migrate |
Push migrations to database |
bun run test |
Run tests once |
bun run test:watch |
Run tests in watch mode |
bun run test:coverage |
Run tests with coverage report |
| Command | Description |
|---|---|
bun run dev |
Start Vite development server |
bun run build |
Build for production |
bun run preview |
Preview production build |
bun run lint |
Run ESLint |
bun run test |
Run tests once |
bun run test:watch |
Run tests in watch mode |
bun run test:coverage |
Run tests with coverage report |
subnudge/
├── backend/
│ ├── src/
│ │ ├── db/ # Database schema and connection
│ │ ├── routes/ # API route handlers
│ │ ├── middleware/ # Hono middleware
│ │ ├── services/ # Business logic
│ │ ├── bot/ # Telegram bot setup
│ │ ├── lib/ # Utilities
│ │ └── index.ts # Entry point
│ └── drizzle/ # Database migrations
├── frontend/
│ ├── src/
│ │ ├── components/ # React components
│ │ │ ├── ui/ # Base UI components
│ │ │ └── layout/ # Layout components
│ │ ├── pages/ # Page components
│ │ ├── hooks/ # Custom React hooks
│ │ ├── lib/ # Utilities and API client
│ │ ├── types/ # TypeScript types
│ │ └── __tests__/ # Test files
│ └── public/ # Static assets
└── docs/ # Documentation
/newbot and follow the prompts.env file.env fileUsers can connect their Telegram account from the Profile page to receive notifications.
See DOCKER.md for Docker deployment instructions.
cd backend
cp .env.docker.example .env
# Edit .env with your values
docker compose up -d
docker compose exec backend bun run db:migrate
Run all tests for both backend and frontend:
# Backend tests
cd backend && bun run test
# Frontend tests
cd frontend && bun run test
MIT