feat: add initial Socket.IO queue server implementation

- Created a basic Socket.IO server that manages user connections and queues for events.
- Implemented queue logic to handle concurrent user limits and JWT token issuance.
- Added MySQL configuration for potential persistence of queue positions.
- Introduced environment variables for configuration through a .env.example file.
This commit is contained in:
2025-09-19 18:49:12 +02:00
parent e11466d3db
commit e60c801f4e
7 changed files with 765 additions and 97 deletions

17
.env.example Normal file
View File

@@ -0,0 +1,17 @@
# Socket server
SOCKET_PORT=4000
NEXT_PUBLIC_SOCKET_URL=http://localhost:4000
# Queue settings
QUEUE_THRESHOLD=100
CONCURRENT_ACTIVE=50
TOKEN_TTL_SECONDS=900
# JWT
JWT_SECRET=your_jwt_secret_here
# MySQL (optional)
MYSQL_HOST=localhost
MYSQL_USER=root
MYSQL_PASSWORD=yourpassword
MYSQL_DATABASE=queue_demo