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
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.
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.
Setup Instruction will be given with two main aspects:
- Setup of website
- Setup of API
To get this running you have to own a MySQL database.
- Clone the repo
git clone https://github.com/szybkirito/whitelist_manager.git
- Go to the /api directory
cd ./whitelist_manager/api
- Install all of the dependencies
npm install .
- 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
-
Setup ./src/constants/config.ts file
- If you cannot get guild server ID or roles ID you should enable discord developer option
-
Build the project
npm run build
The build will enable you to visit the localhost:5000/docs route
-
Start the project
npm run dev
- Clone the repo
git clone https://github.com/szybkirito/whitelist_manager.git
- Go to the /client directory
cd ./whitelist_manager/client
- Install all of the dependencies
npm install .
- Setup .env file
- Setup ./src/config.ts file
- If you cannot get guild server ID or roles ID you should enable discord developer option
- Build the project
npm run build
- Start the project
npm run dev
- 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
Currently there is no method to made a request through swagger because of empty authenticate buttons.
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!
- Fork the Project
- 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
Distributed under the MIT License. See LICENSE.txt
for more information.