docs/content/4.backend/0.introduction.md

26 lines
1.3 KiB
Markdown
Raw Normal View History

2023-12-12 18:36:07 +00:00
---
title: 'Introduction'
---
2023-12-31 14:39:55 +00:00
2023-12-12 18:25:35 +00:00
# Introduction to the backend
2024-01-03 19:02:29 +00:00
The backend is essentially just an account server. It handles user accounts, syncing, and other account related features.
## Metrics
2023-12-31 14:39:55 +00:00
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:
2023-12-31 14:39:55 +00:00
- [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
2023-12-31 14:39:55 +00:00
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.
2023-12-31 14:39:55 +00:00
Alternatively, you can enable the [`postgres.migrateOnBoot`](2.configuration.md#postgresmigrateonboot) variable and it will be automatically migrated on boot.