Forge
Concepts

Workspace

Understand how Forge manages your workspace

Workspace

A Forge workspace is an Nx workspace — a single repository containing multiple projects that are managed together. Forge extends Nx with plugins tailored for Codeak compliance and polyglot support.

Workspace Structure

Forge proposes a hierarchical structure based on three concepts:

  • Domain — a grouping node that can contain sub-domains or applications
  • Application — contains software components which are released together
  • Component — a software component, such as a React site, a node library, a Spring service, etc.

App repo:

repo/
└── Application1/
    ├── SpringService1/
    ├── SpringService2/
    ├── react-site/
    └── node-lib/

Mega repo:

repo/
├── Domain1/
│   └── Application1/
│       ├── SpringService1/
│       ├── SpringService2/
│       ├── react-site/
│       └── node-lib/
└── Domain2/
    └── Application2/
        ├── SpringService1/
        ├── SpringService2/
        ├── react-site/
        └── node-lib/

Key Files

nx.json

The central configuration file for your workspace. It defines:

  • Plugins — which Forge plugins are active and their options
  • Named inputs — reusable input definitions for caching
  • Conformance — conformance rules for the workspace
{
  "namedInputs": {
    "default": ["{projectRoot}/**/*", "sharedGlobals"],
    "sharedGlobals": ["{workspaceRoot}/.gitlab/**/*"]
  },
  "plugins": [
    { "plugin": "@bjb-forge/nx-js-project/nx-plugin" },
    { "plugin": "@bjb-forge/nx-devcloud-legacy-project/nx-plugin" }
  ],
  "release": {
    "groups": {
      "jbar-app": {
        "projects": ["directory:jbar-app/*"]
      }
    }
  }
}

mise.toml

Manages tool versions (Node.js, pnpm, Java, Maven, etc.) ensuring everyone on the team uses the same versions.

[tools]
"node" = "22.22.0"
"pnpm" = "10.29.3"
"java" = "zulu-17.64.17.0"
"maven" = "3.8.3"

Workspace Sync

Forge uses Nx sync generators to keep the workspace configuration and generated files up to date.

These generators run automatically to maintain consistency across projects. They are typically used for:

  • updating project and workspace configuration
  • enforcing workspace conventions
  • syncing CI configuration files

Running Sync Manually

You can run all sync generators manually:

npx nx sync

This is useful when:

  • you've made structural changes to the workspace
  • you've changed package versions or dependencies
  • you want to ensure configuration and CI files are up to date

Important

Sync generators are not tasks:

  • they do not run through the task pipeline
  • they are not cached
  • they are not defined as project targets

They operate at the workspace level, not per project.

On this page