Add Next.js App Router API endpoints, auth, and game services#4
Open
Spbd1 wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
packages/db) to the simulation engine (packages/engine).Description
ApiExceptionandhandleApiError, returning{ ok, data?, error? }responses from routes (apps/web/lib/api/responses.ts).apps/web/lib/api/schemas.ts).requireAdminAuthusing Basic auth backed byADMIN_EMAIL/ADMIN_PASSWORD, participant-server assertions, and cookie application (apps/web/lib/api/auth.ts).POST /api/join-server,GET /api/me,GET /api/servers/available,GET /api/servers/:serverId/state,POST /api/servers/:serverId/decisions,GET /api/servers/:serverId/round-summary,POST /api/servers/:serverId/exit(files underapps/web/app/api/*).GET|POST /api/admin/servers,GET|PATCH /api/admin/servers/:serverId,POST /api/admin/servers/:serverId/generate-map,POST /api/admin/servers/:serverId/start,POST /api/admin/servers/:serverId/resolve-round,POST /api/admin/servers/:serverId/archive,GET /api/admin/servers/:serverId/export, andGET /api/admin/analytics/overview.joinWaitingServer,createServerMap,submitPlayerDecisions,startServer, andresolveActiveRoundwhich callsresolveRoundfrompackages/engineand persists updates in a Prisma transaction (apps/web/lib/services/game.ts).apps/web/app/api/admin/servers/[serverId]/export/route.ts).@parcel-society/db,@parcel-society/engine, andzodinto the web package and added a smalltsconfigchange to silence a TypeScript 7 baseUrl deprecation warning.Testing
git diff --checklocally and it passed with no whitespace errors.pnpm --filter @parcel-society/web typecheck, but it could not complete due to missingnode_modulesin the environment (TypeScript reported missing workspace package type declarations); the change includes type annotations and should typecheck once dependencies are installed.pnpm --filter @parcel-society/web lint, but it could not complete because dev dependencies (e.g.@eslint/js) were not available in the environment.pnpm --filter @parcel-society/web test, but it could not complete becausevitestwas not available in the environment.pnpm install --lockfile-onlywas attempted to update dependency lock data but was blocked by an external registry 403 fortypescript-eslintin this environment; installing dependencies will allow the typecheck/lint/test steps to run successfully.Codex Task