Dev#9
Conversation
fix: add ignore extras in .env
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (26)
📝 WalkthroughWalkthroughThis PR introduces a comprehensive admin panel backed by Starlette-Admin, upgrades the API to v1 versioning, establishes a backend test suite with CI integration, and adds supporting build and development configuration. ChangesAdmin Panel Infrastructure
API v1 Versioning with Backend Testing
Build Infrastructure & Development Configuration
Sequence DiagramsequenceDiagram
actor User as Admin User
participant Browser
participant Nginx
participant FastAPI
participant AdminAuth as AdminAuthProvider
participant DB as Database
participant SessionStore as Session Storage
User->>Browser: Navigate to /admin
Browser->>Nginx: GET /admin
Nginx->>Nginx: Redirect to /admin/
Nginx->>FastAPI: Proxy /admin/
FastAPI->>AdminAuth: Check is_authenticated
AdminAuth->>SessionStore: Query _SESSION_KEY_ID
alt No Active Session
SessionStore-->>AdminAuth: null
AdminAuth-->>FastAPI: false
FastAPI-->>Nginx: Redirect to login
Nginx-->>Browser: Login form
User->>Browser: Enter email & password
Browser->>Nginx: POST /admin/login
Nginx->>FastAPI: Route to AdminAuthProvider.login
FastAPI->>AdminAuth: login(email, password)
AdminAuth->>DB: SELECT * FROM users WHERE email=?
DB-->>AdminAuth: User record
AdminAuth->>AdminAuth: Verify is_superuser=True, is_active=True
AdminAuth->>AdminAuth: bcrypt.checkpw(password, hashed_password)
alt Credentials Valid
AdminAuth->>SessionStore: Set _SESSION_KEY_ID & _SESSION_KEY_NAME
SessionStore-->>AdminAuth: ✓
AdminAuth-->>FastAPI: Response with session cookie
FastAPI-->>Browser: 200 + Set-Cookie
end
else Active Session Exists
SessionStore-->>AdminAuth: admin_user_id
AdminAuth-->>FastAPI: true
FastAPI-->>Browser: Admin UI
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary by CodeRabbit
New Features
Bug Fixes
/api/v1path prefix.Documentation
Chores