Room booking system.
- Rust (latest stable)
- Node.js (LTS v22.15.1 — use
.nvmrcif usingnvm, or equivalent) make(standard on Linux/macOS; use WSL on Windows)docker+docker-compose- Internet access (for installing dependencies and running
setup)
- Windows on WSL (Normal Windows is not supported as makefiles are used here)
- Linux
- macOS
Run everything with one command:
make setupThis will:
- Check for the required tools (Rust, Node.js, Docker, etc.)
- Create a
.envif not found (using the.env.exampleas a template) - Install frontend dependencies
- Install Rust tools (
sqlx-cli) - Ensure
jq,license-checker,cargo-license, etc. are installed - Start the PostgreSQL database in Docker
- Run the database migrations
make devThis will:
- Start the frontend in development mode (hot reloading)
- Run the backend in dev profile with
RUST_LOG=debugfor dev logging
This will also seed the database with initial login credentials for a test admin user and a test student user. The credentials are:
- Admin User:
- Username:
admin - Password:
admin
- Username:
- Student User:
- Username:
student - Password:
student
- Username:
(Release backend + Prod frontend)
make previewThis will:
- Build the frontend in production mode
- Build the backend in release mode
- Start the backend and frontend in production mode
make buildThis will:
- Build the frontend in production mode
- Build the backend in release mode
To run backend unit tests, use:
make testAdd a new migration:
make migrate-new name="migration_name"Run migrations:
make migrate-runRevert last migration:
make migrate-revertTo regenerate the license and the NOTICE files, run:
make generate-licensesNote that running the application will automatically generate the NOTICE.
- Backend binary name:
bookr - Frontend is statically built and served from
/static - Docker Compose manages local PostgreSQL; Production may use an external database
- It is recommended to use a reverse proxy (like Nginx) in production for serving the frontend and handling SSL termination.
makecommand not found: Ensure you havemakeinstalled. On Windows, use WSL.- Database connection issues: Check your database configuration in the
.envfile and ensure the database is running. - Missing
jq,license-checker, orcargo-license: Ensure they are installed and available in your PATH. You may need to install them manually if not usingmake setup.
- Internal documentation for the backend is provided via Rust's doc comments
///. - Documentation webpage can be generated for the backend using
cargo doc --open.