Conversation
… development configuration - Added new API routes for session management including creation, retrieval, and updates. - Introduced WebSocket support for real-time updates in session rooms. - Configured local development environment variables in `.env.example`. - Updated package scripts for local API development. - Added middleware for request validation and body size limits. - Implemented pagination for session listing. - Created utility functions for database connection and error handling. - Added OpenAPI documentation for the new endpoints. - Included tests for session routes and pagination functionality. - Refactored existing code for improved structure and maintainability.
- Updated `.gitignore` to include new example files for local development. - Added scripts for environment setup, key generation, and running npm scripts in sequence. - Introduced `.oche-keys.json` for managing API keys and integrated it with local development variables. - Enhanced `resolvePrincipal` function to support dynamic API key resolution from environment variables. - Created tests for the new key resolution logic. - Improved the doctor script to check for necessary environment files and provide setup instructions.
- Enhanced the doctor script to check for the presence of hyperdrive IDs in the wrangler.toml file. - Added logic to indicate whether placeholders are set and provide instructions for replacement if necessary.
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.
Summary by cubic
Refactors the API and web app to support signed media, paginated sessions, and real-time updates, and adds a streamlined local dev setup. Includes OpenAPI docs, stronger middleware, and comprehensive tests.
New Features
POST /media/uploadwith MIME/size validation, immutable hashed R2 keys, signed fetch URLs, byte-range reads; HMAC viaMEDIA_SIGNING_SECRET.GET/POST/PATCH /sessions, cursor pagination,SessionRoomDurable Object broadcasts, and OpenAPI 3.1 spec.APP_ORIGIN, rate limiting, and JSON body size limits.withPrincipalsetsrole oche_appand owner context; migration grants to enableSET ROLE.PlayerAvatar, improved Overview/History/Detail,useLiveSessionexposesconnected, WS URL accepts?key=..., ViteenvDirat repo root.scripts/wrangler-dev.mjs, env/key helpers (env-setup,generate-keys,setup,with-env), doctor checks, and OpenAPI endpoint.@axe-core/playwrighta11y checks and seeded global setup.Migration
npm run setupto create.envandapps/api/.dev.varsfrom templates.DATABASE_URL(Neon) andMEDIA_SIGNING_SECRETin.env; ensureAPP_ORIGINandVITE_API_BASEmatch local defaults.npm run keys:generate(writes.oche-keys.jsonand syncs.dev.vars).node scripts/run-steps.mjs db:migrate db:force-rls db:seed.npm run dev(wrangler API + web). For staging/prod, set Wrangler vars/secrets, R2 buckets, and Hyperdrive IDs.Written for commit bacee56. Summary will update on new commits.