Initial draft

This commit is contained in:
qtchaos
2023-12-31 16:39:55 +02:00
parent baf2169306
commit 86cd905dc8
40 changed files with 2461 additions and 2909 deletions

View File

@@ -1,22 +1,25 @@
---
title: 'Introduction'
---
# Introduction to the backend
The backend is essentially just an account server. There is not much more to it.
The backend is essentially just an account server, there is not much more to it. The client will work fine without it, but no syncing options will be available.
## Metrics
The backend exposes prometheus metrics, it can be accessed on `/metrics`.
The backend exposes an endpoint for [Prometheus metrics](https://prometheus.io/){target="\_blank"} which allows you to keep track of the backend more easily, it can be accessed on `/metrics`.
To view these metrics properly, you'll need to use an analytics program like [Grafana](https://grafana.com/){target="\_blank"}, [which can visualize logs from Prometheus](https://prometheus.io/docs/visualization/grafana/){target="\_blank"}.
## Security
Optionally, there are a few security settings:
- Recaptcha support, the server can verify Recaptcha v3 tokens on register and login.
- Ratelimits, Some expensive endpoints have ratelimits, but only when enabled. This requires an additional redis connection.
- [Recaptcha support](2.configuration.md#captcha), the server can verify Recaptcha v3 tokens on register and login.
- [Ratelimits](2.configuration.md#ratelimits), some expensive endpoints have ratelimits, but only when enabled. This requires an additional redis connection.
## Migrations
To run migrations, You can use the command `pnpm migration:up` inside the docker container.
Migrations help keep your database schema in sync with everyone else. To run migrations, you can use the `pnpm migration:up` command inside the docker container or in your command-line if you're not using docker.
Alternatively, you can enabled `postgres.migrateOnBoot` and it will be automatically migrated on boot.
Alternatively, you can enable the [`postgres.migrateOnBoot`](2.configuration.md#postgresmigrateonboot) variable and it will be automatically migrated on boot.