❯ cat /work/be-all.case
Be All
Hybrid learning + commerce platform — courses, webinars, physical and digital products, one checkout
stack: Next.js 14 · MySQL · Prisma · Stripe · Clerk · Claude API
situation
A Spanish-language education business needed to sell what most platforms force you to split across three tools: video courses, live webinars, and physical and digital products — plus handle Mexican-market payments, refunds and shipping. The usual answer is an LMS glued to a store glued to an events tool, with three checkouts and three admin panels. The brief was one platform, one checkout, one back office.
evidence
- Exhibit 1
- 31 Prisma models
courses with chapters and progress, webinars with capacity and early-bird pricing, products with inventory, unified orders
- Exhibit 2
- 84 API routes
covering 16+ feature domains: checkout, refunds, coupons, analytics, shipping, notifications, admin
- Exhibit 3
- three purchase lifecycles
a course, a webinar seat and a t-shirt sell, refund and account differently — but the business needs one ledger of orders
diagnosis
Hybrid commerce fails when each vertical grows its own purchase pipeline: refunds and reporting fragment until nobody can answer 'how much did we sell this month'. The architecture had to share an order, refund and coupon core across verticals while letting each keep its domain logic — progress tracking for courses, capacity for webinars, inventory for physical goods.
intervention
- 01
Unified order system over Stripe Checkout with webhook-driven fulfillment: courses unlock, digital products deliver, physical orders enter shipping — all from one payment event.
- 02
Refund engine with a real state machine (pending → review → approved → processing → completed), a configurable auto-approval policy service, per-state audit log, and webinar seat release on refund.
- 03
Coupon system supporting percentage, fixed-amount and free-shipping discounts with per-user limits, category targeting and a full usage audit trail (original price, final price, IP).
- 04
LMS core: chaptered video courses with per-user progress; webinars with early-bird windows, attendee caps and reschedule notifications; product reviews with approval workflow.
- 05
AI analytics consultant: a Claude-powered dashboard that reads 30-day revenue, refund and category metrics and answers questions about them, with Excel and PDF report export.
- 06
Transactional email flows for every purchase type, plus admin dashboards for orders, refunds and team management.
outcome · verified
- Exhibit 1
- 1 checkout
for three product verticals with different fulfillment and refund rules
- Exhibit 2
- auto-resolved refunds
policy engine approves routine cases; humans only see the exceptions
- Exhibit 3
- in production
live at beallfam.com serving a Spanish-speaking market