Commit Graph

124 Commits

Author SHA1 Message Date
Urtzi Alfaro
3c4b5c2a06 Add minio support and forntend analitycs 2026-01-17 22:42:40 +01:00
Urtzi Alfaro
fbc670ddb3 Improve demo tennat and user get 2026-01-17 09:19:42 +01:00
Urtzi Alfaro
4bafceed0d Add subcription feature 6 2026-01-16 15:19:34 +01:00
Urtzi Alfaro
6b43116efd Add subcription feature 5 2026-01-16 09:55:54 +01:00
Urtzi Alfaro
b674708a4c Add subcription feature 3 2026-01-15 20:45:49 +01:00
Urtzi Alfaro
a4c3b7da3f Add subcription feature 2 2026-01-14 13:15:48 +01:00
Urtzi Alfaro
6ddf608d37 Add subcription feature 2026-01-13 22:22:38 +01:00
Urtzi Alfaro
b931a5c45e Add improvements 2 2026-01-12 22:15:11 +01:00
Urtzi Alfaro
230bbe6a19 Add improvements 2026-01-12 14:24:14 +01:00
Urtzi Alfaro
54163843ec Fix some issues 2026-01-11 19:38:54 +01:00
Urtzi Alfaro
bf1db7cb9e New token arch 2026-01-10 21:45:37 +01:00
Urtzi Alfaro
c05538cafb Imporve monitoring 5 2026-01-09 23:14:12 +01:00
Urtzi Alfaro
8ca5d9c100 Imporve monitoring 2 2026-01-09 07:26:11 +01:00
Urtzi Alfaro
e8fda39e50 Improve metrics 2026-01-08 20:48:24 +01:00
Urtzi Alfaro
29d19087f1 Update monitoring packages to latest versions
- Updated all OpenTelemetry packages to latest versions:
  - opentelemetry-api: 1.27.0 → 1.39.1
  - opentelemetry-sdk: 1.27.0 → 1.39.1
  - opentelemetry-exporter-otlp-proto-grpc: 1.27.0 → 1.39.1
  - opentelemetry-exporter-otlp-proto-http: 1.27.0 → 1.39.1
  - opentelemetry-instrumentation-fastapi: 0.48b0 → 0.60b1
  - opentelemetry-instrumentation-httpx: 0.48b0 → 0.60b1
  - opentelemetry-instrumentation-redis: 0.48b0 → 0.60b1
  - opentelemetry-instrumentation-sqlalchemy: 0.48b0 → 0.60b1

- Removed prometheus-client==0.23.1 from all services
- Unified all services to use the same monitoring package versions

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-01-08 19:25:52 +01:00
Urtzi Alfaro
dfb7e4b237 Add signoz 2026-01-08 12:58:00 +01:00
Urtzi Alfaro
18627f02d4 Fix onboarding UI 2026-01-05 19:42:35 +01:00
Urtzi Alfaro
adef7971a0 Fix suppliers 2025-12-29 14:48:24 +01:00
Urtzi Alfaro
54662dde79 Add frontend loading imporvements 2025-12-27 21:30:42 +01:00
Urtzi Alfaro
532b057f59 fix demo load 2025-12-25 20:20:16 +01:00
Urtzi Alfaro
acb3a40844 Add traslations 2025-12-18 20:12:32 +01:00
Urtzi Alfaro
f10a2b92ea Improve onboarding 2025-12-18 13:26:32 +01:00
Urtzi Alfaro
b715a14848 Fix Demo enterprise list 2025-12-17 16:28:58 +01:00
Urtzi Alfaro
f25d7a9745 CRITICAL FIX: Add missing demo_account_type to gateway middleware
The gateway middleware was not including demo_account_type in the
request.state.user context, causing the tenant API to filter with
an empty account type.

## The Bug:

Gateway middleware set:
- demo_session_id 
- is_demo 
- demo_account_type  MISSING!

This caused get_virtual_tenants_for_session() to be called with
demo_account_type="" (empty string), which returned only the parent
tenant instead of parent + 5 children.

## Log Evidence:

Before fix:
  Demo session detected for get_user_tenants
    demo_account_type=   ← EMPTY!
    tenant_count=1       ← Only parent!

After fix (expected):
  Demo session detected for get_user_tenants
    demo_account_type=enterprise
    tenant_count=6       ← Parent + 5 children!

## Fix:

Added line 211 in gateway/app/middleware/demo_middleware.py:
  "demo_account_type": session_info.get("demo_account_type", "professional")

This ensures the tenant service knows whether it's an enterprise or
professional demo session and returns the correct tenant list.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-17 16:22:39 +01:00
Urtzi Alfaro
d98558ed97 Refactor demo session architecture: consolidate metadata into fixture files
This commit refactors the demo session architecture to consolidate all demo
configuration data into the fixture files, removing redundant metadata files.

## Changes Made:

### 1. Data Consolidation
- **Removed**: `shared/demo/metadata/demo_users.json`
- **Removed**: `shared/demo/metadata/tenant_configs.json`
- **Updated**: Merged all user data into `02-auth.json` files
- **Updated**: Merged all tenant config data into `01-tenant.json` files

### 2. Enterprise Parent Tenant Updates
- Updated owner name to "Director" (matching auth fixtures)
- Added description field matching tenant_configs.json
- Added `base_tenant_id` to all child tenant entries
- Now includes all 5 child locations (Madrid, Barcelona, Valencia, Seville, Bilbao)

### 3. Professional Tenant Updates
- Added description field from tenant_configs.json
- Ensured consistency with auth fixtures

### 4. Code Updates
- **services/tenant/app/api/internal_demo.py**:
  - Fixed child tenant staff members to use enterprise parent users
  - Changed from professional staff IDs to enterprise staff IDs (Laura López, José Martínez, Francisco Moreno)

- **services/demo_session/app/core/config.py**:
  - Updated DEMO_ACCOUNTS configuration with all 5 child outlets
  - Updated enterprise tenant name and email to match fixtures
  - Added descriptions for all child locations

- **gateway/app/middleware/demo_middleware.py**:
  - Updated comments to reference fixture files as source of truth
  - Clarified that owner IDs come from 01-tenant.json files

- **frontend/src/stores/useTenantInitializer.ts**:
  - Updated tenant names and descriptions to match fixture files
  - Added comments linking to source fixture files

## Benefits:

1. **Single Source of Truth**: All demo data now lives in fixture files
2. **Consistency**: No more sync issues between metadata and fixtures
3. **Maintainability**: Easier to update demo data (one place per tenant type)
4. **Clarity**: Clear separation between template data (fixtures) and runtime config

## Enterprise Demo Fix:

The enterprise owner is now correctly added as a member of all child tenants, fixing
the issue where the tenant switcher didn't show parent/child tenants and the
establishments page didn't load tenants for the demo enterprise user.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-17 15:48:14 +01:00
Urtzi Alfaro
82f9622411 demo seed change 4 2025-12-14 19:05:37 +01:00
Urtzi Alfaro
667e6e0404 New alert service 2025-12-05 20:07:01 +01:00
Urtzi Alfaro
0da0470786 New enterprise feature2 2025-11-30 16:29:38 +01:00
Urtzi Alfaro
972db02f6d New enterprise feature 2025-11-30 09:12:40 +01:00
Urtzi Alfaro
fd657dea02 refactor(demo): Standardize demo account type names across codebase
Standardize demo account type naming from inconsistent variants to clean names:
- individual_bakery, professional_bakery → professional
- central_baker, enterprise_chain → enterprise

This eliminates naming confusion that was causing bugs in the demo session
initialization, particularly for enterprise demo tenants where different
parts of the system used different names for the same concept.

Changes:
- Updated source of truth in demo_session config
- Updated all backend services (middleware, cloning, orchestration)
- Updated frontend types, pages, and stores
- Updated demo session models and schemas
- Removed all backward compatibility code as requested

Related to: Enterprise demo session access fix

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 08:48:56 +01:00
Urtzi Alfaro
e902419b6e New alert system and panel de control page 2025-11-27 15:52:40 +01:00
Urtzi Alfaro
938df0866e Implement subscription tier redesign and component consolidation
This comprehensive update includes two major improvements:

## 1. Subscription Tier Redesign (Conversion-Optimized)

Frontend enhancements:
- Add PlanComparisonTable component for side-by-side tier comparison
- Add UsageMetricCard with predictive analytics and trend visualization
- Add ROICalculator for real-time savings calculation
- Add PricingComparisonModal for detailed plan comparisons
- Enhance SubscriptionPricingCards with behavioral economics (Professional tier prominence)
- Integrate useSubscription hook for real-time usage forecast data
- Update SubscriptionPage with enhanced metrics, warnings, and CTAs
- Add subscriptionAnalytics utility with 20+ conversion tracking events

Backend APIs:
- Add usage forecast endpoint with linear regression predictions
- Add daily usage tracking for trend analysis (usage_forecast.py)
- Enhance subscription error responses for conversion optimization
- Update tenant operations for usage data collection

Infrastructure:
- Add usage tracker CronJob for daily snapshot collection
- Add track_daily_usage.py script for automated usage tracking

Internationalization:
- Add 109 translation keys across EN/ES/EU for subscription features
- Translate ROI calculator, plan comparison, and usage metrics
- Update landing page translations with subscription messaging

Documentation:
- Add comprehensive deployment checklist
- Add integration guide with code examples
- Add technical implementation details (710 lines)
- Add quick reference guide for common tasks
- Add final integration summary

Expected impact: +40% Professional tier conversions, +25% average contract value

## 2. Component Consolidation and Cleanup

Purchase Order components:
- Create UnifiedPurchaseOrderModal to replace redundant modals
- Consolidate PurchaseOrderDetailsModal functionality into unified component
- Update DashboardPage to use UnifiedPurchaseOrderModal
- Update ProcurementPage to use unified approach
- Add 27 new translation keys for purchase order workflows

Production components:
- Replace CompactProcessStageTracker with ProcessStageTracker
- Update ProductionPage with enhanced stage tracking
- Improve production workflow visibility

UI improvements:
- Enhance EditViewModal with better field handling
- Improve modal reusability across domain components
- Add support for approval workflows in unified modals

Code cleanup:
- Remove obsolete PurchaseOrderDetailsModal (620 lines)
- Remove obsolete CompactProcessStageTracker (303 lines)
- Net reduction: 720 lines of code while adding features
- Improve maintainability with single source of truth

Build verified: All changes compile successfully
Total changes: 29 files, 1,183 additions, 1,903 deletions

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-19 21:01:06 +01:00
Urtzi Alfaro
a8d8828935 imporve features 2025-11-14 07:23:56 +01:00
Urtzi Alfaro
9bc048d360 Add whatsapp feature 2025-11-13 16:01:08 +01:00
Urtzi Alfaro
5783c7ed05 Add POI feature and imporve the overall backend implementation 2025-11-12 15:34:10 +01:00
Claude
eabd5eedc7 fix: Route dashboard API requests to orchestrator service instead of inventory
The gateway was incorrectly routing /tenants/{id}/dashboard/* requests
to the inventory service, but the dashboard endpoints are actually
implemented in the orchestrator service.

Changed:
- gateway/app/routes/tenant.py:300 from _proxy_to_inventory_service
  to _proxy_to_orchestrator_service

This fixes 404 errors when loading the dashboard in demo mode.
2025-11-07 21:49:31 +00:00
Urtzi Alfaro
3007bde05b Improve kubernetes for prod 2025-11-06 11:04:50 +01:00
Urtzi Alfaro
394ad3aea4 Improve AI logic 2025-11-05 13:34:56 +01:00
Urtzi Alfaro
0220da1725 Improve the frontend 4 2025-11-01 21:35:03 +01:00
Urtzi Alfaro
269d3b5032 Add user delete process 2025-10-31 11:54:19 +01:00
Urtzi Alfaro
63f5c6d512 Improve the frontend 3 2025-10-30 21:08:07 +01:00
Urtzi Alfaro
36217a2729 Improve the frontend 2 2025-10-29 06:58:05 +01:00
Urtzi Alfaro
858d985c92 Improve the frontend modals 2025-10-27 16:33:26 +01:00
Urtzi Alfaro
61376b7a9f Improve the frontend and fix TODOs 2025-10-24 13:05:04 +02:00
Urtzi Alfaro
07c33fa578 Improve the frontend and repository layer 2025-10-23 07:44:54 +02:00
Urtzi Alfaro
8d30172483 Improve the frontend 2025-10-21 19:50:07 +02:00
Urtzi Alfaro
05da20357d Improve teh securty of teh DB 2025-10-19 19:22:37 +02:00
Urtzi Alfaro
312e36c893 Update requirements and insfra versions 2025-10-17 23:09:40 +02:00
Urtzi Alfaro
d4060962e4 Improve demo seed 2025-10-17 07:31:14 +02:00
Urtzi Alfaro
b6cb800758 Improve GDPR implementation 2025-10-16 07:28:04 +02:00