add brain

This commit is contained in:
2026-03-12 15:17:52 +07:00
parent fd9f558fa1
commit e7821a7a9d
355 changed files with 93784 additions and 24 deletions

View File

@@ -0,0 +1,61 @@
# C4 Architecture Document - Level 3: Component Diagram (Landing Page)
Detailed breakdown of the logical components within the **Sales Landing App** and **BFF Service**.
## 1. Frontend Components (Sales Landing App)
### 1.1. Modules
- **Auth Module**: Login form, Token handling.
- **Customer Module**: Input form, Camera/Upload Component for OCR.
- **Product Module**: Product selection interface (Card selection for UVL-IC/UVL-EL).
- **Illustration Module**: PDF display (PDF Viewer) and download/Submit buttons.
### 1.2. Shared
- **UI Kit**: Button, Input, Modal (matching the Design System).
- **API Client**: Axios wrapper for calling the BFF.
## 2. Backend Components (BFF Service)
### 2.1. Controllers
- **AuthController**: Authentication via Auth API.
- **OCRController**: Proxies images to the OCR Service.
- **IllustrationController**: Aggregates data -> Calls PDF Engine -> Returns URL/File.
- **SubmissionController**: Submits final data to the Core system.
### 2.2. Services
- **ClientService**: Saves/Retrieves customer information from the Database.
## 3. Component Diagram
```mermaid
C4Component
title Component Diagram - Landing Page System
Container_Boundary(frontend, "Sales Landing App") {
Component(c_auth, "Auth Module", "React", "Login Screen")
Component(c_cust, "Customer Module", "React", "Form & OCR Upload")
Component(c_pdf, "Illustration Module", "React", "PDF View & Submit")
}
Container_Boundary(backend, "BFF Service") {
Component(ctl_ocr, "OCR Controller", "Node.js", "Handle Upload & Proxy")
Component(ctl_ill, "Illustration Controller", "Node.js", "Coordinate PDF Gen")
Component(svc_client, "Client Service", "Node.js", "Manage Client Data DB")
}
ContainerDb(db, "PostgreSQL", "Database", "Store Drafts")
System_Ext(ocr_ext, "External OCR", "Service")
System_Ext(pdf_ext, "External PDF Gen", "Service")
Rel(c_auth, ctl_ocr, "Authenticated Req")
Rel(c_cust, ctl_ocr, "Upload Image")
Rel(c_cust, ctl_ill, "Request PDF")
Rel(ctl_ocr, ocr_ext, "Proxy")
Rel(ctl_ill, pdf_ext, "Proxy")
Rel(ctl_ill, svc_client, "Save Info")
Rel(svc_client, db, "Persist")
```
---
*Authored by: Agent mbl-landing-page-architecture*