alpha
Login
or
Join now
alpine.girlfag.club
/
refserver
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
server for refapp and refbot and other stuff
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
Pipelines
refserver
/
src
/
at
3cd3b4676d2ee70cd2ccfb8d256514eaba3cc152
6 folders
9 files
alpine
feat(refserver): seed admin API key on first boot via REFSERVER_BOOTSTRAP_API_KEY
1d ago
3cd3b467
engine
Implement phase 6A: check-in/approval flow, restart, player view, pools API Adds check-in/approval lifecycle to match engine: - createPendingMatch: creates match in 'pending' status with check-in state - checkInPlayer: marks player as checked in - approveMatch: transitions from pending to ban-phase New routes: - POST /matches/:id/check-in (player check-in) - POST /matches/:id/approve (referee approval) - POST /matches/:id/restart (restart completed match) - GET /matches/:id/player (filtered player view) - GET /pools, GET /pools/tier/:tier, GET /pools/match (pools read) Session metadata: findMatchByChannelId for channelId→matchId lookup. 268 tests pass, typecheck clean.
2 days ago
external
feat(refserver): event counts + deactivate; Discord Bearer auth; drop jose GET /events and /events/:id now return match/player counts. New PATCH /events/:id/deactivate. Bearer tokens are validated against Discord and mapped to a discord actor (admin if in DISCORD_ALLOWED_USERS, else read-only). Removed the unused jwt/jose scaffolding and its empty-secret default; hardened the Discord token cache (hashed keys, bounded size).
2 days ago
middleware
feat(refserver): event counts + deactivate; Discord Bearer auth; drop jose GET /events and /events/:id now return match/player counts. New PATCH /events/:id/deactivate. Bearer tokens are validated against Discord and mapped to a discord actor (admin if in DISCORD_ALLOWED_USERS, else read-only). Removed the unused jwt/jose scaffolding and its empty-secret default; hardened the Discord token cache (hashed keys, bounded size).
2 days ago
models
Add chart/player write endpoints, GuildConfig model, match admin ops for refbot migration
2 days ago
routes
test(refserver): fix Bearer-scheme auth test; docs: sync rate-limit config - auth.test.ts: the Bearer test sent an API key expecting 200, but Bearer is the Discord OAuth scheme and correctly rejects API keys. Now mocks Discord's /users/@me so a real Discord token authenticates (200) and asserts an API key on the Bearer scheme is rejected (401). - README: update status to Phases 1-8 complete; document config + rate-limit knobs and the ApiKey/health rate-limit exemption; note dist/ is built at deploy. - .env.example: raise RATE_LIMIT_MAX default 100 -> 600 to match code and explain the SPA-polling rationale.
2 days ago
util
Implement phase 2 pure utilities with unit tests Adds src/util/ scoreRank, roll, names, chartHashCheck, parseFriendlyCharts, playerImport, formatMappool, poolGenerator, revertAction, judgeResult. All 112 headless node:test tests pass; npm run test:unit and npm run test both pass.
2 days ago
app.ts
feat(refserver): seed admin API key on first boot via REFSERVER_BOOTSTRAP_API_KEY Breaks the chicken-and-egg of needing an admin key to create keys via the API. On startup, if the ApiKey collection is empty, refserver seeds an admin-scoped key from REFSERVER_BOOTSTRAP_API_KEY (idempotent; refuses if other keys already exist). Lets the combined stack deploy refserver for the first time without manual key insertion.
1 day ago
bootstrap.test.ts
feat(refserver): seed admin API key on first boot via REFSERVER_BOOTSTRAP_API_KEY Breaks the chicken-and-egg of needing an admin key to create keys via the API. On startup, if the ApiKey collection is empty, refserver seeds an admin-scoped key from REFSERVER_BOOTSTRAP_API_KEY (idempotent; refuses if other keys already exist). Lets the combined stack deploy refserver for the first time without manual key insertion.
1 day ago
bootstrap.ts
feat(refserver): seed admin API key on first boot via REFSERVER_BOOTSTRAP_API_KEY Breaks the chicken-and-egg of needing an admin key to create keys via the API. On startup, if the ApiKey collection is empty, refserver seeds an admin-scoped key from REFSERVER_BOOTSTRAP_API_KEY (idempotent; refuses if other keys already exist). Lets the combined stack deploy refserver for the first time without manual key insertion.
1 day ago
config.ts
feat(refserver): seed admin API key on first boot via REFSERVER_BOOTSTRAP_API_KEY Breaks the chicken-and-egg of needing an admin key to create keys via the API. On startup, if the ApiKey collection is empty, refserver seeds an admin-scoped key from REFSERVER_BOOTSTRAP_API_KEY (idempotent; refuses if other keys already exist). Lets the combined stack deploy refserver for the first time without manual key insertion.
1 day ago
db.ts
Implement phase 1 foundation: Express, WebSocket, Mongoose, models, health/version
2 days ago
errors.ts
Implement phase 1 foundation: Express, WebSocket, Mongoose, models, health/version
2 days ago
index.ts
feat(refserver): seed admin API key on first boot via REFSERVER_BOOTSTRAP_API_KEY Breaks the chicken-and-egg of needing an admin key to create keys via the API. On startup, if the ApiKey collection is empty, refserver seeds an admin-scoped key from REFSERVER_BOOTSTRAP_API_KEY (idempotent; refuses if other keys already exist). Lets the combined stack deploy refserver for the first time without manual key insertion.
1 day ago
logger.ts
Implement phase 1 foundation: Express, WebSocket, Mongoose, models, health/version
2 days ago
ws.ts
Implement phase 5 HTTP/WS API: auth, routes, WebSocket subscriptions Add API key auth middleware (ApiKey/Bearer schemes, scope enforcement), Express route handlers for events, matches (ban/pick/ready/result/revert/ stop lifecycle), charts search, players search, API key management CRUD. Enhance WebSocket server with match/event subscribe/unsubscribe protocol. Integration tests with supertest against mongodb-memory-server. 260 total tests pass, typecheck clean.
2 days ago