# Repository Guidelines ## Project Structure & Module Organization This repository is a Bun-based Remotion rendering service. Remotion entry points and React compositions live in `src/`: `src/index.ts` registers compositions, `src/components/` contains video UI, `src/hooks/` contains render helpers, `src/themes/` stores caption CSS themes, and `src/types/` holds shared TypeScript declarations. The HTTP API, queue, rendering, webhook, and S3 integrations live under `server/`, with schemas in `server/types/` and service logic in `server/services/`. Static assets belong in `public/`. Runtime configuration examples are in `.env.example`; Docker deployment files are `Dockerfile`, `docker-compose.yml`, and `docker-compose.compute.yml`. ## Build, Test, and Development Commands - `bun install` installs dependencies using `bun.lock`. - `bun run dev` starts Remotion Studio for composition work. - `bun run server` starts the Elysia API and BullMQ render worker. - `bun run build` bundles the Remotion project. - `bun run render` renders a composition via the Remotion CLI. - `bun run lint` runs ESLint on `src/` and TypeScript checks with `tsc`. - `docker compose up --build remotion` runs the local containerized service; create `.env` from `.env.example` first. ## Coding Style & Naming Conventions Use strict TypeScript, 2-space indentation, semicolons, and double quotes, matching the existing code. Prefer path aliases from `tsconfig.json`: `@/*` for `src`, `@/public/*` for assets, and `@/srv/*` for server modules. Name React components in PascalCase, hooks as `useThing`, schemas as `ThingSchema`, and server service files in snake_case such as `render_video.ts`. ## Testing Guidelines There is no dedicated test suite yet. Before submitting changes, run `bun run lint` and perform a focused smoke test for touched behavior: Remotion changes through `bun run dev` or `bun run render`, API changes through `bun run server` plus `/api/health` and relevant `/api/render` requests. Add tests alongside new test infrastructure if introduced, and document the command in `package.json`. ## Commit & Pull Request Guidelines The current history is minimal and uses short summaries such as `initial commit`; keep commits concise, present-tense, and scoped. PRs should include a clear description, linked issue or task when available, configuration changes, verification commands, and screenshots or sample output for visual rendering changes. ## Security & Configuration Tips Never commit real `.env` values, S3 credentials, Redis URLs, or generated render outputs. Keep `.env.example` updated when adding required environment variables. When answering library, framework, SDK, API, CLI, or cloud-service questions for this repo, fetch current documentation through Context7 first.