Skip to content

Repository files navigation

Zeus Banner

Zeus Open Source License Management System

Discord Server Contributors Forks Stars Issues

Overview

Zeus is a self-hosted license management system for digital products, subscriptions, and access-controlled resources. It provides an admin dashboard, a Discord-authenticated client portal, a Discord bot, and API endpoints for license validation and provisioning.

Zeus uses JSON files by default for simple deployments. PostgreSQL is also supported for shared storage, managed hosting, and deployments with more than one running process.

The project takes inspiration from panels such as Phantom and Sun Licenses while keeping setup, maintenance, and extension points straightforward.

Note

Zeus is still moving quickly. If you run into a bug or an edge case, open an issue.

What Zeus Handles

  • Product management
  • License creation, renewal, activation, deactivation, and deletion
  • Customer records with owner and sub-user relationships
  • Voucher creation and redemption
  • IP, HWID, and Discord ID blacklist controls
  • License validation with configurable response fields
  • BuiltByBit webhook and placeholder purchase flows
  • Discord bot commands for staff and customers
  • Dashboard reporting for validations, customers, webhook activity, and bot usage

Tech Stack

  • Next.js App Router
  • React and TypeScript
  • Bun runtime and package manager
  • Discord.js for bot commands
  • Tailwind CSS and Radix UI primitives
  • JSON file storage by default
  • PostgreSQL relational storage as an optional backend

Storage

Zeus supports two storage backends:

  • DB=JSON, the default, stores application data in data/
  • DB=POSTGRESQL stores application data in PostgreSQL

PostgreSQL mode creates relational tables for settings, products, licenses, platform links, validation logs, bot logs, vouchers, blacklist entries, and schema metadata. The dashboard, API routes, and Discord bot use the same storage layer.

When switching between JSON and PostgreSQL, the admin dashboard checks the inactive backend for existing data. If data is found, the dashboard shows a migration prompt after admin sign-in. Migration copies and merges data into the active backend, leaves the source backend unchanged, and writes a destination backup to data/migration-backups/.

Local Development

  1. Clone the repository and install dependencies.
git clone https://github.com/unt1tler/Zeus.git
cd Zeus
bun install
  1. Copy .env.example to .env and set the required values.

  2. Start the app.

bun run dev
  1. Open http://localhost:9002/admin/login.

  2. Sign in with LOGIN_EMAIL and LOGIN_PASSWORD.

  3. Configure panel URL, admin API settings, Discord settings, and integration settings from the dashboard.

If you only need the admin panel, the Discord bot can stay disabled. If you need the client portal or slash commands, configure Discord settings in the dashboard and provide DISCORD_BOT_TOKEN.

Environment Configuration

Required:

  • LOGIN_EMAIL
  • LOGIN_PASSWORD
  • SESSION_SECRET

Common optional values:

  • PORT, defaults to 9002
  • DISCORD_BOT_TOKEN
  • TRUST_X_FORWARDED_FOR=true when running behind a trusted reverse proxy
  • SESSION_COOKIE_SECURE=true|false to override secure cookie behavior
  • DB=JSON or DB=POSTGRESQL
  • postgresql_db for the PostgreSQL connection string
  • POSTGRESQL_TABLE, default zeus_store
  • POSTGRESQL_POOL_MAX, default 10
  • POSTGRESQL_SSL_REJECT_UNAUTHORIZED=true|false

For PostgreSQL:

DB=POSTGRESQL
postgresql_db=postgres://user:password@host:5432/database?sslmode=require

For PostgreSQL to JSON migration, keep the PostgreSQL connection string available while DB=JSON is active so Zeus can read the old source backend.

DB=JSON
postgresql_db=postgres://user:password@host:5432/database?sslmode=require

INTERNAL_PANEL_URL and API_KEY are only needed when running the bot separately. The bundled dev and start scripts inject those values from dashboard settings.

Project Layout

src/app            Next.js routes, layouts, pages, and API endpoints
src/components     Dashboard, client portal, and integration UI
src/lib            Auth, data access, server actions, settings, and utilities
src/bot            Discord bot runtime and command handlers
data               JSON storage and migration backups
scripts            Startup, build, sync, and maintenance scripts
public             Static assets

Documentation

Usage details, runtime behavior, API routes, storage notes, and contribution guidance are in USAGE.md.

Build and Start

bun run build
bun run start

bun run build builds the Next.js app and attempts Discord command deployment first. Missing or invalid Discord credentials do not stop the web build. bun run start runs the panel and bot under one supervisor process.

Screenshots

Panel Dashboard screenshot License management screenshot Records screenshot Customers screenshot Settings screenshot Integration screenshot
Discord Bot Discord bot command screenshot Discord bot license screenshot Discord bot customer screenshot Discord bot redemption screenshot

Pull Requests

Before opening a pull request:

  1. Keep the change focused.
  2. Update docs when behavior or configuration changes.
  3. Run bun run typecheck.
  4. Run bun run lint.
  5. Run bun run build for changes that affect runtime behavior, routes, storage, or the bot.

Open an issue first for larger behavior changes so the direction is clear before implementation.

About

A powerful and portable license management system with discord and client panel integration

Topics

Resources

Stars

11 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages