Skip to content
Snippets Groups Projects
README.md 2.13 KiB

StrategyTool CI code style: prettier

A SvelteKit web application for tracing administrative measures in sustainable communities

Get started

The development environment relies on Docker Compose so make sure it is installed on your system.

You can start the SvelteKit app in development mode with all dependant services:

docker compose up -d --build

Visit http://localhost:5173 to verify that it is up and running.

Database

We use PostgreSQL with Slonik. Please read its about section before writing database queries.

Migrations are written in SQL and managed with golang-migrate/migrate. The tool provides a command for creating new migrations:

docker compose run --rm migrate create -ext sql NAME

This will produce two empty files in the sql/migrations folder, one for upgrading the schema and one for restoring the current state.

Tests

For end-to-end tests we use Playwright. The tests are run automatically as part of the continuous integration workflow. To execute the tests locally run:

npx playwright install --with-deps
npx playwright test

Deployment

The infrastructure is hosted by Scaleway and managed with Terraform. Follow the instructions for authenticating the Scaleway provider and add a section to your ~/.aws/credentials file using the same credentials:

[strategytool]
aws_access_key_id = <SCW_ACCESS_KEY>
aws_secret_access_key = <SCW_SECRET_KEY>

Now you are ready to modify the infrastructure and deployments with Terraform:

cd terraform/dev
terraform plan

Consent

On this website, we use the web analytics service Matomo to analyze and review the use of our website. Through the collected statistics, we can improve our offerings and make them more appealing for you. Here, you can decide whether to allow us to process your data and set corresponding cookies for these purposes, in addition to technically necessary cookies. Further information on data protection—especially regarding "cookies" and "Matomo"—can be found in our privacy policy. You can withdraw your consent at any time.