first commit

This commit is contained in:
Beyhan Oğur
2026-04-26 22:31:06 +03:00
commit 6e06119135
30 changed files with 1232 additions and 0 deletions

29
README.md Normal file
View File

@@ -0,0 +1,29 @@
# Rust Account System (Axum + SeaORM)
Minimal skeleton implementing an account system using Axum and SeaORM.
Quick start
1. Copy `.env.example` to `.env` and edit values.
2. Ensure `DATABASE_URL` points to your Postgres instance.
3. Run migrations using `sea-orm-cli` or your preferred migration runner:
```sh
cargo install sea-orm-cli
DATABASE_URL="postgres://user:pass@localhost:5432/dbname" sea-orm-cli migrate up
```
4. Build and run:
```sh
cargo build
cargo run
```
API prefix: `/api/v1/` (e.g., `/api/v1/auth/register`).
Password hashing: BCrypt-SHA256 (pre-hash using SHA-256 then bcrypt). See `src/core/security.rs`.
OAuth: Google and GitHub are planned (configure client ids and secrets in `.env`).
Notes on switching DBs: change `DATABASE_URL` and use sea-orm-cli with the proper feature/driver.