102 Commits

Author SHA1 Message Date
Urtzi Alfaro
7d6845574c Add new infra architecture 6 2026-01-19 16:31:11 +01:00
Urtzi Alfaro
35f164f0cd Add new infra architecture 2026-01-19 11:55:17 +01:00
Urtzi Alfaro
3c4b5c2a06 Add minio support and forntend analitycs 2026-01-17 22:42:40 +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
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
cf0176673c fix demo session 1 2026-01-02 11:12:50 +01:00
Urtzi Alfaro
f8591639a7 Imporve enterprise 2025-12-17 20:50:22 +01:00
Urtzi Alfaro
0bbfa010bf Fix AI insights feature issues 2025-12-16 13:32:33 +01:00
Urtzi Alfaro
4418ff0876 Add forecasting demand insights trigger + fix RabbitMQ cleanup
Issue 1: Forecasting demand insights not triggered in demo workflow
- Created internal ML endpoint: /forecasting/internal/ml/generate-demand-insights
- Added trigger_demand_insights_internal() to ForecastServiceClient
- Integrated forecasting insights into demo session post-clone workflow
- Now triggers 4 AI insight types: price, safety stock, yield, + demand

Issue 2: RabbitMQ client cleanup error in procurement service
- Fixed: rabbitmq_client.close() → rabbitmq_client.disconnect()
- Added proper cleanup in exception handler
- Error: "'RabbitMQClient' object has no attribute 'close'"

Files modified:
- services/forecasting/app/api/ml_insights.py (new internal_router)
- services/forecasting/app/main.py (register internal router)
- shared/clients/forecast_client.py (new trigger method)
- services/demo_session/app/services/clone_orchestrator.py (+ demand insights)
- services/procurement/app/api/internal_demo.py (fix disconnect)

Expected impact:
- Demo sessions will now generate demand forecasting insights
- No more RabbitMQ cleanup errors in logs
- AI insights count should increase from 1 to 2-3 per session

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-16 11:28:04 +01:00
Urtzi Alfaro
35ae23b381 Fix forecasting clone endpoint for demo sessions
Fixed two critical issues preventing forecast data from being cloned:

1. **Missing batch_name field**: The fixture uses `batch_id` but the
   PredictionBatch model requires `batch_name` (NOT NULL constraint).
   Added field mapping to handle batch_id -> batch_name conversion.

2. **UUID type mismatch**: The fixture's `product_id` is a string but
   the Forecast model expects `inventory_product_id` as UUID type.
   Added conversion from string to UUID.

3. **Field mappings added**:
   - batch_id -> batch_name
   - total_forecasts -> total_products
   - created_at -> requested_at (fallback)
   - Calculated completed_products from status

These fixes enable the forecasting service to successfully clone all
28 forecasts from the fixture file, unlocking demand forecasting
AI insights in demo sessions.

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-16 07:39:13 +01:00
Urtzi Alfaro
c566967bea Add AI insights feature 2025-12-15 21:14:22 +01:00
Urtzi Alfaro
82f9622411 demo seed change 4 2025-12-14 19:05:37 +01:00
Urtzi Alfaro
4ae5356ad1 demo seed change 3 2025-12-14 16:04:16 +01:00
Urtzi Alfaro
a030bd14c8 demo seed change 2 2025-12-14 11:58:14 +01:00
Urtzi Alfaro
ff830a3415 demo seed change 2025-12-13 23:57:54 +01:00
Urtzi Alfaro
667e6e0404 New alert service 2025-12-05 20:07:01 +01:00
Urtzi Alfaro
972db02f6d New enterprise feature 2025-11-30 09:12:40 +01:00
Urtzi Alfaro
e902419b6e New alert system and panel de control page 2025-11-27 15:52:40 +01:00
Urtzi Alfaro
5c45164c8e Improve backend 2025-11-18 07:17:17 +01:00
Urtzi Alfaro
843cd2bf5c Improve the UI and training 2025-11-15 15:20:10 +01:00
Urtzi Alfaro
c349b845a6 Bug fixes of training 2025-11-14 20:27:39 +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
Urtzi Alfaro
3007bde05b Improve kubernetes for prod 2025-11-06 11:04:50 +01:00
Urtzi Alfaro
3ad093d38b Fix orchestrator issues 2025-11-05 22:54:14 +01:00
Claude
ec93004502 Fix orchestration saga failure due to schema mismatch and missing pandas
Root Causes Fixed:
1. BatchForecastResponse schema mismatch in forecasting service
   - Changed 'batch_id' to 'id' (required field name)
   - Changed 'products_processed' to 'total_products'
   - Changed 'success' to 'status' with "completed" value
   - Changed 'message' to 'error_message'
   - Added all required fields: batch_name, completed_products, failed_products,
     requested_at, completed_at, processing_time_ms, forecasts
   - This was causing "11 validation errors for BatchForecastResponse"
     which made the forecast service return None, triggering saga failure

2. Missing pandas dependency in orchestrator service
   - Added pandas==2.2.2 and numpy==1.26.4 to requirements.txt
   - Fixes "No module named 'pandas'" warning when loading AI enhancement

These issues prevented the orchestrator from completing Step 3 (generate_forecasts)
in the daily workflow, causing the entire saga to fail and compensate.
2025-11-05 14:19:28 +00:00
Urtzi Alfaro
394ad3aea4 Improve AI logic 2025-11-05 13:34:56 +01:00
Urtzi Alfaro
5adb0e39c0 Improve the frontend 5 2025-11-02 20:24:44 +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
36217a2729 Improve the frontend 2 2025-10-29 06:58:05 +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
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
dbb48d8e2c Improve the sales import 2025-10-15 21:09:42 +02:00
Urtzi Alfaro
8f9e9a7edc Add role-based filtering and imporve code 2025-10-15 16:12:49 +02:00
Urtzi Alfaro
7556a00db7 Improve the demo feature of the project 2025-10-12 18:47:33 +02:00
Urtzi Alfaro
dbc7f2fa0d Re-create migrations init tables 2025-10-09 20:47:31 +02:00
Urtzi Alfaro
b420af32c5 REFACTOR production scheduler 2025-10-09 18:01:24 +02:00
Urtzi Alfaro
3c689b4f98 REFACTOR external service and improve websocket training 2025-10-09 14:11:02 +02:00
Urtzi Alfaro
7c72f83c51 REFACTOR ALL APIs fix 1 2025-10-07 07:15:07 +02:00
Urtzi Alfaro
38fb98bc27 REFACTOR ALL APIs 2025-10-06 15:27:01 +02:00
Urtzi Alfaro
dc8221bd2f Add DEMO feature to the project 2025-10-03 14:09:34 +02:00
Urtzi Alfaro
0fdc3b0211 Fix issues 2025-10-01 16:25:53 +02:00
Urtzi Alfaro
2eeebfc1e0 Fix Alembic issue 2025-10-01 11:24:06 +02:00
Urtzi Alfaro
7cc4b957a5 Fix DB issue 2s 2025-09-30 21:58:10 +02:00
Urtzi Alfaro
147893015e Fix DB issues 2025-09-30 13:32:51 +02:00