Skip to content

Improve application folder#6

Merged
moutonjeremy merged 11 commits intomainfrom
improve-application-folder
Mar 15, 2026
Merged

Improve application folder#6
moutonjeremy merged 11 commits intomainfrom
improve-application-folder

Conversation

@moutonjeremy
Copy link
Member

@moutonjeremy moutonjeremy commented Mar 9, 2026

This pull request refactors the action application layer to improve maintainability and modularity by splitting a large monolithic file (action.go) into multiple focused files, each handling a specific aspect of the action workflow. It also reorganizes DTOs into separate files for clarity and updates the CI/CD workflows to download the UI from a release instead of building it locally. Additionally, minor configuration and workflow improvements are included.

Action Application Refactor

  • The monolithic application/action/action.go file is removed and replaced by multiple single-responsibility files (such as action_application.go, create_action.go, delete_action.go, etc.), each implementing a specific method of the action application logic. This enhances code organization and maintainability. [1] [2] [3] [4]
  • DTOs (Data Transfer Objects) for actions are split from a single file into multiple files, grouping related types together (e.g., create_action.go, delete_action.go, get_action.go, etc.), making the codebase easier to navigate and understand. [1] [2] [3] [4] [5] [6] [7] [8]

CI/CD Workflow Improvements

  • The GitHub Actions workflows (pr.yaml, release.yaml, nightly.yaml) are updated to download the latest UI release artifact from the nexo-ui repository instead of building the UI locally, streamlining the build process and reducing build time. [1] [2] [3]
  • Node.js setup and npm install steps are removed from workflows, as the UI is now consumed as a prebuilt artifact. [1] [2] [3]

Configuration Update

  • The .air.toml configuration is updated to exclude the ui directory from live reloads, preventing unnecessary rebuilds during development.

… logic

- Added ActionApplication for managing actions with methods to create, list, get, update, delete actions, and execute them based on triggers.
- Introduced DTOs for action inputs and outputs.
- Implemented action execution logic with step handling.
- Created DocumentApp for document management with necessary dependencies.
- Refactored favorite management into a separate FavoriteApp.
- Updated user application to utilize FavoriteApp for managing user favorites.
- Introduced ports for various application functionalities including action, document, favorite, and user management.
- Removed deprecated user favorite methods and integrated with the new FavoriteApp.
- Updated HTTP handlers and routes to accommodate new application structure.
- Changed `SpaceApp` to `SpaceApplication` and updated all related method signatures in the space package.
- Changed `UserApp` to `UserApplication` and updated all related method signatures in the user package.
- Introduced a new `WebhookApplication` struct and refactored all webhook-related methods accordingly.
- Updated dependency injection in the infrastructure layer to reflect the new struct names.
- Removed the old `webhook.go` file and split its functionality into multiple files for better organization.
- Updated PermissionApplication to use application ports for Space, Drawing, Document, and Database operations.
- Refactored UpsertDatabasePermission, UpsertDocumentUserPermission, and UpsertDrawingUserPermission methods to utilize new application ports.
- Introduced UpsertSpaceGroupPermission and updated UpsertSpaceUserPermission to leverage application ports.
- Added new DTOs for space permissions and document checks.
- Enhanced SpaceApplication to include PermissionApp and refactored space creation and deletion logic.
- Updated dependency injection in infrastructure and HTTP routers to accommodate new permission handling.
- Adjusted handlers in HTTP controllers for database, document, drawing, and space to utilize the new permission application methods.
- Updated references from `App` to `Application` for consistency across various controllers including Document, Drawing, Space, User, and Webhook.
- Adjusted method calls in handlers to align with the new naming convention.
- Ensured all instances of application references are updated to maintain code clarity and uniformity.
@moutonjeremy moutonjeremy merged commit 92bc6ed into main Mar 15, 2026
1 check passed
@moutonjeremy moutonjeremy deleted the improve-application-folder branch March 15, 2026 00:21
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