Setting Up Your Workspace
This page sets up a workspace for your process applications in Visual Studio Code - from an empty machine to the running application in the browser. You do this once per machine. Afterwards you only work in src/apps/, as described in Getting Started.
The platform components come as npm packages from the private ecceene package feed. The workspace itself contains your apps and the configuration; the components, the page frame and the themes are installed with npm install.
What you need
Node.js | 20 or newer (22 LTS recommended) | includes npm; check with |
Git | any current version | to clone and commit your workspace |
Visual Studio Code | current version | |
Access to the ecceene package feed | - | an invitation from ecceene to your e-mail address |
Keycloak client and business service | - | the values for |
Recommended VS Code extensions:
- ESLint (
dbaeumer.vscode-eslint) - shows the lint rules of the workspace while you type - Prettier (
esbenp.prettier-vscode) - formats the code
1. Get access to the package feed
ecceene invites your e-mail address to the Azure DevOps organization ecceene. Accept the invitation, then create your own access token:
- Sign in at
https://dev.azure.com/ecceene. - Open User settings (icon top right) → Personal access tokens → New token.
- Organization
ecceene, scope Packaging: Read, choose an expiry date, create the token and copy it. It is shown only once.
The token is personal. Do not share it and never put it into the workspace or into Git.
2. Store the token in your user .npmrc
npm reads the credentials from the .npmrc in your user folder - %USERPROFILE%\.npmrc on Windows, ~/.npmrc on macOS and Linux. Create the file if it does not exist.
npm expects the token Base64-encoded. In a PowerShell terminal:
[Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes("<your token>"))
On macOS or Linux: printf '%s' "<your token>" | base64.
Add these three lines to your user .npmrc and replace the value of _password with the encoded token:
//pkgs.dev.azure.com/ecceene/packages/_packaging/ecc@Release/npm/registry/:username=ecceene
//pkgs.dev.azure.com/ecceene/packages/_packaging/ecc@Release/npm/registry/:_password=<token in Base64>
//pkgs.dev.azure.com/ecceene/packages/_packaging/ecc@Release/npm/registry/:email=npm@ecceene.com
username and email are fixed values; only the token identifies you. If ecceene gave you access to beta versions, write ecc@Beta instead of ecc@Release - in these three lines and in the project .npmrc below.
3. Open the workspace in VS Code
Clone your workspace repository (it starts as a copy of the ecceene reference workspace eccatm-ui) and open it:
git clone https://[HOST]/[YOUR_REPOSITORY].git my-workspace
cd my-workspace
code .
Or use File → Open Folder… in VS Code. Open a terminal with Terminal → New Terminal; all following commands run there, in the workspace folder.
4. Check the project .npmrc
The workspace contains a .npmrc that tells npm where packages with the scope @ecceene come from. It holds no credentials and is committed:
@ecceene:registry=https://pkgs.dev.azure.com/ecceene/packages/_packaging/ecc@Release/npm/registry/
The address must be exactly the same as in your user .npmrc - including ecc@Release or ecc@Beta. All other packages (React, Vite, …) still come from the public npm registry.
Test the access:
npm view @ecceene/ui-core versions
You see the list of versions you have access to.
5. Install
npm install
This installs the platform package @ecceene/ui-core and everything the workspace needs. The workspace refers to the package in package.json:
"dependencies": {
"@ecceene/ui-core": "^0.2.0"
}
^0.2.0 accepts fixes and new components within 0.2. package-lock.json records the exact version that was installed - commit it, so everybody in your team and your build use the same version.
6. Configure the connection
Copy the template and fill in the values from your administrator:
cp .env.example .env # PowerShell: Copy-Item .env.example .env
VITE_KEYCLOAK_URL=https://[HOST]
VITE_KEYCLOAK_REALM=[YOUR_REALM]
VITE_KEYCLOAK_CLIENT_ID=[YOUR_PUBLIC_CLIENT]
VITE_API_BASE_URL= # empty = same origin (dev proxy)
.env is not committed. In development the dev server forwards all calls to /api to the business service on http://localhost:8877 (server.proxy in vite.config.ts).
7. Start
npm run dev
Open http://localhost:5173. You are sent to the Keycloak login and then see the dashboard with the task list. Changes to your files appear in the browser right away.
Before you commit:
npm run lint
npm run build # type check and production build
The workspace at a glance
my-workspace/
├── .npmrc registry of the @ecceene packages (no credentials)
├── .env.example template for .env
├── package.json dependencies, among them @ecceene/ui-core
├── vite.config.ts alias "@" = src/, dev proxy, package settings
├── src/
│ ├── apps/ YOUR code: process apps, texts, menu
│ │ ├── menu.ts entries of the side navigation
│ │ ├── i18n/ de.json, en.json
│ │ └── purchase/ example app
│ ├── ecc/ process framework - do not change
│ ├── App.tsx routes
│ └── main.tsx start-up
├── Dockerfile, nginx.conf, k8s/ delivery as container
└── node_modules/@ecceene/ui-core/ platform package - do not change
Leave the optimizeDeps block in vite.config.ts as it is: it keeps the dev server from pre-bundling the platform package, which contains the workers of the JSON editor.
Update the platform package
npm outdated @ecceene/ui-core # which newer versions exist
npm install @ecceene/ui-core@latest # take the newest version
npm run build # check your apps against it
Commit package.json and package-lock.json together.
Build the container
The Dockerfile installs the packages with the same credentials, passed as a build secret, so the token never ends up in the image:
docker build --secret id=npmrc,src=%USERPROFILE%\.npmrc -t my-workspace .
On macOS or Linux use src=$HOME/.npmrc.
If something does not work
| Token missing, expired or not Base64-encoded; or the address in the user |
| The project |
|
|
| The |
Login loops or ends on Unauthorized | Wrong values in |
On this page
- Setting Up Your Workspace