How upc-hub/inventory-sync works
This is a bicycle and motorbike shop inventory app. A shop user logs in, browses and filters stock by vehicle and part section, then adds, edits, sells, or deletes items; the app also shows stock levels and can generate Burmese item descriptions with Gemini. App.tsx owns inventory state and API requests, while the modal and cards provide the main interaction surfaces. The excerpts show the API calls but not their exact endpoint or server implementation; the README gives no additional product capability details.
Main entry points: App.tsx Inventory state · AddItemModal.tsx Item editor · InventoryCard.tsx Inventory card · LoginScreen.tsx Login screen
Components 12
Inventory app
- Inventory state
App.tsx - Burmese numbers
utils.ts - Inventory types
types.ts
User interface
- Login screen
components/LoginScreen.tsx - Bike selector
components/BikeVisual.tsx - Inventory card
components/InventoryCard.tsx - Item editor
components/AddItemModal.tsx
AI assistance
- Description generator
services/geminiService.ts
Inventory persistence
- Inventory API
- Inventory data
db.json
Other components
- Shop user
- Google Gemini
Connections 17
- Shop user → Login screen: enters credentials
components/LoginScreen.tsx - Shop user → Inventory state: uses inventory
App.tsx - Inventory state → Login screen: renders
App.tsx - Login screen → Inventory state: submits credentials
components/LoginScreen.tsx - Inventory state → Bike selector: renders selector
App.tsx - Bike selector → Inventory state: selects section
App.tsx - Inventory state → Inventory card: renders items
App.tsx - Inventory card → Inventory state: sends item actions
App.tsx - Inventory state → Item editor: renders editor
App.tsx - Item editor → Inventory state: submits item changes
App.tsx - Item editor → Description generator: requests suggestions
components/AddItemModal.tsx - Description generator → Google Gemini: generates details
services/geminiService.ts - Inventory state → Inventory API: reads and writes stock
App.tsx - Inventory API → Inventory data: serves JSON data
- Inventory state → Burmese numbers: formats counts
App.tsx - Item editor → Burmese numbers: converts form values
components/AddItemModal.tsx - Inventory card → Burmese numbers: formats stock values
components/InventoryCard.tsx