-
Stefan Freudenberg authoredStefan Freudenberg authored
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