How veeviiiii/parchi works
Parchi turns pasted WhatsApp chats into grouped, priced orders and printable bills, and provides Crowdmind, a role-based community feed for stock, offers, order calls, and quotes. The main flow is chat parsing, per-message Gemma interpretation, validated aggregation, organiser pricing, and bill creation. Crowdmind separately checks and moderates posts before storing them. Source excerpts support key calls; several page and domain links are documented in the README or SOURCE INDEX rather than shown in full.
Main entry points: Builder.tsx Order builder · route.ts Crowdmind posts API · checkPost.ts Post checking · gemmaJson.ts Gemma JSON validation
Components 27
Order building
- Order builder
components/Builder.tsx - Chat parser
lib/parseChat.ts - Message API
app/api/parse/route.ts - Message reader
lib/readMessage.ts - Gemma JSON validation
lib/gemmaJson.ts - Order schema and guards
lib/schema.ts - Order aggregation
lib/aggregate.ts - Gemma client
lib/gemma.ts
Pricing and bills
- Pricing and owing
lib/money.ts - Bill generation
lib/bill.ts - Browser bill storage
lib/billStore.ts - Printable bill
app/bill/[id]/page.tsx
Crowdmind
- Crowdmind feed
app/crowdmind/page.tsx - Crowdmind posts API
app/api/crowdmind/posts/route.ts - Post checking
lib/crowdmind/checkPost.ts - Post prompt
lib/crowdmind/prompt.ts - Post schema and guards
lib/crowdmind/schema.ts - Post storage
lib/crowdmind/store.ts
Roles and interface
- Role permissions
lib/roles.ts - Browser profile
lib/profile.ts - Role selection
app/start/page.tsx - App navigation
components/AppHeader.tsx - Themes and language
components/Menus.tsx - Landing page
app/page.tsx
Other components
- Organizer
- Gemini API
- Supabase
Connections 30
- Organizer → Order builder: enters chat
README.md - Order builder → Chat parser: parses chat
components/Builder.tsx - Order builder → Message API: requests message reads
README.md - Message API → Message reader: calls reader
app/api/parse/route.ts - Message reader → Gemma JSON validation: validates response
lib/readMessage.ts - Gemma JSON validation → Order schema and guards: checks schema
lib/gemmaJson.ts - Gemma JSON validation → Gemma client: requests generation
lib/gemmaJson.ts - Gemma client → Gemini API: calls model
README.md - Order builder → Order aggregation: groups reads
components/Builder.tsx - Order aggregation → Order schema and guards: uses result type
lib/aggregate.ts - Order builder → Pricing and owing: calculates totals
components/Builder.tsx - Order builder → Bill generation: builds bill
components/Builder.tsx - Bill generation → Order aggregation: uses order groups
lib/bill.ts - Bill generation → Pricing and owing: uses prices
lib/bill.ts - Order builder → Browser bill storage: saves bill
components/Builder.tsx - Printable bill → Browser bill storage: loads bill
app/bill/[id]/page.tsx - Printable bill → Bill generation: formats bill
app/bill/[id]/page.tsx - Crowdmind feed → Crowdmind posts API: fetches and posts
app/crowdmind/page.tsx - Crowdmind feed → Role permissions: chooses spaces
app/crowdmind/page.tsx - Crowdmind posts API → Post checking: checks submission
app/api/crowdmind/posts/route.ts - Post checking → Post prompt: uses prompt
lib/crowdmind/checkPost.ts - Post checking → Gemma JSON validation: validates model output
lib/crowdmind/checkPost.ts - Post checking → Post schema and guards: applies guards
lib/crowdmind/checkPost.ts - Crowdmind posts API → Post storage: reads and writes posts
app/api/crowdmind/posts/route.ts - Post storage → Supabase: persists when configured
lib/crowdmind/store.ts - Crowdmind posts API → Role permissions: checks permissions
app/api/crowdmind/posts/route.ts - Role selection → Browser profile: saves profile
app/start/page.tsx - App navigation → Browser profile: reads profile
components/AppHeader.tsx - App navigation → Themes and language: renders theme menu
components/AppHeader.tsx - Landing page → Themes and language: renders menus
app/page.tsx