-
Notifications
You must be signed in to change notification settings - Fork 0
feat: refacto codebase #484
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
Conversation
WalkthroughThis update restructures the server-side codebase by modularizing and centralizing database actions, types, and validations for users, reports, logs, and metrics. Legacy action and type files are removed, replaced by new modular directories for each entity, each housing create, get, update, and delete logic with consistent error handling and response types. Type definitions and validation schemas are refactored into dedicated files, with extended types for entities including timestamp metadata. The Drizzle ORM setup is reorganized under a new Changes
Sequence Diagram(s)sequenceDiagram
participant UI
participant ActionsIndex as Server Actions Index
participant UserActions as User Actions
participant LogActions as Log Actions
participant MetricActions as Metric Actions
participant ReportActions as Report Actions
participant Database
UI->>ActionsIndex: import { createUser, createLog, ... }
ActionsIndex->>UserActions: createUser(payload)
UserActions->>Database: insert user
Database-->>UserActions: user record
UserActions-->>ActionsIndex: ActionResponse<User>
ActionsIndex-->>UI: ActionResponse<User>
UI->>ActionsIndex: createLog(payload)
ActionsIndex->>LogActions: createLog(payload)
LogActions->>Database: insert log
Database-->>LogActions: log record
LogActions-->>ActionsIndex: ActionResponse<Log>
ActionsIndex-->>UI: ActionResponse<Log>
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (51)
💤 Files with no reviewable changes (7)
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
This is an automated pull request for branch feat/refacto-codebase
Summary by CodeRabbit
New Features
Bug Fixes
Refactor
Chores