Rework Projects into singular Configuration projects#473
Rework Projects into singular Configuration projects#473
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request refactors the “Project” concept into “ConfigurationProject/ConfigurationFile” across the backend and frontend, aligning API contracts, UI labels, and service modules around configuration-focused workflows.
Changes:
- Replaced backend
Project*types/endpoints withConfigurationProject*equivalents and updated dependent services (git, filesystem, file tree, configuration, adapter). - Updated frontend types, services, routes, and UI copy to consistently refer to “Configuration Overview/Configuration File/Configuration Project”.
- Added/updated extensive MVC/service test coverage for the new controllers and refactored services.
Reviewed changes
Copilot reviewed 64 out of 64 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/test/java/org/frankframework/flow/recentproject/RecentProjectControllerTest.java | Adds MVC test coverage for recent-project endpoints and path conversion behavior. |
| src/test/java/org/frankframework/flow/projectsettings/ConfigurationProjectSettingsTest.java | Renames/cleans up settings tests to match new configuration-project terminology. |
| src/test/java/org/frankframework/flow/project/ProjectTest.java | Removes legacy Project unit tests after refactor. |
| src/test/java/org/frankframework/flow/project/ConfigurationProjectTest.java | Adds unit tests for ConfigurationProject basics and filter toggling. |
| src/test/java/org/frankframework/flow/project/ConfigurationProjectServiceTest.java | Updates service tests for the new ConfigurationProjectService behavior and DTOs. |
| src/test/java/org/frankframework/flow/project/ConfigurationProjectControllerTest.java | Updates MVC tests to target ConfigurationProjectController and new DTOs/errors. |
| src/test/java/org/frankframework/flow/git/GitServiceTest.java | Refactors git service tests to use ConfigurationProjectService + ApiException. |
| src/test/java/org/frankframework/flow/filesystem/FilesystemControllerTest.java | Adds MVC tests for filesystem browsing/default path endpoints. |
| src/test/java/org/frankframework/flow/file/FileTreeServiceTest.java | Refactors file tree tests to use ConfigurationProjectService and new paths. |
| src/test/java/org/frankframework/flow/file/FileTreeControllerTest.java | Adds MVC tests for file tree endpoints (project tree/config tree/folder creation). |
| src/test/java/org/frankframework/flow/file/FileServiceTest.java | Refactors file service tests to use ConfigurationProjectService and new exceptions. |
| src/test/java/org/frankframework/flow/file/FileControllerTest.java | Adds MVC tests for file read/write/move/delete endpoints. |
| src/test/java/org/frankframework/flow/configuration/ConfigurationTest.java | Removes legacy Configuration unit test after rename to ConfigurationFile. |
| src/test/java/org/frankframework/flow/configuration/ConfigurationServiceTest.java | Refactors configuration service tests for ConfigurationProjectService + ApiException. |
| src/test/java/org/frankframework/flow/configuration/ConfigurationControllerTest.java | Refactors MVC tests for configuration endpoints with new project/service types. |
| src/test/java/org/frankframework/flow/appinfo/AppInfoControllerTest.java | Adds MVC tests for app-info endpoint. |
| src/test/java/org/frankframework/flow/adapter/AdapterServiceTest.java | Refactors adapter service tests around ConfigurationProject/ConfigurationFile. |
| src/main/java/org/frankframework/flow/recentproject/RecentProjectsService.java | Minor refactor/formatting around JSON parsing and recent insertion. |
| src/main/java/org/frankframework/flow/project/ProjectNotFoundException.java | Removes legacy exception type (replaced by ApiException). |
| src/main/java/org/frankframework/flow/project/ProjectCreateDTO.java | Removes legacy create DTO (replaced by ConfigurationProjectCreateDTO). |
| src/main/java/org/frankframework/flow/project/ProjectController.java | Removes legacy controller (replaced by ConfigurationProjectController). |
| src/main/java/org/frankframework/flow/project/ProjectCloneDTO.java | Removes legacy clone DTO (replaced by ConfigurationProjectCloneDTO). |
| src/main/java/org/frankframework/flow/project/ProjectAlreadyExistsException.java | Removes legacy exception type (handled via ApiException/IllegalArgumentException). |
| src/main/java/org/frankframework/flow/project/Project.java | Removes legacy model (replaced by ConfigurationProject). |
| src/main/java/org/frankframework/flow/project/InvalidXmlContentException.java | Removes legacy exception type (handled via ApiException). |
| src/main/java/org/frankframework/flow/project/ConfigurationProjectService.java | Introduces/updates the new configuration project service and disk/cache behavior. |
| src/main/java/org/frankframework/flow/project/ConfigurationProjectDTO.java | Renames DTO record to configuration-project focused naming. |
| src/main/java/org/frankframework/flow/project/ConfigurationProjectCreateDTO.java | Adds create DTO with explicit name + rootPath. |
| src/main/java/org/frankframework/flow/project/ConfigurationProjectController.java | Adds controller that replaces the legacy project API endpoints. |
| src/main/java/org/frankframework/flow/project/ConfigurationProjectCloneDTO.java | Adds clone DTO for configuration projects. |
| src/main/java/org/frankframework/flow/project/ConfigurationProject.java | Adds new model representing a configuration project and its settings. |
| src/main/java/org/frankframework/flow/git/GitService.java | Updates git operations to depend on ConfigurationProjectService and adds hardening/helpers. |
| src/main/java/org/frankframework/flow/git/GitController.java | Updates controller signatures/exceptions for ApiException and refactored service APIs. |
| src/main/java/org/frankframework/flow/filesystem/LocalFileSystemStorageService.java | Minor refactor for naming/formatting and exception variable names. |
| src/main/java/org/frankframework/flow/filesystem/CloudFileSystemStorageService.java | Minor refactor for naming/formatting and exception variable names. |
| src/main/java/org/frankframework/flow/file/FileTreeService.java | Updates file tree building to use ConfigurationProjectService and adds config-dir helpers. |
| src/main/java/org/frankframework/flow/file/FileService.java | Updates file operations to use ConfigurationProjectService and new exception behavior. |
| src/main/java/org/frankframework/flow/configuration/ConfigurationService.java | Updates configuration CRUD to use ConfigurationProjectService. |
| src/main/java/org/frankframework/flow/configuration/ConfigurationFile.java | Renames model from Configuration to ConfigurationFile and updates constructor shape. |
| src/main/java/org/frankframework/flow/adapter/AdapterService.java | Updates adapter operations to use ConfigurationProject/ConfigurationFile terminology. |
| src/main/frontend/app/utils/path-utils.ts | Updates helpers to accept ConfigurationProject type. |
| src/main/frontend/app/types/project.types.ts | Renames Project/RecentProject to configuration-focused types. |
| src/main/frontend/app/stores/project-store.ts | Updates project store typing to ConfigurationProject. |
| src/main/frontend/app/services/recent-project-service.ts | Updates recent-project service typing to RecentConfigurationProject. |
| src/main/frontend/app/services/project-service.ts | Updates project service contracts (create now sends name + rootPath). |
| src/main/frontend/app/services/configuration-file-service.ts | Introduces configuration-file service module and renames cache + CRUD functions. |
| src/main/frontend/app/routes/studio/xml-to-json-parser.ts | Switches studio XML loading to configuration-file service functions. |
| src/main/frontend/app/routes/studio/canvas/flow.tsx | Updates save/load/cache invalidation to configuration-file service functions. |
| src/main/frontend/app/routes/projectlanding/project-landing.tsx | Updates landing page UI/flows to “Configuration” terminology and new create API. |
| src/main/frontend/app/routes/projectlanding/new-configuration-modal.tsx | Renames modal and adjusts create callback signature for name + rootPath. |
| src/main/frontend/app/routes/projectlanding/configuration-row.tsx | Renames row component and updates labels/aria text for configurations. |
| src/main/frontend/app/routes/projectlanding/clone-configuration-modal.tsx | Renames clone modal component to configuration naming. |
| src/main/frontend/app/routes/editor/editor.tsx | Switches configuration editing to configuration-file service functions. |
| src/main/frontend/app/routes/configurations/configuration-overview.tsx | Renames route/component and updates directory detection logic and UI labels. |
| src/main/frontend/app/routes/configurations/configuration-file-tile.tsx | Renames tile component and props to configuration-file terminology. |
| src/main/frontend/app/routes/configurations/add-configuration-modal.tsx | Switches “add configuration” to configuration-file creation service + new prop names. |
| src/main/frontend/app/hooks/use-projects.ts | Updates hook typing to recent configuration project type. |
| src/main/frontend/app/components/navbar/navbar.tsx | Updates nav label to “Configuration Overview”. |
| src/main/frontend/app/components/file-structure/use-studio-context-menu.ts | Renames “new configuration” action + switches to configuration-file service/cache clear. |
| src/main/frontend/app/components/file-structure/use-file-tree-context-menu.ts | Switches cache invalidation to configuration-file cache clear function. |
| src/main/frontend/app/components/file-structure/studio-context-menu.tsx | Updates context menu label to “New Configuration File”. |
| src/main/frontend/app/components/file-structure/name-input-dialog.tsx | Minor handler param rename for consistency/clarity. |
| src/main/frontend/app/components/app-content.tsx | Updates lazy route import to configuration-overview. |
| .editorconfig | Adds XML template indentation rules. |
Comments suppressed due to low confidence (4)
src/main/java/org/frankframework/flow/file/FileService.java:129
validateWithinProject()throws anApiException(403) when a path is outside the project directory, but thecatch (ApiException ...)converts allApiExceptions intoIllegalArgumentException("Project does not exist"). This masks authorization/validation failures as “project not found” and changes the HTTP status mapping. Only translate the “project not found” case, and let the outside-projectApiExceptionpropagate.
ConfigurationProject configurationProject = configurationProjectService.getProject(projectName);
Path projectPath = fileSystemStorage.toAbsolutePath(configurationProject.getRootPath());
Path targetPath = fileSystemStorage.toAbsolutePath(path).normalize();
if (!targetPath.startsWith(projectPath)) {
throw new ApiException("Path is outside project directory", HttpStatus.FORBIDDEN);
}
} catch (ApiException exception) {
throw new IllegalArgumentException("Project does not exist: " + projectName);
}
}
src/main/java/org/frankframework/flow/configuration/ConfigurationService.java:115
addConfiguration()still resolvesCONFIGURATIONS_DIRunderconfigurationProject.getRootPath(). With the new configuration-project layout,rootPathis (or can be) the configuration project directory already, so this creates a nested.../src/main/configurations/.../src/main/configurationsor rejects absolutenamevalues. Align this with the new root-path semantics by writing relative to the configuration project's actual root directory (and adjusting the path traversal checks accordingly).
if (!Files.exists(configDir)) {
Files.createDirectories(configDir);
}
Path filePath = configDir.resolve(configurationName).normalize();
if (!filePath.startsWith(configDir)) {
throw new ApiException("Invalid configuration name: " + configurationName, HttpStatus.BAD_REQUEST);
}
Files.createDirectories(filePath.getParent());
String defaultXml = loadDefaultConfigurationXml();
Document updatedDocument = XmlConfigurationUtils.insertFlowNamespace(defaultXml);
src/main/java/org/frankframework/flow/adapter/AdapterService.java:52
getAdapter()looks up the configuration XML viaconfigurationProject.getConfigurationFiles(), butConfigurationProjectService.loadProjectFromStorage()never populatesconfigurationFiles. In production this will makegetAdapter()reliably throwConfigurationNotFoundExceptioneven when the file exists on disk. Either load/populateconfigurationFileswhen a project is loaded, or (preferably) read and parse the requested configuration file directly from storage after validating it belongs to the project.
ConfigurationFile config = configurationProject.getConfigurationFiles().stream()
.filter(configurationFile -> configurationFile.getFilepath().equals(configurationPath))
.findFirst()
.orElseThrow(() -> new ConfigurationNotFoundException(String.format("Configuration File with path: %s not found", configurationPath)));
Document configDoc = XmlSecurityUtils.createSecureDocumentBuilder()
.parse(new ByteArrayInputStream(config.getXmlContent().getBytes(StandardCharsets.UTF_8)));
Node adapterNode = XmlAdapterUtils.findAdapterInDocument(configDoc, adapterName);
src/main/frontend/app/routes/projectlanding/new-configuration-modal.tsx:63
- The modal has been renamed to “NewConfigurationModal”, but the header still says “New Project”. Update the title/labels to consistently use the new “Configuration” terminology (e.g., “New Configuration”).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|



This pull request introduces a broad renaming and refactoring of configuration-related concepts throughout the frontend codebase, shifting terminology from "Configuration" to "Configuration File" or "Configuration Project" where appropriate. It also renames and reorganizes several files and components for clarity and consistency, and updates the context menu and navigation to match the new terminology. Additionally, service imports and function calls are updated to use new, more specific service modules. These changes improve naming consistency, code clarity, and maintainability.
Key changes:
Terminology and UI Consistency
File and Component Renaming
configuration-manager.tsx→configuration-overview.tsxandconfiguration-tile.tsx→configuration-file-tile.tsx, and updated all relevant imports and usages [1] [2] [3].Service Layer Refactor
configuration-file-service), updating functions likecreateConfiguration→createConfigurationFileandclearConfigurationCache→clearConfigurationFileCachethroughout the codebase [1] [2] [3] [4] [5] [6] [7] [8] [9].Type and Prop Improvements
Project→ConfigurationProjectandRecentProject→RecentConfigurationProject[1] [2] [3].Minor Code and Style Cleanups
.editorconfigrules for XML template indentation.These updates collectively improve the maintainability and clarity of the codebase, especially as it relates to configuration file management and project structure.