No description
  • Rust 99.7%
  • Dockerfile 0.2%
  • Nix 0.1%
Find a file
Chris Hartgerink ca67c1ab14
chore(auth): improve username validation
this in response to registration of email addresses. frontend changes
available in 1e43bb7db6
2026-02-24 11:32:20 +01:00
migrations fix(contributors): remove superfluous table 2026-01-31 23:06:46 +01:00
src chore(auth): improve username validation 2026-02-24 11:32:20 +01:00
tests chore(auth): improve username validation 2026-02-24 11:32:20 +01:00
.env.example feat(infra): add docker build 2026-01-28 14:07:13 +01:00
.gitignore feat(core): add s3 upload (#38) 2025-08-01 16:18:02 +00:00
Cargo.lock feat(infra): add docker build 2026-01-28 14:07:13 +01:00
Cargo.toml feat(infra): add docker build 2026-01-28 14:07:13 +01:00
diesel.toml fix: init diesel ORM 2025-05-21 11:44:36 +02:00
docker-compose-example.yml feat(docs): add docker compose example 2026-01-28 20:43:15 +01:00
Dockerfile fix(deps): add curl to Dockerfile 2026-01-28 20:11:54 +01:00
LICENSE Initial commit 2025-05-21 09:39:23 +02:00
README.md feat(versions): join on pids 2026-01-06 12:53:27 +01:00
shell.nix fix(infra): add FRONTEND_URL var 2026-01-23 15:42:12 +01:00

researchequals-api

Conventional Commits SemVer NIX dependency status

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 --bin researchequals-api

# 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

# If you get issues with certificates when testing
SSL_CERT_FILE=/etc/ssl/cert.pem cargo test
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

Seeding the database

If you want to get the pre-ordained set of licenses, publication types, and other elements, please run the seeding scripts:

cargo run --bin seed-licenses

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).