Skip to content

Commit 0544475

Browse files
author
SKM
committed
Feat(api): Basic API setup for Bridge
1 parent 1ac6e3f commit 0544475

File tree

11 files changed

+5232
-516
lines changed

11 files changed

+5232
-516
lines changed

.env.template

Lines changed: 64 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,35 @@
1+
# ============================================================================
2+
# Discord Configuration
3+
# ============================================================================
4+
DISCORD_TOKEN=""
5+
DISCORD_CLIENT_ID=
6+
DISCORD_IGNORE_PREFIX=")"
7+
DISCORD_INVITE_LINK=""
8+
DISCORD_SERVER_ID=
9+
MEMBER_CHANNEL_ID=
10+
OFFICER_CHANNEL_ID=
11+
BLACKLIST_CHANNEL_ID=
12+
BOT_OWNER_ID=
13+
STAFF_ROLE_ID=
14+
15+
# ============================================================================
16+
# Minecraft Configuration
17+
# ============================================================================
118
MINECRAFT_EMAIL=""
219
# Your password is not required as login is handled by MSA when starting the application
20+
MINECRAFT_PASSWORD=
321
MINECRAFT_CHAT_SEPARATOR=">"
422
# The character that separates the author name from their message in game
523

24+
# ============================================================================
25+
# Hypixel API Configuration
26+
# ============================================================================
627
HYPIXEL_API_KEY=
728
# Some features will not work if left unset
829

30+
# ============================================================================
31+
# Bot Behavior Configuration
32+
# ============================================================================
933
USE_PROFANITY_FILTER=true
1034
# Profanity filter is designed to only block words disallowed by Hypixel, but may have false positives
1135

@@ -22,12 +46,43 @@ REMINDER_MESSAGE=""
2246
REMINDER_FREQUENCY=60
2347
# How often to send the reminder, in minutes. Defaults to 60
2448

25-
DISCORD_TOKEN=""
26-
DISCORD_IGNORE_PREFIX=")"
27-
DISCORD_INVITE_LINK=""
28-
DISCORD_SERVER_ID=
29-
MEMBER_CHANNEL_ID=
30-
OFFICER_CHANNEL_ID=
31-
BLACKLIST_CHANNEL_ID=
32-
BOT_OWNER_ID=
33-
STAFF_ROLE_ID=
49+
# ============================================================================
50+
# Bridge API Configuration (Optional - For Web Integration)
51+
# ============================================================================
52+
# Enable the REST API and WebSocket server
53+
ENABLE_API=false
54+
55+
# Port for the API server
56+
API_PORT=3000
57+
58+
# Enable authentication (recommended for production if API is enabled)
59+
ENABLE_AUTH=true
60+
61+
# JWT secret for token generation (change this to a secure random string!)
62+
JWT_SECRET=change-this-to-a-long-random-secure-secret
63+
64+
# Allowed origins for CORS (comma-separated)
65+
ALLOWED_ORIGINS=http://localhost:3000,http://localhost:3001,http://localhost:8080
66+
67+
# Rate limiting configuration
68+
RATE_LIMIT_WINDOW_MS=900000
69+
RATE_LIMIT_MAX_REQUESTS=100
70+
71+
# ============================================================================
72+
# API Authentication (Required if ENABLE_AUTH=true)
73+
# ============================================================================
74+
# Admin credentials for API access
75+
ADMIN_USERNAME=admin
76+
ADMIN_PASSWORD=your_secure_password_here
77+
78+
# API key for programmatic access (alternative to username/password)
79+
API_KEY=your_api_key_here
80+
81+
# ============================================================================
82+
# Additional Configuration
83+
# ============================================================================
84+
# Node environment
85+
NODE_ENV=development
86+
87+
# Log level
88+
LOG_LEVEL=info

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,3 +125,6 @@ dist
125125

126126
#MacOSX SHIT
127127
.DS_Store
128+
129+
# Migrations
130+
docs/WEB_MIGRATION_PLAN.md

0 commit comments

Comments
 (0)