A modern, open-source license key management platform built with Next.js 16, React 19, and Prisma.
License Box is a comprehensive platform for securely storing, organizing, and sharing software license keys with role-based admin dashboard, community voting, encryption, and a beautiful OKLCH-themed UI. Perfect for teams and individuals managing their software licenses.
- Multi-provider Auth: Sign in with Google, GitHub, or email/password
- OTP Verification: Secure two-factor authentication with time-based codes
- Password Reset: Self-service password recovery with email verification
- Session Management: Secure session handling with activity tracking
- Role-Based Access Control: USER, ADMIN, and SUPER_ADMIN roles
- Secure Storage: AES-256-GCM encryption for all license keys
- Key Masking: Safe display with masked key values
- Bulk Import: Import multiple keys at once via CSV
- Quick Add: Rapid key creation with auto-fill from product library
- Key Organization: Organize by products with labels and descriptions
- Expiry Tracking: Monitor key expiration with visual indicators
- Status Management: ACTIVE, EXPIRED, USED_UP, and UNKNOWN states
- Visibility Control: PRIVATE or PUBLIC key sharing
- Product Library: Community-driven product database
- Auto-Fill: Quick key creation with product details
- Icon Support: Custom product icons for easy identification
- Key Statistics: Track active/expired keys per product
- All Keys View: Platform-wide license key management
- All Products View: Manage entire product catalog
- User Management: View and manage all users
- Activity Logs: Comprehensive audit trail with filtering
- Reports System: Community reporting for inappropriate content
- Soft Delete: Recoverable deletion with admin oversight
- Voting System: Upvote/downvote keys and products
- Saved Keys: Bookmark favorites for quick access
- Public Keys: Discover community-shared licenses
- Product Discovery: Browse products by category
- OKLCH Color System: Modern, perceptually uniform colors
- Dark Mode: Automatic theme switching
- Responsive Design: Beautiful on mobile, tablet, and desktop
- Accessibility: WCAG AA compliant with keyboard navigation
- Skeleton Loading: Optimistic UI with smooth loading states
- Toast Notifications: Non-intrusive feedback system
- TypeScript: Full type safety across the codebase
- ESLint + Prettier: Consistent code formatting
- Husky + lint-staged: Pre-commit code quality checks
- Prisma: Type-safe database access with migrations
- Docker Support: Containerized deployment ready
| Category | Technology |
|---|---|
| Framework | Next.js 16.1 (App Router) |
| UI Library | React 19.2 |
| Language | TypeScript 5.0 |
| Database | PostgreSQL (via Prisma 7.4) |
| Cache | Redis 5.11 |
| ORM | Prisma 7.4 |
| Styling | Tailwind CSS 4.2 |
| Components | shadcn/ui (Radix UI primitives) |
| Forms | React Hook Form 7.71 + Zod 4.3 |
| Tables | TanStack Table 8.21 |
| State | Zustand 5.0 |
| Auth | Custom JWT implementation |
| Resend 6.9 | |
| Validation | Zod 4.3 |
| Icons | Lucide React, Tabler Icons |
| Package Manager | pnpm 10.28 |
- Node.js 20+
- pnpm 10+ (recommended) or npm/yarn
- PostgreSQL 14+
- Redis 7+
- Google Cloud project (for OAuth)
- Resend API key (for emails)
git clone https://github.com/yourusername/license-box.git
cd license-boxpnpm installCopy .env.example to .env and configure:
# Database
DATABASE_URL=postgres://user:password@host:5432/dbname
# Redis
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_PASSWORD=your_redis_password
# Application
BASE_URL=http://localhost:3000
NEXT_PUBLIC_APP_URL=http://localhost:3000
NEXT_PUBLIC_API_URL=http://localhost:3000/api
# Authentication
OTP_HMAC_SECRET=your_hmac_secret
SUPER_ADMIN_EMAIL=admin@example.com
SUPER_ADMIN_PASSWORD=SecurePassword123!
# Email (Resend)
RESEND_API_KEY=re_your_api_key
FROM_EMAIL=noreply@yourdomain.com
# OAuth (Google)
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
GOOGLE_CLIENT_EMAIL=your_service_account_email
GOOGLE_PRIVATE_KEY="your_private_key"
# OAuth (GitHub)
GITHUB_CLIENT_ID=your_github_client_id
GITHUB_CLIENT_SECRET=your_github_client_secret
# Turnstile (optional)
TURNSTILE_SECRET_KEY=your_turnstile_secret
NEXT_PUBLIC_TURNSTILE_SITE_KEY=your_turnstile_site_key
# Cron Jobs
CRON_SECRET=your_cron_secret# Generate Prisma client
pnpm db:generate
# Run migrations
pnpm db:migrate
# Seed database (optional)
pnpm db:seedpnpm devOpen http://localhost:3000 in your browser.
pnpm docker:devpnpm docker:build
pnpm docker:prodlicense-box/
βββ app/ # Next.js App Router
β βββ (auth)/ # Authentication pages
β βββ dashboard/ # Dashboard pages
β β βββ all-keys/ # Admin key management
β β βββ all-products/ # Admin product management
β β βββ activity/ # Activity logs
β β βββ my-keys/ # User's keys
β β βββ saved/ # Saved keys
β β βββ settings/ # User settings
β β βββ users/ # User management
β βββ api/ # API routes
β β βββ auth/ # Authentication endpoints
β β βββ keyvault/ # License key APIs
β β βββ activity/ # Activity tracking
β βββ layout.tsx # Root layout
βββ components/ # React components
β βββ auth/ # Auth components
β βββ dashboard/ # Dashboard components
β βββ keyvault/ # Key vault components
β βββ ui/ # shadcn/ui components
βββ lib/ # Utilities
β βββ auth/ # Authentication logic
β βββ db/ # Database client
β βββ notifications/ # Notification service
β βββ utils/ # Helper functions
βββ prisma/ # Database schema
β βββ schema.prisma # Prisma schema
βββ public/ # Static assets
- Encryption: All license keys encrypted with AES-256-GCM
- Rate Limiting: Redis-based rate limiting on API endpoints
- CSRF Protection: Built-in Next.js CSRF protection
- SQL Injection Prevention: Prisma parameterized queries
- XSS Prevention: React's automatic XSS escaping
- Secure Headers: Custom security headers via Next.js
- Activity Logging: Comprehensive audit trail
- Session Management: Secure JWT-based sessions
- Manage own license keys
- Save favorite keys
- Vote on community keys
- View activity history
- Edit profile and settings
- All USER permissions
- View all keys across platform
- View all products
- Edit/delete any key
- Edit/delete any product
- View user reports
- Access activity logs
- All ADMIN permissions
- Full audit log access
- System-level configuration
- User management
- Advanced analytics
# Run linting
pnpm lint
# Fix linting issues
pnpm lint:fix
# Format code
pnpm format:fixThis project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- 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
For support, email support@licensebox.dev or open an issue on GitHub.
- Built with Next.js
- UI components from shadcn/ui
- Database powered by Prisma
- Icons from Lucide and Tabler
- Authentication inspired by various open-source projects
Made with β€οΈ by the License Box team