How ernesthdj/artisastock-v2 works
Artisastock is a multi-tenant bakery operations application spanning ingredient purchasing and stock, recipe/BOM production, product management, point-of-sale, and an online storefront. The principal operational flow is purchasing ingredients, defining producible BOM sheets, publishing products, and selling them through POS or the storefront; sales and payment events update operational records. The tree also shows team access, CMS, invoicing, and dashboard capabilities. The README is empty, and sampled source is limited, so links between unsampled screens and API routes are not inferred.
Main entry points: prisma.ts Tenant data · stripe/route.ts Stripe webhook · sheets/route.ts BOM sheets API · products/route.ts Products API
Components 26
Operations UI
- Operations pages
src/app/[locale]/(dashboard)/dashboard/page.tsx - Team settings
src/app/[locale]/(dashboard)/settings/team/page.tsx - Storefront CMS
src/app/[locale]/(dashboard)/cms/page.tsx - CMS pages API
src/app/api/v1/cms/pages/route.ts - Team API
src/app/api/v1/users/route.ts
Inventory
- Purchases API
src/app/api/v1/achats/route.ts - Ingredients API
src/app/api/v1/ingredients/route.ts - Stock views
src/app/[locale]/(dashboard)/vue-stock/page.tsx - Suppliers API
src/app/api/v1/suppliers/route.ts
Production
- Recipes API
src/app/api/v1/recipes/route.ts - BOM sheets API
src/app/api/v1/bom/sheets/route.ts - BOM costing
src/lib/bom/cost.ts - FIFO production stock
src/lib/bom/fifo.ts
Sales Channels
- Products API
src/app/api/v1/products/route.ts - POS sales API
src/app/api/v1/pos/sales/route.ts - Online storefront
src/app/storefront/[tenantSlug]/catalog/page.tsx - Storefront checkout
src/app/api/storefront/[tenantSlug]/checkout/route.ts - Stripe webhook
src/app/api/webhooks/stripe/route.ts - Orders API
src/app/api/v1/orders/route.ts
Application Services
- Tenant data
src/lib/prisma.ts - Price calculations
src/lib/costs.ts - Channel stock helper
src/lib/products/channel-stock.ts - Stripe integration
src/lib/stripe.ts - Email service
src/lib/email.ts
Other components
- Staff user
- Stripe
Connections 32
- Staff user → Operations pages: uses
- Staff user → Online storefront: shops
- Purchases API → Tenant data: reads/writes
- Purchases API → Ingredients API: updates stock
- Ingredients API → Tenant data: reads/writes
- Suppliers API → Tenant data: reads/writes
- Stock views → Staff user: shows stock
- Recipes API → Tenant data: reads/writes
- Recipes API → Price calculations: calculates cost
- BOM sheets API → Tenant data: reads/writes
- BOM sheets API → FIFO production stock: checks availability
- BOM sheets API → BOM costing: calculates cost
- Products API → Tenant data: reads/writes
- Products API → FIFO production stock: checks availability
- Products API → Price calculations: calculates price
- POS sales API → Tenant data: reads/writes
- POS sales API → BOM costing: calculates cost
- POS sales API → FIFO production stock: consumes FIFO
- Online storefront → Storefront checkout: submits checkout
- Storefront checkout → Stripe: creates payment
- Stripe → Stripe webhook: sends events
- Stripe webhook → Stripe integration: verifies event
- Stripe webhook → Tenant data: reads/writes
- Stripe webhook → Price calculations: generates order number
- Stripe webhook → Channel stock helper: consumes channel stock
- Stripe webhook → Email service: sends confirmation
- Orders API → Tenant data: reads/writes
- Storefront CMS → CMS pages API: manages pages
- CMS pages API → Tenant data: reads/writes
- Team settings → Team API: manages team
- Team API → Tenant data: reads/writes
- Team API → Email service: sends invitation