Files
vmall/openspec/changes/archive/2026-09-17-foundation-auth/tasks.md
T

21 lines
714 B
Markdown

# Tasks: foundation-auth
## 1. Backend skeleton
- [x] Cargo workspace, vmall-api crate (axum, sqlx, redis, tower-http)
- [x] Config from env (DATABASE_URL, REDIS_URL, JWT_SECRET, PORT)
- [x] Health + readiness endpoints (db/redis checked)
- [x] sqlx migrate on boot; 0001_init migration
## 2. Identity schema
- [x] Migration: users, shops tables; role enum
- [x] Seed platform admin (admin@vmall.local / admin1234)
## 3. Auth API
- [x] POST /api/auth/register (customer role)
- [x] POST /api/auth/login → JWT + user
- [x] GET /api/auth/me (Bearer)
- [x] Auth extractor + require_role guard
## 4. Tests
- [x] cargo test: register/login/me happy path, wrong password, role guard denies customer on admin route