# Agent Instructions: Rat Chat ## Architecture - **Backend**: `backend/app` (Bun, ElysiaJS, WebSockets) - **Frontend**: `frontend` (Vite, React, TypeScript) ## Commands - **Backend Dev**: `cd backend/app && bun dev` - **Backend Test**: `cd backend/app && bun test` (Run single: `bun test `) - **Type Check**: `bun x tsc --noEmit` (Run in respective package) ## Code Standards - **General**: TypeScript Strict Mode, ES Modules (`import`/`export`), `async/await`. - **Formatting**: 2-space indentation, semicolons. - **Naming**: `camelCase` for vars/funcs, `PascalCase` for Components/Types. - **Backend**: - Follow ElysiaJS patterns for routing and state. - Separate HTTP (`src/api`) and WebSocket (`src/ws`) logic. - **Frontend**: - React Functional Components + Hooks. - File structure: `src/components`, `src/hooks`.