diff --git a/architecture.html b/architecture.html new file mode 100644 index 00000000..d5f76101 --- /dev/null +++ b/architecture.html @@ -0,0 +1,746 @@ + + +
+ + +System architecture, tech stack, and data flow reference
+<script setup>, Reactivitylocalhost:8001/apiFilterBar.vue dropdowns are bound to reactive refs in useFilters.js — changing any filter updates shared state instantly.watch()es the filter composable. On change it calls getCurrentFilters() to build { warehouse, category, status, month }.api.getOrders({ warehouse: "Tokyo", status: "shipped", month: "2025-03" }) — Axios serializes the object as query params.apply_filters(items, warehouse, category, status) then filter_by_month() if month param present.List[Order]) validates each item before serialization. Invalid fields raise 422 automatically.ref() (e.g. allOrders). Derived stats live in computed() properties — recomputed automatically when raw data changes.useFilters.js as shared reactive state.
+ FilterBar.vue renders them; views watch them and re-fetch on change. Backend applies them in order: warehouse → category → status → month.
+ /api/spending/transactions[]| Order # | +Order Date | +Items | +Status | +Est. Delivery | +Lead Time | +Total Cost | +
|---|---|---|---|---|---|---|
| {{ order.order_number }} | +{{ formatDate(order.order_date) }} | +
+
+
+ {{ order.items.length }} items+
+
+
+ {{ item.item_name }}
+
+
+ |
+ + {{ order.status }} + | +{{ formatDate(order.estimated_delivery) }} | +{{ order.lead_time_days }} days | +${{ order.total_cost.toLocaleString('en-US', { minimumFractionDigits: 2, maximumFractionDigits: 2 }) }} | +
Allocate your budget across forecasted demand to build a restocking order.
+| + | Priority | +Item Name | +SKU | +Trend | +Forecast Qty | +Unit Cost | +Total Cost | +
|---|---|---|---|---|---|---|---|
| + + | ++ + {{ capitalize(item.priority) }} + + | +{{ item.item_name }} | +{{ item.sku }} | ++ + {{ capitalize(item.trend) }} + + | +{{ item.recommended_quantity.toLocaleString() }} | +{{ formatCurrency(item.unit_cost) }} | +{{ formatCurrency(item.total_cost) }} | +