# Which Problems Are Solved This PR improves our NX caching, especially for the console and api. It makes sure that if the console is changed the api is also rebuilt and if the api is changed the functional-ui tests are rerun. It is important to note this only fixes a subset of our problems. # How the Problems Are Solved NX ignores .gitignored files even if they are explicitly added to the inputs of an NX target. To counteract this one can add these files to a .nxignore file with a negated pattern. https://nx.dev/docs/reference/inputs#token-behavior-with-nested-projects . This solution is not documented per se but can be find in this Github issue: https://github.com/nrwl/nx/issues/6821 . Further more nx calculates the hashes of inputs at the start and does not recalculate them even if a dependency of a target changes. To solve this problem one needs to use https://nx.dev/docs/reference/inputs#outputs-of-dependent-tasks . This comment of an NX developer helped me further to understand the actual behaviour of NX: https://github.com/nrwl/nx/issues/33379#issuecomment-3657929455 . # Additional Changes Because the functional-ui tests now correctly run again they had to be fixed. This pr unifies the field names in the user create v1 and v2 ui. # Additional Context To document this somewhere, this proposed fix does not work: https://github.com/nrwl/nx/issues/6821#issuecomment-1309475504 . In my local testing NX runtime inputs also get executed at the beginning of the NX loop and ignore subsequent changes by targets. While testing this fix and browsing through NX code I found this, which could be helpful in the future and isn't documented: https://github.com/nrwl/nx/pull/31428
Zitadel Management Console
The Management Console is Zitadels management UI.
It is built using Angular and part of the Zitadel monorepo.
To get started follow the contributing quick start.
Building
To build for production:
pnpm nx run @zitadel/console:build
This will:
- Generate proto files (via
prebuildscript) - Build the Angular app with production optimizations
Linting
To run linting and formatting checks:
pnpm nx @zitadel/console:lint
To auto-fix formatting issues:
pnpm nx @zitadel/console:lint-fix
Project Structure
src/app/proto/generated/- Generated proto files (Angular-specific format)buf.gen.yaml- Local proto generation configurationproject.json- Nx orchestration and caching for builds and testsprebuild.development.js- Development environment configuration script
Dependency Chain
The Management Console app has the following build dependencies managed by Nx:
@zitadel/proto:generate- Generates the protobuf stubs@zitadel/client:build- Builds the TypeScript gRPC client library@zitadel/console:generate- Generates Management Console-specific protobuf stubs@zitadel/console:build- Creates a production build from Management Console
This ensures that the Management Console always has access to the latest client library and protobuf definitions.
Proto Generation Details
@zitadel/protogeneration: Modern ES modules with@bufbuild/protobuffor v2 APIs- Local
buf.gen.yamlgeneration: Traditional protobuf JavaScript classes for v1 APIs
The Management Console app calls Zitadel v1 and v2 APIs. As long as the Management Console still calls v1 APIs, it needs to import client stubs from separate sources:
Legacy v1 API (Traditional Protobuf)
- Uses local
buf.gen.yamlconfiguration - Generates traditional Google protobuf JavaScript classes extending
jspb.Message - Uses plugins:
protocolbuffers/js,grpc/web,grpc-ecosystem/openapiv2 - Output:
src/app/proto/generated/ - Used for: Most existing Management Console functionality
Modern v2 API (ES Modules)
- Uses
@zitadel/protopackage generation - Generates modern ES modules with
@bufbuild/protobuf - Uses plugin:
@bufbuild/eswith ES modules and JSON types - Output:
login/packages/zitadel-proto/ - Used for: New user v2 API and services
Dependency Management
The Management Console's project.json ensures proper execution order:
@zitadel/proto:generateruns first (modern ES modules)- Management Console's local generation runs second (traditional protobuf)
- Build/lint/start tasks depend on both generations being complete
This approach allows the Management Console app to use both v1 and v2 APIs while maintaining proper build dependencies.
Legacy Information
This project was originally generated with Angular CLI version 8.3.20 and has been updated over time.