-
Notifications
You must be signed in to change notification settings - Fork 1
chore: Write document and refactor some codes #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: Write document and refactor some codes #2
Conversation
WalkthroughRefactors role handling from enum to string constants across domain, application, and web layers; adds infrastructure wiring (DI, EF repository, password hasher, JWT token service, caching, health checks); introduces config classes, many documentation files, CI automation (Dependabot + GitHub Actions), and startup/middleware updates. (48 words) Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Client
participant API as Web.Api (AuthController)
participant App as Application (LoginCommandHandler)
participant Repo as IUserRepository
participant Hash as PasswordHasher
participant Token as TokenService
Client->>API: POST /api/v1/auth/login
API->>App: Send LoginCommand
App->>Repo: GetByEmailAsync(email)
Repo-->>App: User (Roles: List<string>)
App->>Hash: VerifyPassword(password, hash)
alt valid
App->>Token: GenerateAccessToken(UserInfo with Roles)
Token-->>App: JWT + refresh token
App-->>API: Success (tokens, user info)
API-->>Client: 200 OK
else invalid
App-->>API: Failure (error)
API-->>Client: 400 Bad Request (error.description)
end
sequenceDiagram
autonumber
participant Host as Program.cs
participant DI as ServiceCollectionExtensions
participant DB as DataContext
participant Auth as JWT Auth
participant HC as HealthChecks
Host->>DI: AddInfrastructureServices(configuration)
DI->>DB: Register DbContext (SQL Server), Repositories, Services
DI->>HC: AddHealthChecks(SQL, Redis?)
Host->>Auth: Configure JWT Bearer (settings)
Host->>Host: EnsureDatabaseCreatedAsync()
Host->>DB: Database.EnsureCreatedAsync()
Host->>Host: UseAuthentication/UseAuthorization, Map /health, UseMiddlewares
Host->>Host: RunAsync()
Estimated code review effort🎯 5 (Critical) | ⏱️ ~120 minutes Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Free 📒 Files selected for processing (26)
💤 Files with no reviewable changes (1)
✅ Files skipped from review due to trivial changes (3)
🚧 Files skipped from review as they are similar to previous changes (2)
Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. Comment |
…factor-some-codes chore: Write document and refactor some codes
Summary by CodeRabbit
New Features
Refactor
Documentation
Chores