Skip to content

Subscribely is a creative full-stack project built to demonstrate a modern subscription management platform. This project has been in development for 2 months and serves as a showcase for implementing a comprehensive subscription system with role-based access controls.

License

Notifications You must be signed in to change notification settings

dan0dev/Subscribely.Subscription.Manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

142 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Subscribely

Subscribely Logo

Next.js MongoDB Vercel Docker License

πŸ“„ Overview

Subscribely is a creative project built to demonstrate a modern subscription management platform. This project has been in development for 2 months and serves as a showcase for implementing a comprehensive subscription system with role-based access controls.

Note: This is not a real-world application solving an actual business problem, but rather a creative project demonstrating various technical implementations and solutions.

sign-up.mp4

✨ Showcase

Image 1 Image 2
Image 3 Image 4

πŸ”§ Features

Authentication

  • User registration and login system
  • Role-based access control (Admin and User roles)
  • Secure authentication with JWT

User Features

  • Default balance in USD for new accounts
  • Subscription marketplace ("Subscription Store")
  • Active subscription management (up to 3 active subscriptions)
  • Subscription cancellation
  • Profile settings with account deletion option

Admin Features

  • Create, edit, and delete subscription packages
  • View all user subscriptions across the platform
  • Ability to revoke user subscriptions with automatic email notification
  • Modify user account balances

Subscription System

  • Configurable subscription packages (name, description, price, status)
  • Customizable subscription durations (1 day, 14 days, 1 month, etc.)
  • Automatic balance deduction on purchase
  • Email notifications for subscription events:
    • Purchase confirmation
    • Subscription cancellation
    • Admin-initiated subscription revocation

πŸ“ Tech Stack

  • Framework: Next.js 15 with TypeScript
  • Styling: Tailwind CSS
  • Database: MongoDB with Mongoose
  • Authentication: Custom JWT implementation
  • Form Handling: React Hook Form with Zod validation
  • UI Components: Shadcn UI
  • Email: Nodemailer
  • Monitoring: Sentry
  • Security: Arcjet
  • Deployment: Vercel
  • Containerization: Docker and Docker Compose

πŸ—‚οΈ Project Structure

The project follows a standard Next.js App Router structure with server actions and API routes.

/
β”œβ”€β”€ .github/
β”œβ”€β”€ .husky/
β”œβ”€β”€ .next/
β”œβ”€β”€ app/
β”œβ”€β”€ components/
β”œβ”€β”€ config/
β”œβ”€β”€ lib/
β”œβ”€β”€ node_modules/
β”œβ”€β”€ public/
β”œβ”€β”€ types/
β”œβ”€β”€ .env.local
β”œβ”€β”€ .env.sentry-build-plugin
β”œβ”€β”€ .eslintrc.json
β”œβ”€β”€ .gitignore
β”œβ”€β”€ .prettierrc.json
β”œβ”€β”€ components.json
β”œβ”€β”€ docker-compose.yml
β”œβ”€β”€ Dockerfile
β”œβ”€β”€ eslint.config.mjs
β”œβ”€β”€ instrumentation-client.ts
β”œβ”€β”€ instrumentation.ts
β”œβ”€β”€ middleware.ts
β”œβ”€β”€ next-env.d.ts
β”œβ”€β”€ next.config.js
β”œβ”€β”€ package-lock.json
β”œβ”€β”€ package.json
β”œβ”€β”€ postcss.config.mjs
β”œβ”€β”€ README.md
β”œβ”€β”€ sentry.edge.config.ts
β”œβ”€β”€ sentry.server.config.ts
└── tsconfig.json

🌐 Development Practices

  • Strongly typed with TypeScript
  • Conventional commits for clear version history
  • Git workflow configured with Husky and lint-staged
  • Comprehensive ESLint and Prettier configuration
  • Well-documented codebase with JSDoc comments

πŸ“₯ Installation

Standard Installation

# Clone the repository
git clone https://github.com/dan0dev/Subscribely.Subscription.Manager.git

# Install dependencies
npm install

# Start the development server
npm run dev

Docker Installation

The application can also be run using Docker and Docker Compose, which sets up both the application and MongoDB database in containers with automatic file watching for development.

Prerequisites

# Clone the repository
git clone https://github.com/dan0dev/Subscribely.Subscription.Manager.git

# Navigate to the project directory
cd Subscribely.Subscription.Manager

# Create .env file with your environment variables (see Environment Variables section)
# Then start the application with Docker Compose
docker compose up --build

# For development with live file watching
docker compose up

The application will be available at http://localhost:3000. Any changes made to the source files will be automatically synchronized to the container through the volume mounts and hot-reloading will be triggered by Next.js.

🌳 Environment Variables

Modify the .env.local file with your own variables data with the following:

MONGODB_URI=

JWT_SECRET=
JWT_EXPIRES_IN=

GMAIL_USER=
GMAIL_PASSWORD=

ARCJET_KEY=
SENTRY_AUTH_TOKEN=

πŸ’» Deployment

The application is deployed on Vercel.

πŸ“ Todo

  • Creating test role as account
  • Implement automatic subscription expiration (currently subscriptions don't expire automatically)
  • Add subscription renewal options
  • Actual working account deletion
  • Refund option

🀝 Contributing

Subscribely is an open-source project, and we welcome contributions of all kinds from the community! If you're interested in helping out, have ideas, or found a bug, please read our Contributing Guidelines (CONTRIBUTING.md) for details.

We use GitHub Issues for tracking bugs and feature requests.

πŸ“ƒ License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Subscribely is a creative full-stack project built to demonstrate a modern subscription management platform. This project has been in development for 2 months and serves as a showcase for implementing a comprehensive subscription system with role-based access controls.

Resources

License

Contributing

Stars

Watchers

Forks

Contributors 2

  •  
  •  

Languages