Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4,956 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Automated test suite and build container

Trading Strategy protocol website

A frontend for Trading Strategy protocol.

Install NPM dependencies

Node >=20.19 required.

Setup pnpm

# Enable pnpm via corepack (recommended)
corepack enable

# Verify installation
pnpm --version

Install dependencies

pnpm install --frozen-lockfile

If sharp tries to build from source because Homebrew libvips is installed, use the prebuilt binary instead:

SHARP_IGNORE_GLOBAL_LIBVIPS=1 pnpm install --frozen-lockfile

Install and build submodules

frontend has one submodule dependency installed under deps:

  • fonts - optional licensed fonts (see static/fonts5.css and src/lib/components/css/typography.css)

Install submodules

If you have access to the private tradingstrategy-ai/fonts, initialize and install submodules:

git submodule update --init --recursive

Building submodule dependencies

Once the submodule has been installed, a build step needs to be run in order to have a fully working environment. Run the following script:

bash scripts/build-deps.sh

Running in local dev

Environment variables required by the app are maintained in a checked-in .env file for defaults. Put local-only secrets and overrides in .env.local, which is gitignored and loaded automatically by Vite/SvelteKit. Variables in .env.local override .env.

When running from a git worktree, ignored local files are not copied from the main checkout. Symlink or copy .env.local and the data/ cache before starting the dev server; see worktree setup.

Use the existing prefixes when adding variables:

  • TS_PUBLIC_ for values that may be exposed client-side
  • TS_PRIVATE_ for server-only secrets and private configuration

Start the SvelteKit development server:

pnpm run dev

Running tests

# Unit tests
pnpm run test:unit --run

# Integration tests (requires test build)
pnpm run build --mode=test
pnpm run test:integration

# Secret-backed private R2 integration check
pnpm exec playwright test --config tests/integration/private.playwright.config.ts

Test builds use separate output directories (.svelte-kit-test/, node_modules/.vite-test/) so they don't interfere with the dev server. The regular integration suite uses deterministic .env.test values and mock APIs. Secret-backed checks that depend on your local .env.local use the dedicated private Playwright config above. See docs/tests.md for details.

Documentation

Notes

Code Formatting Standards

We are using Prettier for code formatting. Extensions are available for most code editors / IDEs (see "Editor Support" on Prettier homepage).

If you prefer not to have your editor do automatic formatting, please run the following command and commit properly formatted code before pushing a PR:

pnpm run format

Our CI/CD pipeline runs the following chack on PRs or pushes to master:

pnpm run format:check

dependencies vs devDependencies

adapter-node will bundle devDependencies whereas dependencies must be installed when deploying to production.

Release

Do not do automatic releases. Always ask user confirmation for a release.

Releases

Packages

Used by

Contributors

Languages