- 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> |
||
---|---|---|
migrations | ||
src | ||
tests | ||
.env.example | ||
.gitignore | ||
Cargo.lock | ||
Cargo.toml | ||
diesel.toml | ||
LICENSE | ||
README.md | ||
shell.nix |
researchequals-api
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).