Skip to content

docs: Add PRD and implementation plan for Product & Variant Sales Statistics#176

Open
mnindrazaka wants to merge 1 commit into
mainfrom
claude/peaceful-albattani-cdf37u
Open

docs: Add PRD and implementation plan for Product & Variant Sales Statistics#176
mnindrazaka wants to merge 1 commit into
mainfrom
claude/peaceful-albattani-cdf37u

Conversation

@mnindrazaka

Copy link
Copy Markdown
Collaborator

Summary

This PR adds comprehensive product requirements documentation and a phased implementation plan for a new Sales Statistics feature that enables cafe owners to analyze product and variant sales performance.

Changes

  • New document: docs/prd-product-variant-sales-statistics.md containing:
    • Part A (PRD): Problem statement, proposed solution, and feature requirements for a sales analytics feature that answers three owner questions:
      1. Which variants to remove (variant-level comparison)
      2. What sells best across the menu (product and variant ranking)
      3. When items are purchased (time-series trends)
    • Part B (Implementation Plan): Nine phased, independently shippable PRs ordered from backend aggregation queries through frontend UI to mobile parity

Key Details

The feature design leverages existing schema (no migrations required) and follows established patterns:

  • Backend: Four new read-only endpoints (GET /variants/statistics, /products/statistics, and timeseries variants) aggregating transaction_items data with metrics (quantity, revenue, transaction count, and computed shares)
  • Frontend: New Sales Statistics screen with ranked tables, share bar charts, date-range filtering, and drill-down time-series visualization
  • Architecture: Mirrors the existing TransactionStatistic vertical slice (entity → repository → usecase → handler → presenter → view)
  • Scope: Pure aggregation over existing data; no schema changes, no breaking changes

The plan includes 13 confirmed product decisions, 10 feature requirements, a risk register, and estimated effort (~10.5 working days for a single engineer).

https://claude.ai/code/session_01MSj2BdBXakBGomovtY46NR

Add a PRD + phased implementation plan for ranking and trend analytics
over products and variants (quantity sold, revenue, share %, and a
"when purchased" time-series), so the owner can decide what to keep,
what to cut, and when to stock it.

The doc follows the existing two-part PRD format and the established
/transactions/statistics vertical slice, and is grounded in the current
schema (no migration required). Each implementation phase is scoped to
one small, reviewable PR.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MSj2BdBXakBGomovtY46NR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants