Files
liqa/docs/development.md
T
ars9 71bcc8faec feat(scenario): step output, getStepOutput helper, export/import MCP tools, doc restructure
- add output column to ScenarioRunStepEntity; exec step return value is JSON-serialised and stored
- expose helpers.getStepOutput(order) in exec code; negative order is relative to current step
- add get_scenario_run, wait_for_scenario_run, export_scenario, import_scenario MCP tools
- move Architecture, Key descriptors, MCP tools, Scenario, Development docs to docs/
- delete CONTRIBUTING.md (replaced by docs/development.md)
2026-04-08 19:02:36 +03:00

2.2 KiB

Development

Prerequisites

  • Node.js 20+
  • Docker + Docker Compose

Install dependencies:

npm install
npx playwright install chromium   # first time only

Copy .env.example to .env and fill in the required values before running.

Environment variables

Variable Default Description
PORT 3000 HTTP port
KEYS_DIR keys Directory containing *.json key descriptors
DB_PATH data/sessions.db SQLite database file
PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH (Playwright default) Path to Chromium binary. Set automatically in Docker (/usr/bin/chromium).

Starting the application

Development (watch mode, restarts on file changes):

npm run start:dev

Production build, then start:

npm run build
npm run start:prod

The application listens on port 3000 by default.


Running tests

npm run test

Run a single spec file:

npm run test -- --no-coverage test/scenario.controller.spec.ts

Watch mode:

npm run test:watch

Enable verbose NestJS log output during tests:

npm run test:debug

Formatting code

Prettier is used to format all TypeScript source and test files:

npm run format

This rewrites src/**/*.ts and test/**/*.ts in place.


Linting

ESLint with typescript-eslint and eslint-config-prettier is used:

# report issues
npm run lint

# report and auto-fix where possible
npm run lint:fix

The project targets zero errors. Run lint before committing.


Building the container

docker compose build

To rebuild without the layer cache:

docker compose build --no-cache

Running with Docker Compose

Start (detached):

docker compose up -d

Build and start in one step:

docker compose up -d --build

The application is exposed at http://localhost:13000.

SQLite data is persisted in ./data/ and key files are mounted from ./keys/ — both directories are volume-mounted into the container.

Stop and remove containers:

docker compose down

View logs:

docker compose logs -f