diff --git a/.claude/settings.local.json b/.claude/settings.local.json new file mode 100644 index 00000000..1827fd8e --- /dev/null +++ b/.claude/settings.local.json @@ -0,0 +1,10 @@ +{ + "permissions": { + "allow": [ + "Bash(lsof -ti:3000,8001)", + "Bash(xargs kill:*)", + "Bash(netstat -ano)", + "Bash(taskkill /F /PID 40304)" + ] + } +} diff --git a/CLAUDE.md b/CLAUDE.md index d2086efa..a3cc558e 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -23,6 +23,9 @@ Use the Task tool with these specialized subagents for appropriate tasks: - **ALWAYS use Playwright MCP tools** (`mcp__playwright__*`) for browser testing - Test against: `http://localhost:3000` (frontend), `http://localhost:8001` (API) +### Code Quality +- **Always document non-obvious logic changes with comments** + ## Stack - **Frontend**: Vue 3 + Composition API + Vite (port 3000) - **Backend**: Python FastAPI (port 8001) diff --git a/architecture.html b/architecture.html new file mode 100644 index 00000000..7f7bf1b1 --- /dev/null +++ b/architecture.html @@ -0,0 +1,716 @@ + + +
+ + +Complete System Architecture & Technical Documentation
++ A modern, full-stack inventory management system featuring real-time data filtering, + comprehensive reporting, and demand forecasting. Built with Vue 3 on the frontend and + Python FastAPI on the backend, with in-memory JSON data storage optimized for rapid prototyping and demo scenarios. +
+ +Vue 3 with Composition API - Modern reactive component framework
+Vite - Lightning-fast build tool and dev server
+Axios - HTTP client for API communication
+Vue Router - Client-side routing
+CSS Grid & Flexbox - Responsive layouts
+FastAPI - High-performance async Python web framework
+Pydantic - Data validation and serialization
+Uvicorn - ASGI application server
+JSON Files - In-memory data storage
+pytest - Testing framework
+All endpoints are prefixed with /api/
| Endpoint | +Method | +Filters Supported | +Returns | +
|---|---|---|---|
| /inventory | +GET | +warehouse, category | +List of inventory items | +
| /inventory/{id} | +GET | +— | +Single inventory item | +
| /orders | +GET | +warehouse, category, status, month | +List of orders | +
| /orders/{id} | +GET | +— | +Single order | +
| /dashboard/summary | +GET | +warehouse, category, status, month | +Dashboard KPIs | +
| /demand | +GET | +— | +Demand forecasts | +
| /backlog | +GET | +— | +Backlog items | +
| /spending/* | +GET | +— | +Financial data | +
| /reports/* | +GET | +— | +Quarterly & monthly reports | +
+ Four filters are managed centrally via useFilters composable and applied to
+ compatible endpoints via query parameters.
+
Filters orders by month/quarter. Format: 2025-01 or Q1-2025
Supported endpoints: /orders, /dashboard/summary
Filters by storage location: San Francisco, Boston, Chicago
+Supported endpoints: /inventory, /orders, /dashboard/summary
Filters by product category: Circuit Boards, Sensors, Power Supplies
+Supported endpoints: /inventory, /orders, /dashboard/summary
Filters orders by status: Delivered, Processing, Backordered, Shipped
+Supported endpoints: /orders, /dashboard/summary
Real-time KPI cards showing inventory value, low stock alerts, pending orders, and backlog status. Responsive to all four filters.
+Browse all SKUs by warehouse with detailed information. Warehouse and category filters. Detail modals with reorder recommendations.
+Track customer orders with status lifecycle (Delivered, Processing, Backordered, Shipped). Monthly breakdown and fulfillment metrics.
+Analyze current vs. forecasted demand with trend indicators (Up, Down, Stable). Global view across all items.
+Monitor delayed items with priority levels (Critical, High, Medium). Create and track purchase orders for backlog resolution.
+Monthly spending trends, category breakdown, transaction history, and budget vs. actual performance tracking.
+Port: 3000 (or next available)
+Command: cd client && npm run dev
URL: http://localhost:3000
Port: 8001
+Command: cd server && python main.py
Docs: http://localhost:8001/docs
{{ t('orders.description') }}
+ +| Order Number | +Items | +Status | +Order Date | +Expected Delivery | +Total Value | +
|---|---|---|---|---|---|
| {{ rOrder.order_number }} | +
+
+
+ + {{ rOrder.items.length }} item{{ rOrder.items.length !== 1 ? 's' : '' }} ++
+
+
+ {{ item.name }}
+
+
+ |
+ + Processing + | +{{ formatDate(rOrder.order_date) }} | +{{ formatDate(rOrder.expected_delivery) }} | +{{ currencySymbol }}{{ Number(rOrder.total_value).toLocaleString() }} | +
View quarterly performance metrics and monthly trends
+{{ t('reports.description') }}
| Quarter | -Total Orders | -Total Revenue | -Avg Order Value | -Fulfillment Rate | +{{ t('reports.quarterly.quarter') }} | +{{ t('reports.quarterly.totalOrders') }} | +{{ t('reports.quarterly.totalRevenue') }} | +{{ t('reports.quarterly.avgOrderValue') }} | +{{ t('reports.quarterly.fulfillmentRate') }} |
|---|---|---|---|---|---|---|---|---|---|
| {{ q.quarter }} | {{ q.total_orders }} | -${{ formatNumber(q.total_revenue) }} | -${{ formatNumber(q.avg_order_value) }} | +{{ formatCurrency(q.total_revenue) }} | +{{ formatCurrency(q.avg_order_value) }} |
{{ q.fulfillment_rate }}%
@@ -44,16 +44,16 @@
-
Monthly Revenue Trend+{{ t('reports.monthlyTrend.title') }} |