docs: comprehensive architecture & tech stack documentation#8
Merged
jackson-jpeg merged 6 commits intov2from Feb 21, 2026
Merged
docs: comprehensive architecture & tech stack documentation#8jackson-jpeg merged 6 commits intov2from
jackson-jpeg merged 6 commits intov2from
Conversation
- Fix AI provider: OpenAI -> Anthropic Claude + Google Gemini - Add missing commands: test, test:watch, test:unit (remove nonexistent lint) - Add environment variables section referencing .env.example - Document all app routes (admin, purchase, privacy, terms, error pages) - Add missing hooks (useAudioPlayer, useHaptics, useStandaloneMode) - Add missing context (ThemeContext) - Expand lib/ from 6 to 18 files with descriptions - Expand server/ from vague categories to full file listing with descriptions - Add architecture sections: custom server, write-through cache, credit system - Note Capacitor mobile support, Apple App Store, Tailwind v4, path alias https://claude.ai/code/session_01CpmiQmgWMZh5vDP9nswcQz
…llback, memory leaks - Fix socket error type mismatch: withErrorHandler was emitting an object but ServerToClientEvents types it as string, causing '[object Object]' in toasts - Fix voting double-execution race: set gameState='RESULTS' immediately in calculateResults() before async work to prevent concurrent calls - Fix DB fallback bug: when Firestore fails, update useFirestore flag so getDatabase() returns the JSON adapter instead of the broken Firestore one - Fix countdown race condition: update gameStateRef immediately in useJoinSocket to prevent duplicate countdown intervals on rapid reconnect - Fix memory leaks: add cleanup for spectatorMessageCooldowns in periodic cleanup, add cleanupRoomTwists() called on room deletion/expiration - Fix double haptic: remove redundant navigator.vibrate alongside successHaptic - Use DISCONNECT_GRACE_PERIOD and MAX_PLAYERS constants instead of inline values - Move @types/* and autoprefixer to devDependencies - Fix ts-jest version: bump to ^30.0.0 to match jest ^30.2.0 https://claude.ai/code/session_01CpmiQmgWMZh5vDP9nswcQz
- Create server/routes/ modules for Stripe, Auth, Apple, and API routes - Create server/socket/helpers.ts with shared helpers (validateRoom, requireRoomMember, requireHost, isAdminSocket, findPlayerBySocketId, deductCreditOrReject) - Replace 3x duplicated advanceLine closures with startTeleprompterSync calls - Replace 2x duplicated credit-gate logic with deductCreditOrReject helper - Remove ~750 lines of inline route code from server.ts (2655 -> 1906 lines) https://claude.ai/code/session_01CpmiQmgWMZh5vDP9nswcQz
…limiting - Add graceful shutdown handler (SIGTERM/SIGINT): persists room state to DB, notifies connected clients, and closes connections before exiting - Add 2-minute timeout on Anthropic API streaming to prevent indefinite hangs - Add 60-second voting timeout to auto-resolve results if a player disconnects mid-vote (prevents permanently stuck games) - Add rate limiting (5 req/15min per IP) to Twilio SMS endpoints to prevent abuse and cost overruns - Add VOTING_TIMEOUT constant to constants.ts https://claude.ai/code/session_01CpmiQmgWMZh5vDP9nswcQz
…est versions - Add voting.service tests: vote counting, race condition guard, audience highlights - Add audience.service tests: reactions, cooldowns, spectator messages, plot twists - Add socket/helpers tests: validateRoom, requireHost, findPlayerBySocketId - Add DB adapter test: fallback logic, exports - Fix Jest/ts-jest version mismatch: downgrade to jest@29.7.0 + ts-jest@29.4.6 (ts-jest 30.x does not exist yet) - Fix jest.config.js: add transformIgnorePatterns for ESM uuid module - Test count: 7 suites -> 11 suites, 89 tests -> 119 tests (30 new tests) https://claude.ai/code/session_01CpmiQmgWMZh5vDP9nswcQz
- Create useReducedMotion hook with useMotionPrefs helper for consistent reduced-motion handling across components - Add BUTTON animation presets to centralized animations module - Replace inline animation props in host/page.tsx and join/page.tsx with centralized variants (fade, scaleIn) from lib/animations.ts - Make countdown animation respect prefers-reduced-motion preference - Spinning connection indicator uses reduced motion when appropriate https://claude.ai/code/session_01CpmiQmgWMZh5vDP9nswcQz
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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
Updated
CLAUDE.mdwith comprehensive documentation of the project's architecture, tech stack, and codebase structure. This reflects the current state of the application including recent additions like Anthropic Claude integration, Capacitor mobile support, testing infrastructure, and detailed service layer organization.Key Changes
claude-sonnet-4-5-20250929), added Google Gemini for image generation, Tailwind CSS v4, Capacitor for mobile, and Jest testing frameworkserver.ts) running Express + Socket.IO alongside Next.js, including middleware and service layer organization__tests__/unit/directory structure.env.examplereference with key variables documentedNotable Details
useRefto prevent stale closures@/*maps to project root)https://claude.ai/code/session_01CpmiQmgWMZh5vDP9nswcQz