Add POI feature and imporve the overall backend implementation

This commit is contained in:
Urtzi Alfaro
2025-11-12 15:34:10 +01:00
parent e8096cd979
commit 5783c7ed05
173 changed files with 16862 additions and 9078 deletions

View File

@@ -51,6 +51,13 @@ The **Bakery-IA Frontend Dashboard** is a modern, responsive React-based web app
- **POS Integration** - Automatic sales data sync from Square/Toast/Lightspeed
- **Sales History** - Complete historical sales data with filtering and export
### Onboarding Wizard
- **Multi-Step Onboarding** - Guided 15-step setup process for new bakeries
- **POI Detection Step** - Automatic detection of nearby Points of Interest using bakery location
- **Progress Tracking** - Visual progress indicators and step completion
- **Data Persistence** - Save progress at each step
- **Smart Navigation** - Dynamic step dependencies and validation
### Multi-Tenant Administration
- **Tenant Settings** - Configure bakery-specific preferences
- **User Management** - Invite team members and assign roles
@@ -205,7 +212,15 @@ frontend/
│ │ ├── ui/ # Base UI components (buttons, inputs, etc.)
│ │ ├── charts/ # Chart components
│ │ ├── forms/ # Form components
│ │ ── layout/ # Layout components (header, sidebar, etc.)
│ │ ── layout/ # Layout components (header, sidebar, etc.)
│ │ └── domain/ # Domain-specific components
│ │ └── onboarding/ # Onboarding wizard components
│ │ ├── steps/ # Individual step components
│ │ │ ├── POIDetectionStep.tsx # POI detection UI
│ │ │ ├── SetupStep.tsx
│ │ │ └── ...
│ │ ├── context/ # Onboarding wizard context
│ │ └── WizardLayout.tsx
│ ├── pages/ # Page components (routes)
│ │ ├── Dashboard/ # Main dashboard
│ │ ├── Forecasting/ # Forecast management
@@ -226,7 +241,12 @@ frontend/
│ │ ├── alertStore.ts # Alert state
│ │ └── uiStore.ts # UI state (sidebar, theme, etc.)
│ ├── api/ # API client functions
│ │ ├── client.ts # Axios client setup
│ │ ├── client/ # API client configuration
│ │ │ └── apiClient.ts # Axios client with tenant injection
│ │ ├── services/ # Service API modules
│ │ │ ├── onboarding.ts # Onboarding API
│ │ │ ├── geocodingApi.ts # Geocoding/address API
│ │ │ └── poiContextApi.ts # POI detection API
│ │ ├── auth.ts # Auth API
│ │ ├── forecasting.ts # Forecasting API
│ │ ├── inventory.ts # Inventory API
@@ -263,6 +283,21 @@ frontend/
- `/register` - User registration
- `/forgot-password` - Password reset
### Onboarding Routes
- `/onboarding` - Multi-step onboarding wizard (15 steps)
- `/onboarding/bakery-type-selection` - Choose bakery type
- `/onboarding/setup` - Basic bakery setup
- `/onboarding/poi-detection` - **POI Detection** - Automatic location context detection
- `/onboarding/upload-sales-data` - Upload historical sales
- `/onboarding/inventory-review` - Review detected products
- `/onboarding/initial-stock-entry` - Initial inventory levels
- `/onboarding/product-categorization` - Product categories
- `/onboarding/suppliers-setup` - Supplier configuration
- `/onboarding/recipes-setup` - Recipe management
- `/onboarding/ml-training` - AI model training
- `/onboarding/setup-review` - Review configuration
- `/onboarding/completion` - Onboarding complete
### Protected Routes (Require Authentication)
- `/dashboard` - Main operational dashboard
- `/forecasting` - Demand forecasting management