/whitelist_manager

Primary LanguageTypeScriptMIT LicenseMIT

Contributors Forks Stargazers Issues MIT License LinkedIn


Logo

Whitelist Website API

API created for whitelist website which handles users applications and authentication of users. This also runs the discord bot which sends messages to the users.
Report Bug · Request Feature

About The Project

This project is designed to automate the process of managing player admissions across various gaming servers. Recognizing the common use of whitelists to ensure an optimal gaming experience, this solution aims to streamline the traditional, often cumbersome methods of using Discord or forums for player approvals. Initially conceived to enhance the experience for FiveM servers, the website versatility allows it to be adapted for use with any game that employs a similar whitelist process. The code is open for customization, enabling users to tailor it according to their specific requirements.

Built With

This section should list any major frameworks/libraries used to bootstrap your project. Leave any add-ons/plugins for the acknowledgements section. Here are a few examples.

Screenshots

website_screenshots

discord_messages_screenshot

Getting Started

Setup Instruction will be given with two main aspects:

  • Setup of website
  • Setup of API

Prerequisites

To get this running you have to own a MySQL database.

Installation API

  1. Clone the repo
    git clone https://github.com/szybkirito/whitelist_manager.git
  2. Go to the /api directory
    cd ./whitelist_manager/api
  3. Install all of the dependencies
    npm install .
  4. Setup .env file JWT_SECRET can be generated through node.js js require('crypto').randomBytes(64).toString('hex');
  • Discord Following variables can be found in Discord Developer Portal.

    DISCORD_BOT_TOKEN=
    DISCORD_CLIENT_ID=
    DISCORD_CLIENT_SECRET=
    DISCORD_OAUTH_REDIRECT_URI=http://localhost:5173/authorize
    
    • REMEMBER TO ADD CORRECT REDIRECT URL IN DISCORD DEVELOPERPORTAL
    • If you have in plan to change name of the routes you shouldchange the redirect url here too
  1. Setup ./src/constants/config.ts file

    • If you cannot get guild server ID or roles ID you should enable discord developer option
  2. Build the project

    npm run build

    The build will enable you to visit the localhost:5000/docs route

  3. Start the project

    npm run dev

Installation Client

  1. Clone the repo
    git clone https://github.com/szybkirito/whitelist_manager.git
  2. Go to the /client directory
    cd ./whitelist_manager/client
  3. Install all of the dependencies
    npm install .
  4. Setup .env file
  5. Setup ./src/config.ts file
    • If you cannot get guild server ID or roles ID you should enable discord developer option
  6. Build the project
    npm run build
  7. Start the project
    npm run dev

Usage

  • Important note is that in order it to work the user have to be in the same discord server as your bot
  • If you want to visit all of the avaiable request, visit http://localhost:5000/docs

Known Issues

Currently there is no method to made a request through swagger because of empty authenticate buttons.

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)