Skip to content

feat(server): implement Redis based queue with ZSET and metadata storage#105

Open
dharapandya85 wants to merge 13 commits intoArenax-gaming:mainfrom
dharapandya85:feature/phase-5-gaming-engine
Open

feat(server): implement Redis based queue with ZSET and metadata storage#105
dharapandya85 wants to merge 13 commits intoArenax-gaming:mainfrom
dharapandya85:feature/phase-5-gaming-engine

Conversation

@dharapandya85
Copy link
Copy Markdown

Fixes: #86
server/src/controllers/match.controller.ts
checks for match state active or not
created rating constant with calculatingRating function
returns rating as JSON

server/src/routes/match.routes.ts
calls MatchController
fetches POST request from matches with id and report constraints
this reports results

server/src/services/elo.service.ts
created a class EloService, calculateRating parameter with calculation of newRatings

server/src/workers/matchmaking.worker.ts
logic for stale players removal
if waitTime greater than stale_timeout, removes stale player
tryMatch creates a match if opponent exists

server/src/workers/reaper.worker.ts
creates class ReaperWorker with checkExpiredMatches to check for expired matches
updates match in prisma with FORFEIT state

server/src/services/match.service.ts
joinQueue adds player to matchmaking queue
leaveQueue removes player from the queue
createMatch returns ids of player, with status pending

server/prisma/schema.prisma
added matches, eloHistory in User model
created model match with id, players id, state, player reports, eloHistory, createdAt, updatedAt
created model elohistory with id, matchId, userid, match, user fields, oldRating, newRating, delta, createdAt,
enum MatchState with PENDING, ACTIVE, SETTLED, FORFEIT

server/src/app.ts
calls MatchMakingWorker and ReaperWorker to start

@vercel
Copy link
Copy Markdown

vercel bot commented Feb 22, 2026

@dharapandya85 is attempting to deploy a commit to the paul joseph's projects Team on Vercel.

A member of the Team first needs to authorize it.

@anonfedora
Copy link
Copy Markdown
Contributor

Resolve conflicts, please

@dharapandya85 dharapandya85 force-pushed the feature/phase-5-gaming-engine branch from bd7b58f to 43ac9c9 Compare February 25, 2026 09:53
@anonfedora
Copy link
Copy Markdown
Contributor

Please, let the frontend and server ci pass, at least. They are easy to fix

vic-Gray and others added 11 commits February 26, 2026 19:27
Arenax-gaming#115)

* feat(frontend): implement tournament dashboard, bracket visualization & real-time match hub

- Added filtering and sorting for tournaments (status, fee, game mode)
- Implemented Joined vs Available tabs
- Added Quick Join modal with entry fee confirmation
- Built Single Elimination interactive bracket view
- Highlighted active matches for logged-in users
- Added match detail tooltip/modal (player stats, prize info)
- Implemented real-time match hub with WebSocket listeners
- Added dual score reporting form with conflict resolution alerts
- Preserved existing routing and architecture
- No backend or CI/CD configuration changes
- Ensured TypeScript, ESLint, and build pass successfully

* feat(frontend): implement tournament dashboard, bracket visualization & real-time match hub

- Added filtering and sorting for tournaments (status, fee, game mode)
- Implemented Joined vs Available tabs
- Added Quick Join modal with entry fee confirmation
- Built Single Elimination interactive bracket view
- Highlighted active matches for logged-in users
- Added match detail tooltip/modal (player stats, prize info)
- Implemented real-time match hub with WebSocket listeners
- Added dual score reporting form with conflict resolution alerts
- Preserved existing routing and architecture
- No backend or CI/CD configuration changes
- Ensured TypeScript, ESLint, and build pass successfully

* feat(frontend): implement tournament dashboard, bracket visualization & real-time match hub

- Added filtering and sorting for tournaments (status, fee, game mode)
- Implemented Joined vs Available tabs
- Added Quick Join modal with entry fee confirmation
- Built Single Elimination interactive bracket view
- Highlighted active matches for logged-in users
- Added match detail tooltip/modal (player stats, prize info)
- Implemented real-time match hub with WebSocket listeners
- Added dual score reporting form with conflict resolution alerts
- Preserved existing routing and architecture
- No backend or CI/CD configuration changes
- Ensured TypeScript, ESLint, and build pass successfully

* feat(frontend): implement tournament dashboard, bracket visualization & real-time match hub

- Added filtering and sorting for tournaments (status, fee, game mode)
- Implemented Joined vs Available tabs
- Added Quick Join modal with entry fee confirmation
- Built Single Elimination interactive bracket view
- Highlighted active matches for logged-in users
- Added match detail tooltip/modal (player stats, prize info)
- Implemented real-time match hub with WebSocket listeners
- Added dual score reporting form with conflict resolution alerts
- Preserved existing routing and architecture
- No backend or CI/CD configuration changes
- Ensured TypeScript, ESLint, and build pass successfully

* feat(frontend): implement tournament dashboard, bracket visualization & real-time match hub

- Added filtering and sorting for tournaments (status, fee, game mode)
- Implemented Joined vs Available tabs
- Added Quick Join modal with entry fee confirmation
- Built Single Elimination interactive bracket view
- Highlighted active matches for logged-in users
- Added match detail tooltip/modal (player stats, prize info)
- Implemented real-time match hub with WebSocket listeners
- Added dual score reporting form with conflict resolution alerts
- Preserved existing routing and architecture
- No backend or CI/CD configuration changes
- Ensured TypeScript, ESLint, and build pass successfully

* feat(frontend): implement tournament dashboard, bracket visualization & real-time match hub

- Added filtering and sorting for tournaments (status, fee, game mode)
- Implemented Joined vs Available tabs
- Added Quick Join modal with entry fee confirmation
- Built Single Elimination interactive bracket view
- Highlighted active matches for logged-in users
- Added match detail tooltip/modal (player stats, prize info)
- Implemented real-time match hub with WebSocket listeners
- Added dual score reporting form with conflict resolution alerts
- Preserved existing routing and architecture
- No backend or CI/CD configuration changes
- Ensured TypeScript, ESLint, and build pass successfully
* feat: add Player Reputation Index

* feat: add Player Reputation Index
* feat: implement core observability, error handling, and security middleware (Arenax-gaming#103)

* structured logging and request tracing

* feat: global error handling

* feat: security handling and rate limiting

* feat: implement ArenaX Token (AX) contract

- Add ax-token contract with mint, burn, transfer functionality
- Implement role-based access control for admin operations
- Add comprehensive event emissions for all token operations
- Include 20+ test cases covering security and edge cases
- Update workspace Cargo.toml to include ax-token member
- Follow Soroban token standards for integration readiness

Resolves: Arenax-gaming#120

* fix: update Cargo.lock after ax-token addition

---------

Co-authored-by: Chibuezem Francis <168771603+KingFRANKHOOD@users.noreply.github.com>
Co-authored-by: Eleazar Shekoaga Musa <63799805+anonfedora@users.noreply.github.com>
- Add auth-gateway contract with centralized role management
- Implement 7 role types: Admin, Operator, Referee, Player, TournamentManager, Treasury
- Add role assignment, revocation, and batch operations
- Implement contract whitelisting for cross-contract integration
- Add comprehensive authorization helpers (has_role, has_any_role)
- Include pause functionality and admin transfer capabilities
- Emit full audit events for all role changes
- Add 25+ test cases covering security and integration scenarios
- Update workspace Cargo.toml to include auth-gateway member

Resolves: Arenax-gaming#123

Co-authored-by: Eleazar Shekoaga Musa <63799805+anonfedora@users.noreply.github.com>
* feat: implement core observability, error handling, and security middleware (Arenax-gaming#103)

* structured logging and request tracing

* feat: global error handling

* feat: security handling and rate limiting

* feat: implement ArenaX Token (AX) contract

- Add ax-token contract with mint, burn, transfer functionality
- Implement role-based access control for admin operations
- Add comprehensive event emissions for all token operations
- Include 20+ test cases covering security and edge cases
- Update workspace Cargo.toml to include ax-token member
- Follow Soroban token standards for integration readiness

Resolves: Arenax-gaming#120

* fix: update Cargo.lock after ax-token addition

* feat: implement Tournament Staking Manager

- Add staking-manager contract for AX token tournament staking
- Implement stake() function with AX token locking during active tournaments
- Add withdraw() function with post-match completion conditions
- Implement slash() function authorized by dispute resolution contracts
- Add tournament management with state transitions and metadata tracking
- Include comprehensive event emissions for staking, withdrawal, and slashing
- Add user stake tracking with total staked/slashed statistics
- Implement pause functionality and admin controls
- Add 25+ test cases covering all staking lifecycle scenarios
- Update workspace Cargo.toml to include staking-manager member

Resolves: Arenax-gaming#121

---------

Co-authored-by: Chibuezem Francis <168771603+KingFRANKHOOD@users.noreply.github.com>
Co-authored-by: Eleazar Shekoaga Musa <63799805+anonfedora@users.noreply.github.com>
- Add contract-registry with centralized contract registration and lookup
- Implement unique name enforcement and admin-controlled updates
- Add comprehensive contract metadata tracking (timestamps, registrar)
- Implement batch operations for efficient contract management
- Add advanced query capabilities (time range, registrar filtering)
- Include pause functionality and admin transfer capabilities
- Emit full audit events for all registry operations
- Add 25+ test cases covering security and functionality scenarios
- Update workspace Cargo.toml to include contract-registry member

Resolves: Arenax-gaming#122

Co-authored-by: Eleazar Shekoaga Musa <63799805+anonfedora@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[MATCH-01] Redis Matchmaking Architecture

7 participants