Skip to content

Getting started

The admin consumes the platform SDK and talks to the platform API, so it expects the platform repo checked out as a sibling:

SyntecOne/
  syntec-one-platform/   # the API + the SDK (sdk/)
  syntec-one-admin/      # this repo

The app depends on the SDK via "@syntec/one-sdk": "file:../syntec-one-platform/sdk".

First run

  1. Build the SDK once (in the platform repo): bash cd ../syntec-one-platform/sdk && npm install && npm run build
  2. Start the platform API: bash cd ../syntec-one-platform && make up # http://localhost:8080 (CORS allows :4200)
  3. Start this app: bash make up # builds the image, installs deps, serves :4200
  4. Open http://localhost:4200 and log in with admin / Welkom01.

make up fails fast with a clear message if the sibling SDK has not been built.

After changing the SDK

The SDK is copied into the container's node_modules (not symlinked), and Angular's dev server pre-bundles dependencies. So after you rebuild the SDK, refresh it end-to-end or the running app keeps serving the old client:

# 1. rebuild the SDK
cd ../syntec-one-platform/sdk && npm run build
# 2. re-copy it into the admin container
cd ../../syntec-one-admin && make sync-sdk
# 3. clear Angular's dep cache and restart so it re-bundles the SDK
docker compose exec -T web sh -c 'rm -rf .angular/cache'
make down && make up

Symptom if you skip this: new SDK types compile, but at runtime you get records(...).<newMethod> is not a function — the bundle still holds the old SDK.

Run the tests

make test                       # Vitest, in the container
npx vitest run path/to.spec.ts  # a single spec (host)
npx tsc -p tsconfig.app.json --noEmit   # type-check

tsc --noEmit does not run the Angular template compiler. A template that references a private member or calls an imported function directly will pass tsc but fail the real ng build — verify against the dev server build (the web container logs) for template changes.

Daily commands

make up / make down / make logs / make sh / make install (reinstall deps) / make sync-sdk (refresh the SDK copy). See Architecture for the structure.