diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 52551daa25..fe88f7cea9 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -33,6 +33,12 @@ jobs:
node_version: "20"
buf_version: "latest"
+ docs:
+ uses: ./.github/workflows/docs.yml
+ with:
+ node_version: "20"
+ buf_version: "latest"
+
version:
uses: ./.github/workflows/version.yml
with:
@@ -87,7 +93,7 @@ jobs:
actions: write
id-token: write
with:
- ignore-run-cache: ${{ github.event_name == 'workflow_dispatch' || fromJSON(github.run_attempt) > 1 }}
+ ignore-run-cache: ${{ github.event_name == 'workflow_dispatch' || fromJSON(github.run_attempt) > 1 }}
node_version: "20"
secrets:
DEPOT_TOKEN: ${{ secrets.DEPOT_TOKEN }}
@@ -126,7 +132,16 @@ jobs:
issues: write
pull-requests: write
needs:
- [version, core-unit-test, core-integration-test, lint, container, login-container, login-quality, e2e]
+ [
+ version,
+ core-unit-test,
+ core-integration-test,
+ lint,
+ container,
+ login-container,
+ login-quality,
+ e2e,
+ ]
if: ${{ github.event_name == 'workflow_dispatch' }}
secrets:
GCR_JSON_KEY_BASE64: ${{ secrets.GCR_JSON_KEY_BASE64 }}
diff --git a/.github/workflows/compile.yml b/.github/workflows/compile.yml
index d171403028..65e7851d48 100644
--- a/.github/workflows/compile.yml
+++ b/.github/workflows/compile.yml
@@ -33,96 +33,59 @@ jobs:
matrix:
goos: [linux, darwin, windows]
goarch: [amd64, arm64]
-
- steps:
- -
- uses: actions/checkout@v4
- -
- uses: actions/cache/restore@v4
- timeout-minutes: 1
- name: restore console
- with:
- path: ${{ inputs.console_cache_path }}
- key: ${{ inputs.console_cache_key }}
- fail-on-cache-miss: true
- -
- uses: actions/cache/restore@v4
- timeout-minutes: 1
- name: restore core
- with:
- path: ${{ inputs.core_cache_path }}
- key: ${{ inputs.core_cache_key }}
- fail-on-cache-miss: true
- -
- uses: actions/setup-go@v5
- with:
- go-version-file: 'go.mod'
- -
- name: compile
- timeout-minutes: 5
- run: |
- GOOS="${{matrix.goos}}" \
- GOARCH="${{matrix.goarch}}" \
- VERSION="${{ inputs.version }}" \
- COMMIT_SHA="${{ github.sha }}" \
- make compile_pipeline
- -
- name: create folder
- run: |
- mkdir zitadel-${{ matrix.goos }}-${{ matrix.goarch }}
- mv zitadel zitadel-${{ matrix.goos }}-${{ matrix.goarch }}/
- cp LICENSE zitadel-${{ matrix.goos }}-${{ matrix.goarch }}/
- cp README.md zitadel-${{ matrix.goos }}-${{ matrix.goarch }}/
- tar -czvf zitadel-${{ matrix.goos }}-${{ matrix.goarch }}.tar.gz zitadel-${{ matrix.goos }}-${{ matrix.goarch }}
- -
- uses: actions/upload-artifact@v4
- with:
- name: zitadel-${{ matrix.goos }}-${{ matrix.goarch }}
- path: zitadel-${{ matrix.goos }}-${{ matrix.goarch }}.tar.gz
- login:
- runs-on: ubuntu-latest
steps:
- -
- uses: actions/checkout@v4
- -
- uses: depot/setup-action@v1
- -
- run: make login_standalone_out
- env:
- DEPOT_TOKEN: ${{ secrets.DEPOT_TOKEN }}
- LOGIN_BAKE_CLI: depot bake
- DEPOT_PROJECT_ID: w47wkxzdtw
- NODE_VERSION: ${{ inputs.node_version }}
- -
- name: move files
- run: |
- cp login/LICENSE login/apps/login/standalone/
- cp login/README.md login/apps/login/standalone/
- tar -czvf login.tar.gz -C login/apps/login/standalone .
- -
- uses: actions/upload-artifact@v4
- with:
- name: login
- path: login.tar.gz
+ - uses: actions/checkout@v4
+ - uses: actions/cache/restore@v4
+ timeout-minutes: 1
+ name: restore console
+ with:
+ path: ${{ inputs.console_cache_path }}
+ key: ${{ inputs.console_cache_key }}
+ fail-on-cache-miss: true
+ - uses: actions/cache/restore@v4
+ timeout-minutes: 1
+ name: restore core
+ with:
+ path: ${{ inputs.core_cache_path }}
+ key: ${{ inputs.core_cache_key }}
+ fail-on-cache-miss: true
+ - uses: actions/setup-go@v5
+ with:
+ go-version-file: "go.mod"
+ - name: compile
+ timeout-minutes: 5
+ run: |
+ GOOS="${{matrix.goos}}" \
+ GOARCH="${{matrix.goarch}}" \
+ VERSION="${{ inputs.version }}" \
+ COMMIT_SHA="${{ github.sha }}" \
+ make compile_pipeline
+ - name: create folder
+ run: |
+ mkdir zitadel-${{ matrix.goos }}-${{ matrix.goarch }}
+ mv zitadel zitadel-${{ matrix.goos }}-${{ matrix.goarch }}/
+ cp LICENSE zitadel-${{ matrix.goos }}-${{ matrix.goarch }}/
+ cp README.md zitadel-${{ matrix.goos }}-${{ matrix.goarch }}/
+ tar -czvf zitadel-${{ matrix.goos }}-${{ matrix.goarch }}.tar.gz zitadel-${{ matrix.goos }}-${{ matrix.goarch }}
+ - uses: actions/upload-artifact@v4
+ with:
+ name: zitadel-${{ matrix.goos }}-${{ matrix.goarch }}
+ path: zitadel-${{ matrix.goos }}-${{ matrix.goarch }}.tar.gz
checksums:
runs-on: ubuntu-latest
- needs: [executable, login]
+ needs: [executable]
steps:
- -
- uses: actions/download-artifact@v4
- with:
- path: executables
- -
- name: move files one folder up
- run: mv */*.tar.gz . && find . -type d -empty -delete
- working-directory: executables
- -
- run: sha256sum * > checksums.txt
- working-directory: executables
- -
- uses: actions/upload-artifact@v4
- with:
- name: checksums.txt
- path: executables/checksums.txt
+ - uses: actions/download-artifact@v4
+ with:
+ path: executables
+ - name: move files one folder up
+ run: mv */*.tar.gz . && find . -type d -empty -delete
+ working-directory: executables
+ - run: sha256sum * > checksums.txt
+ working-directory: executables
+ - uses: actions/upload-artifact@v4
+ with:
+ name: checksums.txt
+ path: executables/checksums.txt
diff --git a/.github/workflows/console.yml b/.github/workflows/console.yml
index 3e77757129..a6fb0e2d54 100644
--- a/.github/workflows/console.yml
+++ b/.github/workflows/console.yml
@@ -1,6 +1,6 @@
name: Build console
-on:
+on:
workflow_call:
inputs:
node_version:
@@ -13,7 +13,7 @@ on:
cache_key:
value: ${{ jobs.build.outputs.cache_key }}
cache_path:
- value: ${{ jobs.build.outputs.cache_path }}
+ value: ${{ jobs.build.outputs.cache_path }}
env:
cache_path: console/dist/console
@@ -25,38 +25,37 @@ jobs:
cache_path: ${{ env.cache_path }}
runs-on: ubuntu-latest
steps:
- -
- uses: actions/checkout@v4
- -
- uses: actions/cache/restore@v4
- timeout-minutes: 1
- continue-on-error: true
- id: cache
- with:
- key: console-${{ hashFiles('console', 'proto', '!console/dist') }}
- restore-keys: |
- console-
- path: ${{ env.cache_path }}
- -
- if: ${{ steps.cache.outputs.cache-hit != 'true' }}
- uses: bufbuild/buf-setup-action@v1
- with:
- github_token: ${{ github.token }}
- version: ${{ inputs.buf_version }}
- -
- if: ${{ steps.cache.outputs.cache-hit != 'true' }}
- uses: actions/setup-node@v4
- with:
- node-version: ${{ inputs.node_version }}
- cache: 'yarn'
- cache-dependency-path: console/yarn.lock
- -
- if: ${{ steps.cache.outputs.cache-hit != 'true' }}
- run: make console_build
- -
- if: ${{ steps.cache.outputs.cache-hit != 'true' }}
- uses: actions/cache/save@v4
- with:
- path: ${{ env.cache_path }}
- key: ${{ steps.cache.outputs.cache-primary-key }}
-
\ No newline at end of file
+ - uses: actions/checkout@v4
+ - uses: actions/cache/restore@v4
+ timeout-minutes: 1
+ continue-on-error: true
+ id: cache
+ with:
+ key: console-${{ hashFiles('console', 'proto', '!console/dist') }}
+ restore-keys: |
+ console-
+ path: ${{ env.cache_path }}
+ - if: ${{ steps.cache.outputs.cache-hit != 'true' }}
+ uses: bufbuild/buf-setup-action@v1
+ with:
+ github_token: ${{ github.token }}
+ version: ${{ inputs.buf_version }}
+ - if: ${{ steps.cache.outputs.cache-hit != 'true' }}
+ uses: pnpm/action-setup@v4
+ - if: ${{ steps.cache.outputs.cache-hit != 'true' }}
+ uses: actions/setup-node@v4
+ with:
+ node-version: ${{ inputs.node_version }}
+ cache: "pnpm"
+ cache-dependency-path: pnpm-lock.yaml
+ - if: ${{ steps.cache.outputs.cache-hit != 'true' }}
+ name: Install dependencies
+ run: pnpm install
+ - if: ${{ steps.cache.outputs.cache-hit != 'true' }}
+ name: Build console with Turbo
+ run: pnpm turbo build --filter=./console
+ - if: ${{ steps.cache.outputs.cache-hit != 'true' }}
+ uses: actions/cache/save@v4
+ with:
+ path: ${{ env.cache_path }}
+ key: ${{ steps.cache.outputs.cache-primary-key }}
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml
new file mode 100644
index 0000000000..2f0ac3d7af
--- /dev/null
+++ b/.github/workflows/docs.yml
@@ -0,0 +1,61 @@
+name: Build docs
+
+on:
+ workflow_call:
+ inputs:
+ node_version:
+ required: true
+ type: string
+ buf_version:
+ required: true
+ type: string
+ outputs:
+ cache_key:
+ value: ${{ jobs.build.outputs.cache_key }}
+ cache_path:
+ value: ${{ jobs.build.outputs.cache_path }}
+
+env:
+ cache_path: docs/build
+
+jobs:
+ build:
+ outputs:
+ cache_key: ${{ steps.cache.outputs.cache-primary-key }}
+ cache_path: ${{ env.cache_path }}
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - uses: actions/cache/restore@v4
+ timeout-minutes: 1
+ continue-on-error: true
+ id: cache
+ with:
+ key: docs-${{ hashFiles('docs', 'proto', '!docs/build', '!docs/node_modules', '!docs/protoc-gen-connect-openapi') }}
+ restore-keys: |
+ docs-
+ path: ${{ env.cache_path }}
+ - if: ${{ steps.cache.outputs.cache-hit != 'true' }}
+ uses: bufbuild/buf-setup-action@v1
+ with:
+ github_token: ${{ github.token }}
+ version: ${{ inputs.buf_version }}
+ - if: ${{ steps.cache.outputs.cache-hit != 'true' }}
+ uses: pnpm/action-setup@v4
+ - if: ${{ steps.cache.outputs.cache-hit != 'true' }}
+ uses: actions/setup-node@v4
+ with:
+ node-version: ${{ inputs.node_version }}
+ cache: "pnpm"
+ cache-dependency-path: pnpm-lock.yaml
+ - if: ${{ steps.cache.outputs.cache-hit != 'true' }}
+ name: Install dependencies
+ run: pnpm install
+ - if: ${{ steps.cache.outputs.cache-hit != 'true' }}
+ name: Build docs with Turbo
+ run: pnpm turbo build --filter=./docs
+ - if: ${{ steps.cache.outputs.cache-hit != 'true' }}
+ uses: actions/cache/save@v4
+ with:
+ path: ${{ env.cache_path }}
+ key: ${{ steps.cache.outputs.cache-primary-key }}
diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml
index e717163507..b9c2159e1c 100644
--- a/.github/workflows/e2e.yml
+++ b/.github/workflows/e2e.yml
@@ -12,44 +12,47 @@ jobs:
browser: [firefox, chrome]
runs-on: ubuntu-latest
steps:
- -
- name: Checkout Repository
+ - name: Checkout Repository
uses: actions/checkout@v4
- -
- uses: actions/download-artifact@v4
+ - uses: actions/download-artifact@v4
with:
path: .artifacts
name: zitadel-linux-amd64
- -
- name: Unpack executable
+ - name: Unpack executable
run: |
tar -xvf .artifacts/zitadel-linux-amd64.tar.gz
mv zitadel-linux-amd64/zitadel ./zitadel
- -
- name: Set up QEMU
+ - name: Set up QEMU
uses: docker/setup-qemu-action@v3
- -
- name: Set up Docker Buildx
+ - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- -
- name: Start DB and ZITADEL
+ - uses: pnpm/action-setup@v4
+ - uses: actions/setup-node@v4
+ with:
+ node-version: 20
+ cache: "pnpm"
+ cache-dependency-path: pnpm-lock.yaml
+ - name: Install dependencies
+ run: pnpm install
+ - name: Install Cypress binary
+ run: cd ./e2e && pnpm exec cypress install
+ - name: Start DB and ZITADEL
run: |
cd ./e2e
ZITADEL_IMAGE=zitadel:local docker compose up --detach --wait
- -
- name: Cypress run
+ - name: Cypress run
uses: cypress-io/github-action@v6
env:
CYPRESS_BASE_URL: http://localhost:8080/ui/console
CYPRESS_WEBHOOK_HANDLER_HOST: host.docker.internal
- CYPRESS_DATABASE_CONNECTION_URL: 'postgresql://root@localhost:26257/zitadel'
+ CYPRESS_DATABASE_CONNECTION_URL: "postgresql://root@localhost:26257/zitadel"
CYPRESS_BACKEND_URL: http://localhost:8080
with:
working-directory: e2e
browser: ${{ matrix.browser }}
config-file: cypress.config.ts
- -
- uses: actions/upload-artifact@v4
+ install: false
+ - uses: actions/upload-artifact@v4
if: always()
with:
name: production-tests-${{ matrix.browser }}
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index e704bdb146..6251076fd2 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -20,7 +20,6 @@ on:
type: string
jobs:
-
lint-skip:
name: lint skip
runs-on: ubuntu-latest
@@ -36,64 +35,53 @@ jobs:
continue-on-error: true
if: ${{ github.event_name == 'pull_request' }}
steps:
- -
- uses: actions/checkout@v4
- -
- uses: bufbuild/buf-setup-action@v1
- with:
- version: ${{ inputs.buf_version }}
- github_token: ${{ secrets.GITHUB_TOKEN }}
- -
- name: lint
- uses: bufbuild/buf-lint-action@v1
- -
- uses: bufbuild/buf-breaking-action@v1
- with:
- against: "https://github.com/${{ github.repository }}.git#branch=${{ github.base_ref }}"
+ - uses: actions/checkout@v4
+ - uses: bufbuild/buf-setup-action@v1
+ with:
+ version: ${{ inputs.buf_version }}
+ github_token: ${{ secrets.GITHUB_TOKEN }}
+ - name: lint
+ uses: bufbuild/buf-lint-action@v1
+ - uses: bufbuild/buf-breaking-action@v1
+ with:
+ against: "https://github.com/${{ github.repository }}.git#branch=${{ github.base_ref }}"
console:
if: ${{ github.event_name == 'pull_request' }}
name: console
runs-on: ubuntu-latest
steps:
- -
- name: Checkout
- uses: actions/checkout@v4
- -
- uses: actions/setup-node@v4
- with:
- node-version: ${{ inputs.node_version }}
- cache: 'yarn'
- cache-dependency-path: console/yarn.lock
- -
- run: cd console && yarn install
- -
- name: lint
- run: make console_lint
+ - name: Checkout
+ uses: actions/checkout@v4
+ - uses: pnpm/action-setup@v4
+ - uses: actions/setup-node@v4
+ with:
+ node-version: ${{ inputs.node_version }}
+ cache: "pnpm"
+ cache-dependency-path: pnpm-lock.yaml
+ - run: pnpm install --filter=console
+ - name: lint
+ run: make console_lint
core:
name: core
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' }}
steps:
- -
- name: Checkout
- uses: actions/checkout@v4
- -
- uses: actions/setup-go@v5
- with:
- go-version-file: 'go.mod'
- -
- uses: actions/cache/restore@v4
- timeout-minutes: 1
- name: restore core
- with:
- path: ${{ inputs.core_cache_path }}
- key: ${{ inputs.core_cache_key }}
- fail-on-cache-miss: true
- -
- uses: golangci/golangci-lint-action@v6
- with:
- version: ${{ inputs.go_lint_version }}
- github-token: ${{ github.token }}
- only-new-issues: true
+ - name: Checkout
+ uses: actions/checkout@v4
+ - uses: actions/setup-go@v5
+ with:
+ go-version-file: "go.mod"
+ - uses: actions/cache/restore@v4
+ timeout-minutes: 1
+ name: restore core
+ with:
+ path: ${{ inputs.core_cache_path }}
+ key: ${{ inputs.core_cache_key }}
+ fail-on-cache-miss: true
+ - uses: golangci/golangci-lint-action@v6
+ with:
+ version: ${{ inputs.go_lint_version }}
+ github-token: ${{ github.token }}
+ only-new-issues: true
diff --git a/.github/workflows/login-quality.yml b/.github/workflows/login-quality.yml
index f8e45794e5..194ed73c42 100644
--- a/.github/workflows/login-quality.yml
+++ b/.github/workflows/login-quality.yml
@@ -4,7 +4,7 @@ on:
workflow_call:
inputs:
ignore-run-cache:
- description: 'Ignore run caches'
+ description: "Ignore run caches"
type: boolean
required: true
node_version:
@@ -44,7 +44,16 @@ jobs:
run: |
tar -xvf .artifacts/zitadel-linux-amd64.tar.gz
mv zitadel-linux-amd64/zitadel ./zitadel
- - run: make login_quality
+ - uses: pnpm/action-setup@v4
+ - uses: actions/setup-node@v4
+ with:
+ node-version: ${{ inputs.node_version }}
+ cache: "pnpm"
+ cache-dependency-path: pnpm-lock.yaml
+ - name: Install dependencies
+ run: pnpm install
+ - name: Run login quality checks with Turbo
+ run: pnpm turbo test:unit --filter=@zitadel/login
env:
DEPOT_TOKEN: ${{ secrets.DEPOT_TOKEN }}
LOGIN_BAKE_CLI: depot bake
diff --git a/.gitignore b/.gitignore
index 0aa6cc1976..dd694bdeb5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -84,7 +84,11 @@ go.work.sum
.netlify
load-test/node_modules
-load-test/yarn-error.log
+load-test/pnpm-debug.log
load-test/dist
load-test/output/*
.vercel
+
+# Turbo
+.turbo/
+**/.turbo/
diff --git a/.npmrc b/.npmrc
new file mode 100644
index 0000000000..7bd51097f9
--- /dev/null
+++ b/.npmrc
@@ -0,0 +1,2 @@
+auto-install-peers = true
+ignore-scripts = "postman-code-generators"
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index ce8b9aff89..bfea059cee 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -30,6 +30,67 @@ Help shaping the future of ZITADEL:
Follow [@zitadel](https://twitter.com/zitadel) on twitter
+## Quick Start for Contributors
+
+ZITADEL uses **pnpm** as package manager and **Turbo** for build orchestration across the monorepo. Here are the most common commands you'll need:
+
+### Prerequisites
+
+- [Node version v20.x](https://nodejs.org/en/download/)
+- [pnpm version 9.x](https://pnpm.io/installation)
+- [Docker](https://docs.docker.com/engine/install/) for running databases and services
+
+### Common Development Commands
+
+```bash
+# Install all dependencies across the monorepo
+pnpm install
+
+# Start the backend database and ZITADEL server
+docker compose --file ./e2e/docker-compose.yaml up --detach zitadel
+
+# Develop the Console (Angular app)
+pnpm turbo dev --filter=console
+
+# Develop the Login UI (Next.js app)
+pnpm turbo dev --filter=@zitadel/login
+
+# Develop the Documentation (Docusaurus)
+pnpm turbo dev --filter=zitadel-docs
+
+# Build everything
+pnpm turbo build
+
+# Lint and fix code across all packages
+pnpm turbo lint
+
+# Run tests
+pnpm turbo test
+
+# Clean up
+docker compose --file ./e2e/docker-compose.yaml down
+```
+
+### Monorepo Structure
+
+The repository is organized as follows:
+
+| Package | Description | Technology | Development Command |
+| ----------------- | --------------------------- | ------------------- | --------------------------------------------- |
+| `console` | Management UI (post-login) | Angular, TypeScript | `pnpm turbo dev --filter=console` |
+| `@zitadel/login` | Authentication UI | Next.js, React | `pnpm turbo dev --filter=@zitadel/login` |
+| `zitadel-docs` | Documentation site | Docusaurus | `pnpm turbo dev --filter=zitadel-docs` |
+| `@zitadel/client` | TypeScript client library | TypeScript | `pnpm turbo build --filter=@zitadel/client` |
+| `@zitadel/proto` | Protocol buffer definitions | Protobuf | `pnpm turbo generate --filter=@zitadel/proto` |
+
+### Development Workflow
+
+1. **Start the backend**: `docker compose --file ./e2e/docker-compose.yaml up --detach zitadel`
+2. **Choose your focus**: Run one of the development commands above
+3. **Make changes**: Edit code with live reload feedback
+4. **Test your changes**: Use the appropriate test commands
+5. **Cleanup**: `docker compose --file ./e2e/docker-compose.yaml down`
+
## How to contribute
We strongly recommend to [talk to us](https://zitadel.com/contact) before you start contributing to streamline our and your work.
@@ -108,13 +169,15 @@ Please make sure you cover your changes with tests before marking a Pull Request
The code consists of the following parts:
-| name | description | language | where to find |
-| --------------- | ------------------------------------------------------------------ | --------------------------------------------------------------------------- | -------------------------------------------------- |
-| backend | Service that serves the grpc(-web) and RESTful API | [go](https://go.dev) | [API implementation](./internal/api/grpc) |
-| console | Frontend the user interacts with after log in | [Angular](https://angular.io), [Typescript](https://www.typescriptlang.org) | [./console](./console) |
-| login | Server side rendered frontend the user interacts with during login | [go](https://go.dev), [go templates](https://pkg.go.dev/html/template) | [./internal/api/ui/login](./internal/api/ui/login) |
-| API definitions | Specifications of the API | [Protobuf](https://developers.google.com/protocol-buffers) | [./proto/zitadel](./proto/zitadel) |
-| docs | Project documentation made with docusaurus | [Docusaurus](https://docusaurus.io/) | [./docs](./docs) |
+| name | description | language | where to find |
+| --------------- | -------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | ----------------------------------------- |
+| backend | Service that serves the grpc(-web) and RESTful API | [go](https://go.dev) | [API implementation](./internal/api/grpc) |
+| console | Frontend the user interacts with after log in | [Angular](https://angular.io), [Typescript](https://www.typescriptlang.org) | [./console](./console) |
+| login | Modern authentication UI built with Next.js | [Next.js](https://nextjs.org), [React](https://reactjs.org), [TypeScript](https://www.typescriptlang.org) | [./login](./login) |
+| API definitions | Specifications of the API | [Protobuf](https://developers.google.com/protocol-buffers) | [./proto/zitadel](./proto/zitadel) |
+| docs | Project documentation made with docusaurus | [Docusaurus](https://docusaurus.io/) | [./docs](./docs) |
+
+**Important**: This repository uses **pnpm** as package manager and **Turbo** for build orchestration. All frontend packages (console, login, docs) are managed as a monorepo with shared dependencies and optimized builds.
Please validate and test the code before you contribute.
@@ -261,40 +324,39 @@ export ZITADEL_IMAGE=zitadel:local GOOS=linux
make docker_image
# If you made changes in the e2e directory, make sure you reformat the files
-make console_lint
+pnpm turbo lint --filter=e2e
# Run the tests
-docker compose --file ./e2e/config/host.docker.internal/docker-compose.yaml run --service-ports e2e
+docker compose --file ./e2e/docker-compose.yaml run --service-ports e2e
```
When you are happy with your changes, you can cleanup your environment.
```bash
# Stop and remove the docker containers for zitadel and the database
-docker compose --file ./e2e/config/host.docker.internal/docker-compose.yaml down
+docker compose --file ./e2e/docker-compose.yaml down
```
#### Run Local End-to-End Tests Against Your Dev Server Console
If you also make [changes to the console](#console), you can run the test suite against your locally built backend code and frontend server.
-But you will have to install the relevant node dependencies.
```bash
-# Install dependencies
-(cd ./e2e && npm install)
+# Install dependencies (from repository root)
+pnpm install
# Run the tests interactively
-(cd ./e2e && npm run open:golangangular)
+cd ./e2e && pnpm run open:golangangular
# Run the tests non-interactively
-(cd ./e2e && npm run e2e:golangangular)
+cd ./e2e && pnpm run e2e:golangangular
```
When you are happy with your changes, you can cleanup your environment.
```bash
# Stop and remove the docker containers for zitadel and the database
-docker compose --file ./e2e/config/host.docker.internal/docker-compose.yaml down
+docker compose --file ./e2e/docker-compose.yaml down
```
### Console
@@ -304,15 +366,15 @@ Using [Docker Compose](https://docs.docker.com/compose/), you run [PostgreSQL](h
You use the ZITADEL container as backend for your console.
The console is run in your [Node](https://nodejs.org/en/about/) environment using [a local development server for Angular](https://angular.io/cli/serve#ng-serve), so you have fast feedback about your changes.
-We use angular-eslint/Prettier for linting/formatting, so please run `yarn lint:fix` before committing. (VSCode users, check out [this ESLint extension](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) and [this Prettier extension](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) to fix lint and formatting issues in development)
+We use **pnpm** as package manager and **Turbo** for build orchestration. Use angular-eslint/Prettier for linting/formatting, so please run `pnpm turbo lint --filter=console` before committing. (VSCode users, check out [this ESLint extension](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) and [this Prettier extension](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) to fix lint and formatting issues in development)
Once you are happy with your changes, you run end-to-end tests and tear everything down.
The commands in this section are tested against the following software versions:
- [Docker version 20.10.17](https://docs.docker.com/engine/install/)
-- [Node version v16.17.0](https://nodejs.org/en/download/)
-- [npm version 8.18.0](https://docs.npmjs.com/try-the-latest-stable-version-of-npm)
+- [Node version v20.x](https://nodejs.org/en/download/)
+- [pnpm version 9.x](https://pnpm.io/installation)
- [Cypress runtime dependencies](https://docs.cypress.io/guides/continuous-integration/introduction#Dependencies)