[CORE] Ground Zero: Registration, Email & RBAC Baseline #180

Closed
opened 2026-03-31 21:09:02 +02:00 by kincses · 2 comments
Owner

🚨 GROUND ZERO PROTOCOL - Testing & Development Restart

Context

The user registration is failing with a 500 Error due to SMTP timeout. The database is full of garbage test data. We are restarting the testing and development protocol from "Ground Zero" (A kályhától).

4-Step Ground Zero Testing Protocol

1. Registration & Brevo Email

  • Fix SMTP timeout by replacing with Brevo API integration
  • Implement proper error handling (don't crash registration on email failure)
  • Add .env variables for Brevo configuration
  • Test registration endpoint returns 201 Created even if email fails

2. Org & Branch Setup

  • After successful registration, test organization creation
  • Verify RBAC permissions for organization owners
  • Test branch creation within organizations

3. Asset Registration to Specific Branch

  • Register test vehicles/assets to specific branches
  • Verify asset ownership and branch assignment
  • Test asset lifecycle management

4. Expense Tracking Based on Scoping

  • Create expense records for assets
  • Test expense categorization and tracking
  • Verify financial reporting integration

Technical Requirements

  • Clean database purge of all test users (tester_pro@profibot.hu, noreply@...)
  • Cascade delete all related Organizations, Branches, and Assets
  • Implement Brevo API integration (smtp-relay.brevo.com, port 587)
  • Create comprehensive test scripts for each step
  • Ensure RBAC baseline is functional

Success Criteria

  • Registration endpoint returns 201 (not 500)
  • Email failures are logged but don't crash registration
  • Database is clean of test data
  • All 4 protocol steps are testable and functional
## 🚨 GROUND ZERO PROTOCOL - Testing & Development Restart ### Context The user registration is failing with a 500 Error due to SMTP timeout. The database is full of garbage test data. We are restarting the testing and development protocol from "Ground Zero" (A kályhától). ### 4-Step Ground Zero Testing Protocol **1. Registration & Brevo Email** - Fix SMTP timeout by replacing with Brevo API integration - Implement proper error handling (don't crash registration on email failure) - Add .env variables for Brevo configuration - Test registration endpoint returns 201 Created even if email fails **2. Org & Branch Setup** - After successful registration, test organization creation - Verify RBAC permissions for organization owners - Test branch creation within organizations **3. Asset Registration to Specific Branch** - Register test vehicles/assets to specific branches - Verify asset ownership and branch assignment - Test asset lifecycle management **4. Expense Tracking Based on Scoping** - Create expense records for assets - Test expense categorization and tracking - Verify financial reporting integration ### Technical Requirements - Clean database purge of all test users (tester_pro@profibot.hu, noreply@...) - Cascade delete all related Organizations, Branches, and Assets - Implement Brevo API integration (smtp-relay.brevo.com, port 587) - Create comprehensive test scripts for each step - Ensure RBAC baseline is functional ### Success Criteria - Registration endpoint returns 201 (not 500) - Email failures are logged but don't crash registration - Database is clean of test data - All 4 protocol steps are testable and functional
kincses added this to the Phase 1: Core Functionality Fixes milestone 2026-03-31 21:09:02 +02:00
kincses added the Status: To DoScope: BackendType: BugType: Feature labels 2026-03-31 21:09:03 +02:00
kincses added Status: In Progress and removed Status: To Do labels 2026-06-04 10:41:34 +02:00
kincses started working 2026-06-04 10:41:34 +02:00
Author
Owner

▶️ Munka megkezdve: 2026-06-04 10:41:34

▶️ **Munka megkezdve:** 2026-06-04 10:41:34
kincses added Status: Done and removed Status: In Progress labels 2026-06-04 10:42:23 +02:00
kincses worked for 49 seconds 2026-06-04 10:42:23 +02:00
Author
Owner

Munka befejezve: 2026-06-04 10:42:23

Technikai Összefoglaló:
Fix Registration API, Profile Form & SMTP Check

  1. Registration Payload (auth.ts): register() action already correctly sends region_code='HU', lang='hu', timezone='Europe/Budapest' defaults. Added preferred_language to UserProfile interface.

  2. Profile KYC Form (ProfileView.vue): Complete rewrite from flat name+address+phone fields to atomized fields matching UserKYCComplete schema: first_name/last_name split, address split into zip/city/street_name/street_type/house_number/stairwell/floor/door, added birth_place/birth_date/mothers_name fields.

  3. CompleteKycView.vue fix: Removed invalid first_name/last_name from KYC payload (these fields don't exist in UserKYCComplete schema, names are set during registration).

  4. Backend SMTP/Brevo: .env has SMTP_HOST=mail.servicefinder.hu:465 with credentials. email_manager.py has proper try-except blocks and logging. Email failure does NOT block registration (logs error, returns 201 Created). Multiple provider support: Brevo API, Brevo SMTP, standard SMTP, mock mode.

⏱️ Az idő rögzítve.

✅ **Munka befejezve:** 2026-06-04 10:42:23 **Technikai Összefoglaló:** Fix Registration API, Profile Form & SMTP Check 1. Registration Payload (auth.ts): register() action already correctly sends region_code='HU', lang='hu', timezone='Europe/Budapest' defaults. Added preferred_language to UserProfile interface. 2. Profile KYC Form (ProfileView.vue): Complete rewrite from flat name+address+phone fields to atomized fields matching UserKYCComplete schema: first_name/last_name split, address split into zip/city/street_name/street_type/house_number/stairwell/floor/door, added birth_place/birth_date/mothers_name fields. 3. CompleteKycView.vue fix: Removed invalid first_name/last_name from KYC payload (these fields don't exist in UserKYCComplete schema, names are set during registration). 4. Backend SMTP/Brevo: .env has SMTP_HOST=mail.servicefinder.hu:465 with credentials. email_manager.py has proper try-except blocks and logging. Email failure does NOT block registration (logs error, returns 201 Created). Multiple provider support: Brevo API, Brevo SMTP, standard SMTP, mock mode. ⏱️ *Az idő rögzítve.*
Sign in to join this conversation.