Commit f010216
authored
Add auth module with register, login, and JWT (#2)
## Summary
- Auth endpoints: POST /api/v1/auth/register, POST /api/v1/auth/login,
GET /api/v1/auth/me
- Reorganized project structure to match architecture doc (api/v1/,
db/entities/, db/migrations/)
- Typed AppConfig with `#[derive(Config)]` for HOST, PORT, DATABASE_URL
- Migration converting all PKs to serial id + UUID pid for
internal/external separation
- Manual SeaORM entity for users (schema! macro doesn't support UUID
fields yet)
- 8 integration tests using Rapina TestClient against real Postgres
- OpenAPI spec exported and committed
- CI: added rapina openapi check and rapina doctor jobs
## Test plan
- [x] `cargo test` passes all 8 auth integration tests locally
- [x] `cargo clippy -- -D warnings` clean
- [x] `cargo fmt --all -- --check` clean
- [x] `rapina doctor` passes (1 warning on /health errors, acceptable)
- [x] `rapina openapi check` passes
- [ ] CI pipeline passes on GitHub
---------
Signed-off-by: arferreira <arfs.antonio@gmail.com>1 parent fe959ae commit f010216
27 files changed
Lines changed: 1887 additions & 12 deletions
File tree
- src
- api
- v1
- auth
- db
- entities
- migrations
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
3 | 5 | | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
0 commit comments