Skip to content

Feat/clients portal#8

Merged
AzielCF merged 12 commits intomainfrom
feat/clients-portal
Feb 25, 2026
Merged

Feat/clients portal#8
AzielCF merged 12 commits intomainfrom
feat/clients-portal

Conversation

@AzielCF
Copy link
Owner

@AzielCF AzielCF commented Feb 25, 2026

Client Portal Architecture & Bot Engine Hardening

🚀 Overview

This PR implements the Client Portal module architecture and introduces significant hardening to the Bot Engine via variant-specific configurations. The branch establishes a decoupled ecosystem for client management, implementing a secure authentication layer and extending workspace capabilities to support guests and granular channel controls.


📋 Changelog

🏗️ Client Portal Module Architecture

  • Layered Design: Introduced a new hexagonal module for the Client Portal:
    • Access: Defined AccessRule entities for fine-grained routing and permissions.
    • Auth: Implemented a complete authentication system including Domain, Application Services, and HTTP handlers.
    • Repository: Added GORM-backed persistence for portal authentication data.
    • Shared Utilities: Centralized JWT security tools for token generation and cross-module validation.
  • REST Initialization: Registered portal-specific routes and middleware, including support for the --basic-auth CLI flag for internal management.

🧠 Bot Engine & Variant Enhancements

  • Granular Capabilities: Extended the BotVariant domain model with AllowedMCPs, Description, and nullable capability flags.
  • Data Integrity: Implemented SanitizeVariants in the Bot entity to automatically purge unnamed variants or empty identifiers before persistence.
  • Persistence Layer: Updated GORM repositories to handle the new BotVariant structure and capability state.
  • Admin UI Refinement: Refactored BotFormModal.vue to scope capability toggles and MCP configurations per variant, introducing a new selection flow in the UI.

🔐 Authentication & Magic Link System

  • Core Infrastructure: Developed the backend for a passwordless Magic Link system, enabling secure client access without traditional credentials.
  • Identity & Tools: Updated client-side tools to support portal-specific authentication services and token redemption.

� Workspace & Guest Management

  • Domain Expansion: Extended workspace logic to support "Guests," allowing clients to invite and manage external users within their allocated environments.
  • Persistence Hardening: Updated database schemas and repositories to ensure robust handling of guest entities and client-workspace associations.

📱 Channel Control & API Extensions

  • Data Exposure: Updated API endpoints to expose critical channel metadata, including phone numbers and access modes.
  • WhatsApp Linking: Implemented specialized endpoints for WhatsApp linking and remote control, specifically designed for portal consumption.

�️ Frontend Refactoring (Admin UI)

  • Component Extraction: Decoupled BotsView.vue into focused child components:
    • GlobalSettingsModal.vue: Isolated global bot configuration logic.
    • header.vue: Extracted bot list header and search functionality.
  • UI Consistency: Refactored theme-aware confirmation dialogs to ensure a premium, consistent experience throughout the management dashboards.

🔗 Technical Impact

  • Decoupling: The Client Portal operates independently from the main admin auth stack, reducing risk and improving modularity.
  • Flexibility: Bot variants now support distinct capabilities, allowing for tiered service levels.
  • Maintainability: The extraction of UI components from BotsView simplifies future updates to the admin dashboard.

⚠️ Configuration

  • CLI: The server now accepts --basic-auth to protect internal portal management bridges.
  • Environment: Ensure PORTAL_JWT_SECRET is configured for the new authentication layer.

🚧 Status

  • Client Portal UI: Please note that the actual frontend application for the Client Portal is currently under development ("on its way") and is not included in this PR.

- access: Define AccessRule entity for routing and permissions.
- auth: Implement user authentication system (Domain, Application Service, and infrastructure handlers).
- repo: Add GORM repository implementation for auth persistence.
- shared: Add JWT security utilities for token generation and validation.
…ware. Also add --basic-auth CLI flag support
…ccess and capabilities

- Added \AllowedMCPs\, \Description\, and nullable capability flags to \BotVariant\ domain model
- Implemented \SanitizeVariants\ in Bot entity to discard unnamed variants and purge empty identifiers
- Updated Create and Update usecases to call \SanitizeVariants\ before persisting
- Refactored frontend \BotFormModal.vue\ to scope capability toggles and MCP server configurations per variant
- Introduced new variant selection and inheritance flows in the UI header
- Moved global settings modal logic into \GlobalSettingsModal.vue\
- Extracted bot list header UI into \header.vue\
- Cleaned up \BotsView.vue\ to use the new child components
@AzielCF AzielCF merged commit b18dceb into main Feb 25, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant