98 lines
2.8 KiB
Markdown
98 lines
2.8 KiB
Markdown
# RTECH Unified Ban System
|
|
The UBS Project is brought to you by the RTECH Development Team.
|
|
This project aims to solve a simple but crucial problem: managing bans across roblox and discord. And making it easy to impliment, to keep communities safe.
|
|
|
|
## [Join the RTECH Discord!](https://ubs.rtech.foundation/discord)
|
|
|
|
## [Server Status](https://status.chrischro.me/status/rtech)
|
|

|
|

|
|

|
|
|
|
## Features
|
|
- [X] MariaDB database for storing ban data
|
|
- [X] REST API for querying bans
|
|
- [ ] Web interface for querying bans
|
|
- [X] Admin web interface for managing bans
|
|
- [X] Mass import of bans
|
|
- [ ] Mass export of bans
|
|
- [ ] Ban appeal system
|
|
- [ ] Ban appeal system admin interface
|
|
- [ ] Discord integrations (Notifications, Appeals, Querying)
|
|
|
|
<!-- ## Installation
|
|
1. Clone the repository
|
|
2. Run `npm install`
|
|
3. Configure the `.env` file with your database and API settings (see `.env.example`)
|
|
4. Run `node .` to start the server -->
|
|
|
|
## API Documentation
|
|
### 🔓 Unauthenticated Endpoints
|
|
`GET /health` - Healthcheck endpoint (For Uptime Kuma)
|
|
|
|
`GET /v1/myIP` - Get your IP address (As seen by the server. Useful for debugging)
|
|
|
|
`GET /v1/info` - Get information about the API (Version, All reason flags)
|
|
|
|
`GET /api/v1/bans` - Get all bans
|
|
|
|
`GET /api/v1/ban/roblox/:robloxId` - Get bans by Roblox ID
|
|
|
|
`GET /api/v1/ban/discord/:discordId` - Get bans by Discord ID
|
|
|
|
### 🔒 Authenticated Endpoints
|
|
`GET /admin` - Renders the admin dashboard.
|
|
|
|
`GET /admin/edit/:id` - Renders the edit ban page for a specific ban.
|
|
|
|
`GET /admin/create` - Renders the create ban page.
|
|
|
|
`POST /admin/create` - Creates a new ban.
|
|
**Post Data:**
|
|
```json
|
|
{
|
|
"robloxId": "string",
|
|
"discordId": "string",
|
|
"reason": "string",
|
|
"duration": "number"
|
|
}
|
|
```
|
|
|
|
`POST /admin/edit/:id` - Edits an existing ban.
|
|
**Post Data:**
|
|
```json
|
|
{
|
|
"reason": "string",
|
|
"duration": "number"
|
|
}
|
|
```
|
|
|
|
`GET /admin/import` - Renders the import page for uploading ban data.
|
|
|
|
`POST /admin/import` - Handles the import of ban data from a file.
|
|
**Post Data:**
|
|
- `fileInput`: File upload (CSV format)
|
|
- `fileType`: Type of the file being uploaded (e.g., 'csv', 'mfd')
|
|
|
|
`GET /admin/uploadStatus` - Renders the upload status page.
|
|
|
|
`GET /admin/api/bans` - Retrieves all bans.
|
|
|
|
`GET /admin/api/uploads/:id` - Retrieves the status of a specific upload.
|
|
|
|
`GET /admin/api/uploads` - Retrieves the status of all uploads.
|
|
|
|
`GET /admin/login` - Renders the admin login page.
|
|
|
|
`POST /admin/login` - Handles admin login.
|
|
**Post Data:**
|
|
```json
|
|
{
|
|
"username": "string",
|
|
"password": "string",
|
|
"totp": "string"
|
|
}
|
|
```
|
|
|
|
`ALL /admin/logout` - Logs out the admin.
|