How srujangithubit/dbms-miniproject works
ArenaRank is a web platform for competitive esports matchmaking, Elo rankings, and player/admin workflows. Players register or sign in, view their game and season standings, and join a rating-aware queue; compatible players are paired into pending matches. An administrator finalizes the result, which updates ratings and match history. PostgreSQL handles transactional competition data, while MongoDB stores audit activity and documented match telemetry. The dashboard also exposes player search and admin activity. Some capability links are documented in the README; unsampled implementation details are not inferred.
Main entry points: page.tsx ArenaRank interface · db.ts SQL access and transactions · auth.ts Signed sessions · route.ts Finalize result
Components 17
Web experience
- ArenaRank interface
app/page.tsx - Dashboard data
app/api/dashboard/route.ts - Player directory
app/api/players/route.ts
Identity and access
- Sign in
app/api/auth/login/route.ts - Registration
app/api/auth/register/route.ts - Session and logout
app/api/auth/me/route.ts - Signed sessions
lib/auth.ts
Competition workflows
- Join and pair queue
app/api/queue/join/route.ts - Leave queue
app/api/queue/leave/route.ts - Finalize result
app/api/matches/[id]/result/route.ts - Elo calculation
lib/elo.mjs
Persistence and records
- SQL access and transactions
lib/db.ts - Competition records
db/schema.sql - Safe audit writer
lib/audit.ts - MongoDB access
lib/mongo.ts - Audit and telemetry documents
Other components
- Players and admins
Connections 31
- Players and admins → ArenaRank interface: uses
README.md - ArenaRank interface → Sign in: signs in
README.md - ArenaRank interface → Registration: registers
README.md - ArenaRank interface → Dashboard data: loads dashboard
README.md - ArenaRank interface → Player directory: searches players
README.md - ArenaRank interface → Join and pair queue: joins queue
README.md - ArenaRank interface → Leave queue: leaves queue
README.md - ArenaRank interface → Finalize result: submits result
README.md - Sign in → SQL access and transactions: queries accounts
app/api/auth/login/route.ts - Sign in → Signed sessions: creates session
app/api/auth/login/route.ts - Registration → SQL access and transactions: writes account
app/api/auth/register/route.ts - Registration → Signed sessions: creates session
app/api/auth/register/route.ts - Session and logout → Signed sessions: checks session
app/api/auth/me/route.ts - Dashboard data → Signed sessions: checks session
app/api/dashboard/route.ts - Dashboard data → SQL access and transactions: queries standings
app/api/dashboard/route.ts - Dashboard data → MongoDB access: reads admin activity
app/api/dashboard/route.ts - Player directory → Signed sessions: checks session
app/api/players/route.ts - Player directory → SQL access and transactions: searches rankings
app/api/players/route.ts - Join and pair queue → Signed sessions: checks session
app/api/queue/join/route.ts - Join and pair queue → SQL access and transactions: pairs transactionally
app/api/queue/join/route.ts - Join and pair queue → Safe audit writer: records activity
app/api/queue/join/route.ts - Leave queue → Signed sessions: checks session
app/api/queue/leave/route.ts - Leave queue → SQL access and transactions: deletes queue entry
app/api/queue/leave/route.ts - Leave queue → Safe audit writer: records activity
app/api/queue/leave/route.ts - Finalize result → Signed sessions: checks role
app/api/matches/[id]/result/route.ts - Finalize result → SQL access and transactions: calls finalizer
app/api/matches/[id]/result/route.ts - Finalize result → Safe audit writer: records result
app/api/matches/[id]/result/route.ts - SQL access and transactions → Competition records: reads and writes
README.md - Safe audit writer → MongoDB access: writes events
lib/audit.ts - MongoDB access → Audit and telemetry documents: reads and writes
lib/mongo.ts - Finalize result → Elo calculation: uses rating logic