How tyumu/roamloid works
Project type and purpose
• This is a full-stack learning project whose focus is on real-time communication, authentication, 3D rendering, and AI-driven chat.
• The frontend is a React/TypeScript application built with Vite and React Three Fiber.
• The backend (in a separate Flask repo) provides REST endpoints for authentication and uses Socket.IO for real-time events.
• It integrates with an external AI service (Gemini API) for chat generation.
File structure
• Top-level directories:
• public: static assets (GLB character models and animations)
• src: application source (components, hooks, pages, routes, utils)
• test: end-to-end and static tests (REST, HTML/JS demos)
• Key config files:
• vite.config.ts & tsconfig.json (build & TS config)
• .env.example & .env.development (environment variables for API URL and CORS)
• .github/workflows/backend-ci.yml (CI for backend tests)
• Patterns:
• Component-based UI with React Three Fiber for 3D
• Custom hooks for WebSocket management and warp controls
• ProtectedRoute for guarding authenticated pages
• Utils/api.ts wrapping Axios for REST calls
README for additional insights
• Clear table of supported features (realtime connect, auth, 3D rendering, AI chat)
• API surface: HTTP endpoints under /api/auth and /api/room/devices, plus WS events (join_room, send_data, receive_data, moved_3d)
• Startup instructions illustrate two independent services (frontend on 5173, backend on 5000)
Detail without overthinking
• Every major component (UI shells, 3D renderer, REST client, WS client, API controllers, AI adapter, DB).
• How data flows end-to-end: user action → REST/WS call → backend logic → response → UI update.
• Extensibility points (where you'd swap AI service, add new WS events or new page routes).