diff --git a/CLAUDE.md b/CLAUDE.md index d2086efa..7fc95705 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -72,3 +72,6 @@ npm install && npm run dev - Status: green/blue/yellow/red - Charts: Custom SVG, CSS Grid for layouts - No emojis in UI + +## Code Style +- Always document non-obvious logic changes with comments diff --git a/architecture.html b/architecture.html new file mode 100644 index 00000000..393a101d --- /dev/null +++ b/architecture.html @@ -0,0 +1,543 @@ + + +
+ + +A full-stack demo of a factory inventory management system. Vue 3 single-page client communicates with a FastAPI service over a small REST surface; data is mocked in JSON files and loaded into memory at startup.
+ +| Method | Endpoint | Purpose | Filters |
|---|---|---|---|
| GET | /api/inventory | List SKUs across warehouses | warehouse, category |
| GET | /api/inventory/{id} | Single inventory item | — |
| GET | /api/orders | Customer orders | warehouse, category, status, month |
| GET | /api/orders/{id} | Single order | — |
| GET | /api/demand | Demand forecasts | — |
| GET | /api/backlog | Unfulfilled items with PO status | — |
| GET | /api/dashboard/summary | Aggregated KPIs for landing page | all |
| GET | /api/spending/summary | Total procurement, ops, labor, overhead | — |
| GET | /api/spending/monthly | Month-by-month cost breakdown | — |
| GET | /api/spending/categories | Cost distribution by category | — |
| GET | /api/spending/transactions | Recent transactions | — |
| GET | /api/reports/quarterly | Q1–Q4 2025 performance | — |
| GET | /api/reports/monthly-trends | Month-over-month trends | — |
KPIs, inventory overview, order metrics, revenue tracking.
+Warehouse stock, SKU details, reorder points, locations.
+Order status, customers, delivery tracking, date / status filters.
+Forecasts, trend analysis, forecasted vs current demand per SKU.
+Cost analytics, monthly and category breakdowns, transactions.
+Quarterly performance summaries and monthly trend reports.
+Shared filter state lives in a singleton composable (useFilters). Each view manages its own loading / error / data refs. Derived data uses computed properties.
+FastAPI receives query params, filters Python lists with apply_filters / filter_by_month, and returns the trimmed result. Quarters (Q1–Q4) are mapped to month sets server-side.
+Every endpoint declares a Pydantic response model. Changing a JSON field requires updating the model in main.py, otherwise responses fail validation.
+| Order # | +Submitted | +Items | +Total Cost | +Lead Time | +Expected Delivery | +Status | +
|---|---|---|---|---|---|---|
| {{ order.order_number }} | +{{ formatDate(order.submitted_date) }} | +
+
+
+ {{ order.total_items }} item{{ order.total_items === 1 ? '' : 's' }}+
+
+
+ {{ translateProductName(item.name) }}
+
+
+ |
+ {{ currencySymbol }}{{ order.total_cost.toLocaleString() }} | +{{ order.max_lead_time_days }} days | +{{ formatDate(order.expected_delivery) }} | +Submitted | +
Set your budget and we'll recommend items to restock — items below reorder point first, then those with increasing demand.
+| SKU | +Product | +Category | +Warehouse | +Stock (curr / reorder) | +Qty to Order | +Unit Cost | +Line Cost | +Reason | +
|---|---|---|---|---|---|---|---|---|
| {{ item.sku }} | +{{ translateProductName(item.name) }} | +{{ item.category }} | +{{ item.warehouse }} | ++ {{ item.current_quantity }} + / + {{ item.reorder_point }} + | +{{ item.quantity_to_order }} | +{{ currencySymbol }}{{ item.unit_cost.toFixed(2) }} | +{{ formatCurrency(item.line_cost) }} | ++ + {{ item.reason === 'below_reorder_point' ? 'Below reorder' : 'Trend up' }} + + | +
View it in the Orders tab under Submitted Restocking Orders.
+ +