Subscribely
Modern subscription-management demo built with a Next.js + MongoDB stack β a focused showcase of role-based access, subscription flows, and containerized deployment.
β¨ Snapshot / Quick Facts
- Scope: 2-month creative project (technical showcase, not a production business app)
- Primary goal: Demonstrate a full subscription system with role-based access control, secure auth, email flows, and Dockerized dev/deploy experience
- License: MIT
π Overview
Subscribely is a demo app that implements a configurable subscription marketplace with Admin and User roles. It contains end-to-end subscription flows (purchase, cancellation, admin revocation), account balance handling, email notifications, and developer-friendly deployment via Docker and Vercel.
Note: This project is a technical showcase β useful for portfolio, learning, and demos β not intended as a ready-for-market product.
β¨ Showcase
π§ Features
Authentication & Roles
- User registration & login
- Role-based access control (Admin / User)
- Secure JWT-based authentication
User Capabilities
- Default USD balance on new accounts
- Browse βSubscription Storeβ
- Purchase subscriptions (max 3 active)
- Cancel subscriptions
- Profile settings and account deletion option (work-in-progress)
Admin Capabilities
- Create / edit / delete subscription packages
- View all user subscriptions across platform
- Revoke user subscriptions (triggers automatic email)
- Modify user balances
Subscription System
- Configurable packages (name, description, price, status)
- Flexible durations (1 day, 14 days, 1 month, etc.)
- Automatic balance deduction on purchase
- Email notifications for: purchase confirmation, cancellations, admin revocations
π Tech Stack
- Next.js (App Router, TypeScript)
- MongoDB (with Mongoose)
- Vercel (deployment)
- Docker & Docker Compose (local containerized dev)
- Node.js
- Tailwind CSS (styling)
- React Hook Form + Zod (forms & validation)
- Shadcn UI (component primitives)
- Nodemailer (email flows)
- Sentry (monitoring)
- Arcjet (security integration)
- Repo & collaboration: GitHub
ποΈ Project Structure (high level)
/
βββ .github/
βββ .husky/
βββ app/
βββ components/
βββ config/
βββ lib/
βββ public/
βββ types/
βββ docker-compose.yml
βββ Dockerfile
βββ next.config.js
βββ package.json
βββ README.md
π Development Practices
- Strongly typed (TypeScript)
- Conventional commits for clear history
- Git hooks via Husky + lint-staged
- ESLint + Prettier standardization
- JSDoc comments for key modules
- Sentry for runtime error monitoring
π₯ Installation
Standard (local dev)
# Clone
git clone https://github.com/dan0dev/Subscribely.Subscription.Manager.git
cd Subscribely.Subscription.Manager
# Install deps
npm install
# Dev server
npm run dev
# App will run at http://localhost:3000
Docker (recommended for parity)
Prereqs: Docker 20.10+, Docker Compose v2+
# Clone & enter
git clone https://github.com/dan0dev/Subscribely.Subscription.Manager.git
cd Subscribely.Subscription.Manager
# Create .env from template and fill values
# Start (build + run)
docker compose up --build
# For development with live reload
docker compose up
π³ Environment Variables
Set these in .env.local or the Docker environment:
MONGODB_URI=
JWT_SECRET=
JWT_EXPIRES_IN=
GMAIL_USER=
GMAIL_PASSWORD=
ARCJET_KEY=
SENTRY_AUTH_TOKEN=
π» Deployment
- Application deployed on Vercel (see
next.config.js and Vercel project settings) - Docker support available for alternative deployment targets
π Todo / Future Improvements
- Create test role accounts for easier QA
- Implement automatic subscription expiration & scheduled tasks
- Add subscription renewal / auto-renew options
- Complete working account deletion flow
- Refund processing option
- Add E2E tests and more coverage
π€ Contributing
Open-source β contributions welcome. Please read CONTRIBUTING.md. Use GitHub Issues for bug reports and feature requests.
π License
MIT β see LICENSE in the repo.