System Architecture
+REST API +
reads +
Tech Stack
+Data Flow
+User selects filters
+FilterBar.vue updates shared state in useFilters() composable — selectedPeriod, selectedLocation, selectedCategory, selectedStatus.
Vue view reacts & calls API
+Each view watches filter state. On change, it calls the relevant function in client/src/api.js, mapping filter values to query parameters (warehouse, category, status, month).
Axios sends HTTP request
+e.g. GET http://localhost:8001/api/orders?category=Sensors&month=2025-01
FastAPI filters in memory
+apply_filters() narrows by warehouse, category, status. filter_by_month() handles month strings (2025-01) and quarter strings (Q1-2025).
Pydantic serialises response
+Filtered Python dicts are validated and serialised into JSON by Pydantic v2 models before being returned.
+Vue renders computed data
+Raw data stored in ref() variables (allOrders, inventoryItems). Derived values (totals, percentages, chart data) live in computed() properties and update automatically.
Pages & Views
+ +Global Filter System
+Time Period
+ +Warehouse / Location
+ +Category
+ +Order Status
+ +useFilters.js (singleton composable). All views watch this state and re-fetch on change. Query params map as: selectedLocation → warehouse, selectedPeriod → month.
+