How hhhaan/firstcrack works
First Crack is a desktop roastery-management app. Its central workflow is to connect a roaster, capture a live roast and profile, save and review the session, and manage resulting inventory and production plans. The product also covers cupping, pricing, and sales-channel orders. The frontend, Tauri shell, Python hardware sidecar, Supabase backend, and R2 profile storage are documented; detailed implementation links beyond the excerpts are shown only where documented or evidenced.
Main entry points: App.tsx Application shell · ActiveRoast.tsx Live roast workspace · main.py Sidecar HTTP API · useSidecarPolling.ts Sidecar polling
Components 20
Desktop app
- Application shell
src/App.tsx - Authentication
src/features/auth - Desktop runtime
src-tauri/src/lib.rs
Roast operations
- Live roast workspace
src/views/active-roast/ActiveRoast.tsx - Sidecar polling
src/views/active-roast/model/useSidecarPolling.ts - Roast capture and save
src/features/active-roast - Roast history
src/views/history - Roast profiles
src/entities/roast-profile
Roastery operations
- Bean inventory
src/entities/bean - Production planning
src/views/schedule - Orders and channels
src/views/orders - Cupping
src/views/cupping - Pricing
src/views/pricing
Hardware integration
- Sidecar HTTP API
src-tauri/sidecar/main.py - Roaster manager
src-tauri/sidecar/manager.py - Roaster adapters
src-tauri/sidecar/adapters
Backend services
- Supabase backend
- Backend functions
supabase/functions - Cloudflare R2
Other components
- Roastery staff
Connections 20
- Roastery staff → Application shell: uses
README.md - Application shell → Authentication: starts sign-in
src/App.tsx - Application shell → Live roast workspace: routes to
src/App.tsx - Roastery staff → Live roast workspace: records roast
README.md - Live roast workspace → Sidecar polling: polls hardware
- Sidecar polling → Sidecar HTTP API: requests status
- Sidecar HTTP API → Roaster manager: dispatches requests
src-tauri/sidecar/main.py - Roaster manager → Roaster adapters: uses drivers
src-tauri/sidecar/manager.py - Live roast workspace → Roast capture and save: captures session
- Roast capture and save → Roast history: saves records
README.md - Roast history → Roast profiles: uses profiles
- Roastery staff → Bean inventory: manages stock
README.md - Roastery staff → Production planning: plans production
README.md - Roastery staff → Orders and channels: manages orders
README.md - Roastery staff → Cupping: records cuppings
README.md - Roastery staff → Pricing: calculates pricing
- Desktop runtime → Sidecar HTTP API: launches sidecar
src-tauri/src/lib.rs - Application shell → Supabase backend: uses backend
README.md - Supabase backend → Backend functions: provides functions
README.md - Roast profiles → Cloudflare R2: stores profiles
README.md