Create polls for images.
Using the nix package manager is recommended.
The provided flake.nix sets up all necessary development dependencies, as well as providing a few utility commands.
You can use nix-direnv, or use nix develop
directly. Use start-db
and stop-db
to manage the databases.
If you are not using nix, you will need a postgres
and a valkey
instance.
For configuration options of those services, see the shell.nix file.
Copy config.example.toml and rename it to config.toml
.
Some entries already have sane defaults, others you will have to configure yourself.
Cryptographically strong passphrases for the JWT implementation can be generated using botan rng --format=hex 64
.
flare uses mTLS between itself and the exposing reverse proxy. Certificates can be generated using the cert-gen.sh file. Any reverse proxy (e.g. caddy) can be used for development work, or you can disable mTLS entirely.
flare uses a number of oauth providers, for which you need to acquire client IDs / secrets.
A new application can be created at the Discord Developer Portal.
In the OAuth2 tab, add your callback URL (e.g. https://localhost/api/oauth/discord/callback
).
This is also were you will find your client id and secret.
A new application can be created in the GitHub settings.
Set your callback URL (e.g.https://localhost/api/oauth/github/callback
).
After creating an app, you will be shown your client id and secret.
All schema entries are migration-first.
If you need to modify the schema, create a new migration with your changes.
If the latest migration has not been part of a release, it should be modified instead of creating a new migration.
Afterwards run any test, it does not need to succeed, only the migration must be successful.
Afterwards run the gen
command in the server/
directory.