chore(portal): remove unused components and files; update TypeScript …#4
chore(portal): remove unused components and files; update TypeScript …#4
Conversation
…configuration for improved path resolution
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (7)
📒 Files selected for processing (29)
📝 WalkthroughWalkthroughThis PR establishes foundational API infrastructure for a Next.js project by introducing standardized error handling, authentication and database middleware, schema definitions, and initial route handlers. It also configures the portal application setup files and updates project planning documents with progress tracking. Changes
Sequence DiagramsequenceDiagram
participant Client
participant Middleware as Middleware Chain
participant Auth as Auth Handler
participant DB as DB Context
participant Router as Router/Handler
Client->>Middleware: HTTP Request
Middleware->>Auth: requireAuth/authMiddleware
Auth->>Auth: Validate session via headers
alt Session invalid
Auth-->>Client: UNAUTHORIZED Error (401)
else Session valid
Auth->>Middleware: Context {session, user}
Middleware->>Middleware: orgMiddleware (check x-org-slug)
alt Org slug missing or not found
Middleware-->>Client: BAD_REQUEST/FORBIDDEN Error
else Org valid
Middleware->>DB: dbProvider inject database
DB->>Middleware: Context {db}
Middleware->>Router: publicProcedure with all context
Router->>Router: Execute handler (e.g., createCard)
Router->>DB: Insert into cards table
DB-->>Router: Card created
Router-->>Client: Response {cardName}
end
end
Estimated Code Review Effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly Related PRs
Poem
✨ Finishing Touches
🧪 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 |
…configuration for improved path resolution
Summary by CodeRabbit
New Features
Chores