Skip to content

discor auth fulll project by NullStudio

Notifications You must be signed in to change notification settings

NullStudioInc/discord-auth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Discord Auth

A full-stack Discord authentication and ticket management system with a modular Discord bot, REST API backend, and web frontend.
This project is designed for Discord communities that need user authentication, ticketing, and admin tools, all deployable with Docker.

Full-stack Discord authentication and ticket management system with bot, API, and web frontend.


Table of Contents

Section Description
Features Key features of the project
Folder Structure How the project is organized
Getting Started Steps to install and run locally or with Docker
Usage How to use the bot, API, and web frontend
Documentation Links to API, bot, and deployment docs
Contributing How to contribute to the project
License License information
Credits Technologies and libraries used
Support the Project Donate or sponsor development
Stay Connected Links to profiles and store

Features

  • Discord Bot

    • Modular ticket system (open, close, claim, etc.)
    • Admin commands (warn, ban, add/remove admin, etc.)
    • SQLite database for tickets and admin management
    • Permission checks for owner/admins
    • Dockerized for easy deployment
  • Backend (Node.js/Express)

    • REST API for authentication and user management
    • Discord OAuth2 integration
    • User data stored in MongoDB or JSON
    • Modular controllers, routes, and models
  • Frontend

    • Simple web interface for authentication and callback
    • Static assets and JS for Discord login
  • Shared Utilities

    • Common config, database, and logger modules
  • Dockerized

    • Compose file for bot, backend, and persistent database volumes

Folder Structure

discord-auth/
├─ backend/         # Node.js/Express API for Discord OAuth and user management
│  ├─ src/
│  │  ├─ config/
│  │  ├─ controllers/
│  │  ├─ models/
│  │  ├─ routes/
│  │  └─ utils/
│  ├─ .env
│  ├─ package.json
│  └─ users.json
├─ bot/             # Discord.py bot with modular cogs and logic
│  ├─ cogs/
│  │  ├─ logic/
│  │  ├─ ui/
│  │  └─ admin/
│  ├─ .env
│  ├─ main.py
│  └─ requirements.txt
├─ database/        # SQLite DBs and migration scripts
│  ├─ tickets.db
│  ├─ admins.db
│  └─ ...
├─ docker/          # Dockerfiles and compose
│  ├─ bot.Dockerfile
│  ├─ backend.Dockerfile
│  └─ docker-compose.yml
├─ frontend/        # Static web frontend for Discord login
│  ├─ public/
│  └─ src/
├─ shared/          # Shared JS utilities
├─ docs/            # Documentation
├─ logs/            # Log files
└─ README.md

Getting Started

Prerequisites

1. Clone the repository

git clone https://github.com/NullStudio-dev/discord-auth.git
cd discord-auth

2. Environment Variables

  • bot/.env

    TOKEN=your_discord_bot_token
    PREFIX=!
    TICKET_CATEGORY_ID=your_discord_category_id
    BOT_OWNER_ID=your_discord_user_id
    
  • backend/.env

    CLIENT_ID=your_discord_client_id
    CLIENT_SECRET=your_discord_client_secret
    REDIRECT_URI=http://localhost:3000/callback
    SESSION_SECRET=your_session_secret
    

3. Database Migration

For SQLite (bot):

python bot/database/migrate.py
python bot/database/migrate_admins.py

For backend (if using MongoDB, set up your connection string in backend/.env).

4. Running with Docker

cd docker
docker compose up --build
  • The bot will run from /bot
  • The backend API will run from /backend
  • Database files are persisted in /database

5. Running Locally (Dev)

Bot:

cd bot
pip install -r requirements.txt
python main.py

Backend:

cd backend
npm install
npm start

Frontend:
Open frontend/public/index.html in your browser.


Usage

  • Use the Discord bot for ticket management and admin commands in your server.
  • Use the web frontend for Discord OAuth login.
  • Use the backend API for user management and authentication.

Documentation


Contributing

  1. Fork the repo
  2. Create your feature branch (git checkout -b feature/YourFeature)
  3. Commit your changes
  4. Push to the branch
  5. Open a pull request

License

MIT


Credits


💖 Support the Project

If you find this project useful and want to support its development, you can help through the following platforms:

PayPal
GitHub Sponsors
Patreon
Open Collective
Ko-fi
Liberapay


🌟 Stay Connected

About

discor auth fulll project by NullStudio

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published