You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**NO COMMENTS**: Never add comments to code (`//`, `/* */`, `///`, `//!`, `#`, etc.). Code must be self-explanatory through naming, types, and structure. This applies to all languages (TypeScript, Rust, JavaScript, etc.).
23
24
24
25
## Testing
25
26
- TS/JS: Vitest where present (e.g., desktop). Name tests `*.test.ts(x)` near sources.
@@ -37,10 +38,15 @@
37
38
- Database flow: always `db:generate` → `db:push` before relying on new schema.
38
39
- Keep secrets out of VCS; configure via `.env` from `pnpm env-setup`.
39
40
- macOS note: desktop permissions (screen/mic) apply to the terminal running `pnpm dev:desktop`.
41
+
-**CRITICAL: NO CODE COMMENTS**: Never add any form of comments (`//`, `/* */`, `///`, `//!`, `#`, etc.) to generated or edited code. Code must be self-explanatory.
40
42
41
43
## Effect Usage
42
44
- Next.js API routes in `apps/web/app/api/*` are built with `@effect/platform`'s `HttpApi` builder; copy the existing class/group/endpoint pattern instead of ad-hoc handlers.
43
45
- Acquire backend services (e.g., `Videos`, `S3Buckets`) inside `Effect.gen` blocks and wire them through `Layer.provide`/`HttpApiBuilder.group`, translating domain errors to `HttpApiError` variants.
44
46
- Convert the effectful API to a Next.js handler with `apiToHandler(ApiLive)` from `@/lib/server` and export the returned `handler`—avoid calling `runPromise` inside route files.
45
47
- On the server, run effects through `EffectRuntime.runPromise` from `@/lib/server`, typically after `provideOptionalAuth`, so cookies and per-request context are attached automatically.
46
48
- On the client, use `useEffectQuery`/`useEffectMutation` from `@/lib/EffectRuntime`; they already bind the managed runtime and tracing so you shouldn't call `EffectRuntime.run*` directly in components.
49
+
50
+
## Code Formatting
51
+
- Always format code before completing work: run `pnpm format` for TypeScript/JavaScript and `cargo fmt` for Rust.
52
+
- Run these commands regularly during development and always at the end of a coding session to ensure consistent formatting.
Copy file name to clipboardExpand all lines: CLAUDE.md
+14-1Lines changed: 14 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -360,7 +360,12 @@ Minimize `useEffect` usage: compute during render, handle logic in event handler
360
360
- Windowing/permissions are handled in Rust; keep UI logic in Solid and avoid mixing IPC with rendering logic.
361
361
362
362
## Conventions
363
-
- No code comments: Never add inline, block, or docstring comments in any language. Code must be self-explanatory through naming, types, and structure. Use docs/READMEs for explanations when necessary.
363
+
-**CRITICAL: NO CODE COMMENTS**: Never add any form of comments to code. This includes:
-**Media Processing**: FFmpeg documentation for Rust bindings
422
+
423
+
## Code Formatting
424
+
425
+
Always format code before completing work:
426
+
-**TypeScript/JavaScript**: Run `pnpm format` to format all code with Biome
427
+
-**Rust**: Run `cargo fmt` to format all Rust code with rustfmt
428
+
429
+
These commands should be run regularly during development and always at the end of a coding session to ensure consistent formatting across the codebase.
0 commit comments