diff --git a/pkg/servers/ui/DESIGN_PLAN_UI.md b/pkg/servers/ui/DESIGN_PLAN_UI.md deleted file mode 100644 index 76187c9..0000000 --- a/pkg/servers/ui/DESIGN_PLAN_UI.md +++ /dev/null @@ -1,213 +0,0 @@ -# Project Plan: Bootstrap UI with Fiber and Jet - -**Goal:** Develop a new UI module using Go (Fiber framework), Jet templates, and Bootstrap 5, following an MVC pattern. The UI will include a dashboard and a process manager page. - -**Location:** `pkg/servers/ui` - ---- - -## 1. Directory Structure (MVC) - -We'll establish a clear MVC structure within `pkg/servers/ui`: - -```mermaid -graph TD - A[pkg/servers/ui] --> B(app.go); - A --> C(controllers); - A --> M(models); - A --> V(views); - A --> S(static); - A --> R(routes); - - C --> C1(auth_controller.go); - C --> C2(dashboard_controller.go); - C --> C3(process_controller.go); - - M --> M1(process_model.go); - M --> M2(user_model.go); - - V --> VL(layouts); - V --> VP(pages); - V --> VC(components); - - VL --> VLL(base.jet); - - VP --> VPD(dashboard.jet); - VP --> VPP(process_manager.jet); - VP --> VPL(login.jet); - - VC --> VCN(navbar.jet); - VC --> VCS(sidebar.jet); - - S --> SCSS(css); - S --> SJS(js); - S --> SIMG(img); - - SCSS --> custom.css; // For any custom styles - - SJS --> custom.js; // For any custom JavaScript - - R --> R1(router.go); -``` - -**Detailed Breakdown:** - -* **`pkg/servers/ui/app.go`:** Main application setup for this UI module. Initializes Fiber, Jet, routes, and middleware. -* **`pkg/servers/ui/controllers/`**: Handles incoming requests, interacts with models, and selects views. - * `auth_controller.go`: Handles login/logout (stubs for now). - * `dashboard_controller.go`: Handles the dashboard page. - * `process_controller.go`: Handles the process manager page. -* **`pkg/servers/ui/models/`**: Business logic and data interaction. - * `process_model.go`: Interacts with `pkg/system/processmanager` to fetch and manage process data. - * `user_model.go`: (Placeholder for basic auth stubs). -* **`pkg/servers/ui/views/`**: Jet templates. - * **`layouts/`**: Base layout templates. - * `base.jet`: Main site layout (includes Bootstrap, navbar, sidebar, main content area). - * **`pages/`**: Specific page templates. - * `dashboard.jet`: Dashboard content. - * `process_manager.jet`: Process manager table and controls. - * `login.jet`: (Placeholder login page). - * **`components/`**: Reusable UI components. - * `navbar.jet`: Top navigation bar. - * `sidebar.jet`: Left tree menu. -* **`pkg/servers/ui/static/`**: Local static assets. - * **`css/`**: Custom CSS files. - * `custom.css` - * **`js/`**: Custom JavaScript files. - * `custom.js` - * **`img/`**: Image assets. -* **`pkg/servers/ui/routes/router.go`:** Defines URL routes and maps them to controller actions. - ---- - -## 2. Core UI Components - -* **Base Layout (`views/layouts/base.jet`):** - * HTML5 boilerplate. - * Include Bootstrap 5 CSS from CDN: - ```html - - ``` - * Include Bootstrap 5 JS Bundle from CDN (typically placed before the closing `
- {{ import "components/navbar.jet" }} + {{ import "../components/navbar.jet" }} {{ yield navbar() }}