Summary
The codebase contains hardcoded "magic numbers" that should be extracted into named constants for better readability and maintainability.
Problem
Magic numbers are numeric literals used directly in code without explanation. They make code harder to understand and maintain.
Examples to Address
- Timeouts and delays (e.g.,
setTimeout(..., 5000))
- Size limits and thresholds
- Retry counts
- Dimension values
Files to Review
src/app/project/[projectId]/page.tsx
src/inngest/functions.ts
actions/*.ts files
Limits.ts (ensure all limits are properly documented)
Example
// Before
if (userProjects.length >= 5) { ... }
// After
const MAX_PROJECTS_FREE_TIER = 5;
if (userProjects.length >= MAX_PROJECTS_FREE_TIER) { ... }
Summary
The codebase contains hardcoded "magic numbers" that should be extracted into named constants for better readability and maintainability.
Problem
Magic numbers are numeric literals used directly in code without explanation. They make code harder to understand and maintain.
Examples to Address
setTimeout(..., 5000))Files to Review
src/app/project/[projectId]/page.tsxsrc/inngest/functions.tsactions/*.tsfilesLimits.ts(ensure all limits are properly documented)Example
// Before
if (userProjects.length >= 5) { ... }
// After
const MAX_PROJECTS_FREE_TIER = 5;
if (userProjects.length >= MAX_PROJECTS_FREE_TIER) { ... }