Guidance for developing and extending this Rust authentication project.
- Start by ensuring your local environment is configured and migrations are applied.
- Modify or add application code under
src/. - If you add or change database models, update migrations and schema files.
- Run the app locally and verify behavior.
Build the project:
cargo buildRun the main application:
cargo runRun the project in release mode:
cargo run --releaseRun tests:
cargo testRun linting or formatting:
cargo fmt
cargo clippyApply migrations:
cargo run --bin migrateCreate a new migration manually:
cargo run --bin makemigrations <migration_name>List migration status:
cargo run --bin showmigrationsOpen the interactive SQL shell:
cargo run --bin shellOpen a native Postgres shell:
cargo run --bin dbshellThis repository includes a helper to scaffold app modules.
cargo run --bin startapp myappThen update the generated module with your models, handlers, and routes.
src/bin/startapp.rsscaffolds a new self-contained app insrc/apps/<name>/and registers it insrc/apps/mod.rs.- Use
cargo makemigrationsafter model changes to generate SQL migrations fromsrc/apps/*/models.rs.