How thistlelonious/dashboard works
coinvoice is an offline-capable craft-business app for pricing projects, tracking stock, and handling customer documents. The main workflow starts at Home, where a user creates a project, then uses Price to calculate its labor and price; Stock records purchases and adjustments. App parses hash routes and dispatches screens. Sampled code confirms project and inventory screens read or write through the store; invoice, document, print, item, and setup screens are present in the tree but their internal workflows were not sampled. The README is empty, so those branches are limited to documented-by-route capabilities.
Main entry points: App.tsx App shell · PriceScreen.tsx Price calculator screen · main.tsx Application entry · StockScreen.tsx Stock screen
Components 25
App screens
- App shell
src/App.tsx - Hash routes
src/routes.ts - Home and projects
src/screens/Home/HomeScreen.tsx - Price calculator screen
src/screens/Price/PriceScreen.tsx - Project build
- Stock screen
src/screens/Stock/StockScreen.tsx - Inventory item
src/screens/Item/ItemScreen.tsx - Invoices screen
src/screens/Invoices/InvoicesScreen.tsx - Customer document
src/screens/Document/DocumentScreen.tsx - Document printing
src/screens/Print/PrintScreen.tsx - Setup screen
src/screens/Setup/SetupScreen.tsx
Business logic
- Calculator logic
src/screens/Price/calculator.ts - Pricing engine
src/pricing/pricing.ts - Craft domains
src/pricing/domains/index.ts - Fee presets
src/pricing/fees.ts - Stock ledger
src/inventory/ledger.ts - Unit conversion
src/inventory/units.ts
Local data
- Application store
src/storage/store.ts - IndexedDB schema
src/storage/db.ts - Backup handling
src/storage/backup.ts - Storage persistence
src/storage/persistence.ts
Offline runtime
- Application entry
src/main.tsx - Offline support
src/offline.ts - Theme and controls
src/design/sewandso/bundle.js
Other components
- Craft business user
Connections 25
- Craft business user → App shell: uses
- App shell → Hash routes: parses route
- App shell → Home and projects: dispatches
- App shell → Price calculator screen: dispatches
- App shell → Project build: dispatches
- App shell → Stock screen: dispatches
- App shell → Inventory item: dispatches
- App shell → Invoices screen: dispatches
- App shell → Customer document: dispatches
- App shell → Document printing: dispatches
- App shell → Setup screen: dispatches
- Home and projects → Application store: reads and creates projects
- Price calculator screen → Application store: reads and updates projects
- Price calculator screen → Calculator logic: calculates
- Price calculator screen → Craft domains: selects craft
- Price calculator screen → Fee presets: selects fees
- Stock screen → Application store: reads and records stock
- Stock screen → Stock ledger: replays inventory
- Stock screen → Unit conversion: uses units
- App shell → Backup handling: checks reminder
- Application entry → App shell: renders
- Application entry → Offline support: enables offline
- Application entry → Storage persistence: keeps storage
- Application entry → Theme and controls: restores theme
- App shell → Theme and controls: hydrates controls