add crush ai docs too
This commit is contained in:
parent
200d1bdfc2
commit
87469771c0
2 changed files with 58 additions and 0 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -25,3 +25,4 @@ dist-ssr
|
|||
|
||||
/target/
|
||||
recording_*
|
||||
.crush/
|
||||
|
|
|
|||
57
CRUSH.md
Normal file
57
CRUSH.md
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
# Development Commands
|
||||
|
||||
**Environment Setup:**
|
||||
```bash
|
||||
bun install # Install dependencies
|
||||
mkdir -p src-tauri/resources/models
|
||||
curl -o src-tauri/resources/models/silero_vad_v4.onnx https://blob.handy.computer/silero_vad_v4.onnx
|
||||
```
|
||||
|
||||
**Development:**
|
||||
```bash
|
||||
bun run tauri dev # Full app development
|
||||
CMAKE_POLICY_VERSION_MINIMUM=3.5 bun run tauri dev # macOS with cmake fix
|
||||
bun run dev # Frontend only (Vite)
|
||||
bun run build # Build frontend
|
||||
bun run tauri build # Production build
|
||||
```
|
||||
|
||||
**Type Check & Build:**
|
||||
```bash
|
||||
bunx tsc --noEmit # Type checking
|
||||
bun run build # Build and validate
|
||||
```
|
||||
|
||||
# Code Style Guidelines
|
||||
|
||||
**Rust (Backend):**
|
||||
- Use `anyhow::Error` for error handling with descriptive messages
|
||||
- Prefer `Arc<Mutex<T>>` for shared state in managers
|
||||
- Log with appropriate levels: `debug!`, `info!`, `eprintln!` for errors
|
||||
- Builder pattern for initialization chains
|
||||
- Snake_case for functions and variables, PascalCase for types
|
||||
- Separate logical sections with comment blocks: `/* ─────────── */`
|
||||
|
||||
**TypeScript/React (Frontend):**
|
||||
- Functional components with TypeScript interfaces
|
||||
- Zod schemas for type validation and inference
|
||||
- `useCallback` hooks for stable function references
|
||||
- Destructure props with defaults: `disabled = false`
|
||||
- Prefer interface aliases over type aliases for objects
|
||||
- React.FC for explicit component typing
|
||||
- PascalCase for components, camelCase for variables/functions
|
||||
|
||||
**Imports:**
|
||||
- Group imports: external libs, internal modules, relative imports
|
||||
- Use type imports for TypeScript: `import type { Settings }`
|
||||
- Named imports preferred over default exports
|
||||
|
||||
**Error Handling:**
|
||||
- Frontend: Try/catch with user feedback, rollback optimistic updates
|
||||
- Backend: `?` operator with anyhow context messages
|
||||
- Log errors appropriately for debugging level
|
||||
|
||||
**Component Patterns:**
|
||||
- Container component pattern for layout
|
||||
- Composition over inheritance
|
||||
- Prop drilling minimized with context where appropriate
|
||||
Loading…
Reference in a new issue