Loopndroll is a desktop app that keeps Codex chats moving after Codex stops. The app uses Electrobun for the desktop shell, Bun for the backend process, and Vite + React 19 + TypeScript for the renderer.
- TypeScript everywhere with
strictmode enabled. - Formatting and linting use
oxfmtandoxlint. - Do not disable or ignore ESLint-style
max-linesormax-lines-per-functionlimits. - Use the
@/alias for imports fromsrc. - Keep components and route models small; move shared helpers into
src/liborsrc/shared. - Prefer typed constants and narrow unions over loose strings.
src/app.tsx,src/main.tsx: renderer entry and app shell.src/pages/*: route-level UI and route-specific models.src/components/*: reusable React components.src/components/ui/*: shared shadcn/base UI primitives.src/lib/*: renderer-side helpers, hooks, RPC clients.src/shared/*: types shared between renderer and Bun.src/bun/*: Bun/Electrobun main-process code, hooks, Telegram bridge, app actions.src/bun/db/*: SQLite schema, migrations, and DB client.
- Files and folders:
kebab-case. - React components and types:
PascalCase. - Hooks:
useSomething. - Functions and variables:
camelCase. - Constants:
UPPER_SNAKE_CASE. - Route-specific state logic usually lives in
model.ts; reusable UI stays incomponents.
- Start dev mode with
pnpm dev. - Run repo checks with
pnpm check. - The renderer runs on
http://127.0.0.1:5173; the desktop/backend entry issrc/bun/index.ts. - In normal dev mode, Bun/Electrobun logs are printed to the terminal running
pnpm dev. - For hook-level persistent debug logs, run
LOOPNDROLL_ENABLE_HOOK_DEBUG_LOGS=1 pnpm dev.
- SQLite app state:
~/Library/Application Support/loopndroll/app.db - Optional hook debug log:
~/Library/Application Support/loopndroll/logs/hooks-debug.jsonl - Managed Codex hook/config files touched by the app:
~/.codex/hooks.jsonand~/.codex/config.toml