This document explains how to prepare the repository for development and local execution.
git clone <repository-url>
cd authenticationFollow the instructions in installation.md to install:
- Rust toolchain
- PostgreSQL
- Diesel CLI
psqlcommand line client
Create a .env file in the repository root and add the required environment variables.
Example .env:
DATABASE_URL=postgres://postgres:password@localhost:5432/authentication_dev
REDIS_URL=redis://127.0.0.1/
JWT_SECRET=replace_with_a_secure_random_secret
SERVER_ADDR=127.0.0.1:8000Adjust values for your environment.
Create the database in PostgreSQL:
createdb authentication_devThen run migrations:
cargo run --bin migrateIf you change app models or schema definitions, generate a migration from the current src/apps/*/models.rs files:
cargo makemigrationsIf the project uses Redis for session or cache support, install and start Redis:
redis-serverThen point REDIS_URL to the running Redis instance.
Run a quick build:
cargo buildIf build succeeds, the repository is ready for development.