No description
Find a file
Chris Hartgerink 0d73161e39 refactor(security): set refresh_token as HttpOnly cookie (#87)
- add `HttpOnly` cookie for refresh token
- update tests
- update cors for credentials

Fixes #73.

Reviewed-on: #87
Co-authored-by: Chris Hartgerink <chris@libscie.org>
Co-committed-by: Chris Hartgerink <chris@libscie.org>
2025-09-26 12:41:37 +00:00
migrations fix(db): update bio to JSON 2025-09-25 17:21:15 +02:00
src refactor(security): set refresh_token as HttpOnly cookie (#87) 2025-09-26 12:41:37 +00:00
tests refactor(security): set refresh_token as HttpOnly cookie (#87) 2025-09-26 12:41:37 +00:00
.env.example feat(core): add s3 upload (#38) 2025-08-01 16:18:02 +00:00
.gitignore feat(core): add s3 upload (#38) 2025-08-01 16:18:02 +00:00
Cargo.lock fix(db): update bio to JSON 2025-09-25 17:21:15 +02:00
Cargo.toml fix(db): update bio to JSON 2025-09-25 17:21:15 +02:00
diesel.toml fix: init diesel ORM 2025-05-21 11:44:36 +02:00
LICENSE Initial commit 2025-05-21 09:39:23 +02:00
README.md fix(db): add pronouns, bio to users (#83) 2025-09-25 10:21:45 +00:00
shell.nix refactor(security): set refresh_token as HttpOnly cookie (#87) 2025-09-26 12:41:37 +00:00

researchequals-api

Conventional Commits SemVer NIX

Welcome to the repository for the ResearchEquals API! 👋 We build this back-end with utmost priority for security, performance, and scalability.

It uses Rust as programming language, Actix as web framework, and Diesel for Object-relational mapping (ORM). We only support MySQL databases.

The ResearchEquals API will be used in conjunction with the upcoming ResearchEquals Client and ResearchEquals front-end, to provide the complete ResearchEquals service.

Development

We use Nix to make it as easy as possible to set up your local development environment. Please ensure you have it installed before proceeding. You also need to have Mysql installed and running locally (for example, brew install mysql).

# Create a reproducible shell environment based on the shell.nix file
nix-shell
# run the database migrations (only necessary the first time)
diesel migration run
# start the API
cargo run

# Run the test suite
cargo test
# or a specific test
cargo test <test_function> --test <test_file>

The Nix shell contains all the relevant environment variables. For an overview of environment variables, see .env.example

Click here for helpful development commands
# Continuously update your run
cargo watch -x run
# Upgrade the dependencies
cargo upgrade -i allow && cargo update

# Nuke the database
diesel database reset
# Create SQL from schema changes (default: generate schema from SQL)
diesel migration generate --diff-schema migration_name
Our commit guide

For our project, we use Conventional Commits. It is a bit of extra work to get started (for maintainers!) but it brings the benefit of good changelogs 😊

type(scope)!: commit message

BREAKING CHANGE: Description

The types can be (see also):

Scopes (see also the Angular example):

  • auth
  • db
  • x

Contributing

We are currently in the early stages of development. We are only accepting contributions in the form of discussions in the issue until we are stable (estimated December 2025).