This repo is a classic case of AI-assisted bloat—perfectly fine on the basics like tests, security, and docs, but a sprawling mess in structure that screams “someone let the files run wild.” When your biggest sins are ginormous files tipping over 1,200 lines and nesting so deep you want a spelunking helmet, it’s time to slice and dice. Fix the monoliths and flatten that nesting before the rats move in.
Error Handling:Not a single error handling issue—your AI knew when to behave.
Code Structure:Oof, 39 structural issues and massive files suggest your codebase is a code souffle that’s collapsed under its own weight.
Test Coverage:Solid B, but surprise! No test script in package.json makes running tests one manual step too many.
Security:Locked down like Fort Knox, zero security flaws detected—AI didn’t mess this part up.
Dependencies:Clean as a whistle with no dependency issues, don’t change a thing here.
Documentation:Perfect docs score means at least the AI wrote the manual for this chaotic mess.
Add a test script to package.json. Example: "test": "vitest" or "test": "jest".
high·app/api/v1/chat/route.ts
Large file (511 lines) — likely doing too much
511 LOC, threshold is 400
app/api/v1/chat/route.ts is 511 lines long. Break it into smaller, focused modules. Each file should have one clear responsibility.
high·components/ai/prompt-input.tsx
Large file (1298 lines) — likely doing too much
1298 LOC, threshold is 400
components/ai/prompt-input.tsx is 1298 lines long. Break it into smaller, focused modules. Each file should have one clear responsibility.
high·components/chat/chat-interface.tsx
Large file (528 lines) — likely doing too much
528 LOC, threshold is 400
components/chat/chat-interface.tsx is 528 lines long. Break it into smaller, focused modules. Each file should have one clear responsibility.
high·lib/demo/content.ts
Large file (561 lines) — likely doing too much
561 LOC, threshold is 400
lib/demo/content.ts is 561 lines long. Break it into smaller, focused modules. Each file should have one clear responsibility.
medium·app/(dashboard)/admin/actions.ts
Deep nesting detected (4 levels) — hard to read and maintain
Max nesting depth: 4
app/(dashboard)/admin/actions.ts has 4 levels of nesting. Use early returns, extract helper functions, or restructure conditionals to flatten the code.
medium·app/(dashboard)/documents/[id]/page.tsx
Deep nesting detected (6 levels) — hard to read and maintain
Max nesting depth: 6
app/(dashboard)/documents/[id]/page.tsx has 6 levels of nesting. Use early returns, extract helper functions, or restructure conditionals to flatten the code.
medium·app/(dashboard)/eval/actions.ts
Deep nesting detected (4 levels) — hard to read and maintain
Max nesting depth: 4
app/(dashboard)/eval/actions.ts has 4 levels of nesting. Use early returns, extract helper functions, or restructure conditionals to flatten the code.
medium·app/api/chat/route.ts
Deep nesting detected (8 levels) — hard to read and maintain
Max nesting depth: 8
app/api/chat/route.ts has 8 levels of nesting. Use early returns, extract helper functions, or restructure conditionals to flatten the code.
medium·app/api/v1/chat/route.ts
Deep nesting detected (7 levels) — hard to read and maintain
Max nesting depth: 7
app/api/v1/chat/route.ts has 7 levels of nesting. Use early returns, extract helper functions, or restructure conditionals to flatten the code.
medium·app/api/v1/search/route.ts
Deep nesting detected (4 levels) — hard to read and maintain
Max nesting depth: 4
app/api/v1/search/route.ts has 4 levels of nesting. Use early returns, extract helper functions, or restructure conditionals to flatten the code.
medium·app/auth/confirm/route.ts
Deep nesting detected (4 levels) — hard to read and maintain
Max nesting depth: 4
app/auth/confirm/route.ts has 4 levels of nesting. Use early returns, extract helper functions, or restructure conditionals to flatten the code.
medium·components/admin/demo-manager.tsx
Deep nesting detected (4 levels) — hard to read and maintain
Max nesting depth: 4
components/admin/demo-manager.tsx has 4 levels of nesting. Use early returns, extract helper functions, or restructure conditionals to flatten the code.
medium·components/ai/message.tsx
Deep nesting detected (5 levels) — hard to read and maintain
Max nesting depth: 5
components/ai/message.tsx has 5 levels of nesting. Use early returns, extract helper functions, or restructure conditionals to flatten the code.
medium·components/ai/prompt-input.tsx
Deep nesting detected (7 levels) — hard to read and maintain
Max nesting depth: 7
components/ai/prompt-input.tsx has 7 levels of nesting. Use early returns, extract helper functions, or restructure conditionals to flatten the code.
medium·components/chat/chat-interface.tsx
Deep nesting detected (9 levels) — hard to read and maintain
Max nesting depth: 9
components/chat/chat-interface.tsx has 9 levels of nesting. Use early returns, extract helper functions, or restructure conditionals to flatten the code.
medium·components/chat/conversation-list.tsx
Deep nesting detected (4 levels) — hard to read and maintain
Max nesting depth: 4
components/chat/conversation-list.tsx has 4 levels of nesting. Use early returns, extract helper functions, or restructure conditionals to flatten the code.
medium·components/documents/document-detail.tsx
Deep nesting detected (5 levels) — hard to read and maintain
Max nesting depth: 5
components/documents/document-detail.tsx has 5 levels of nesting. Use early returns, extract helper functions, or restructure conditionals to flatten the code.
medium·components/documents/document-list.tsx
Deep nesting detected (5 levels) — hard to read and maintain
Max nesting depth: 5
components/documents/document-list.tsx has 5 levels of nesting. Use early returns, extract helper functions, or restructure conditionals to flatten the code.
medium·components/documents/upload-form.tsx
Deep nesting detected (4 levels) — hard to read and maintain
Max nesting depth: 4
components/documents/upload-form.tsx has 4 levels of nesting. Use early returns, extract helper functions, or restructure conditionals to flatten the code.
medium·components/eval/eval-results.tsx
Deep nesting detected (6 levels) — hard to read and maintain
Max nesting depth: 6
components/eval/eval-results.tsx has 6 levels of nesting. Use early returns, extract helper functions, or restructure conditionals to flatten the code.
medium·components/eval/feedback-suggestions.tsx
Deep nesting detected (5 levels) — hard to read and maintain
Max nesting depth: 5
components/eval/feedback-suggestions.tsx has 5 levels of nesting. Use early returns, extract helper functions, or restructure conditionals to flatten the code.
medium·components/eval/test-set-manager.tsx
Deep nesting detected (6 levels) — hard to read and maintain
Max nesting depth: 6
components/eval/test-set-manager.tsx has 6 levels of nesting. Use early returns, extract helper functions, or restructure conditionals to flatten the code.
medium·components/forgot-password-form.tsx
Deep nesting detected (5 levels) — hard to read and maintain
Max nesting depth: 5
components/forgot-password-form.tsx has 5 levels of nesting. Use early returns, extract helper functions, or restructure conditionals to flatten the code.
medium·components/login-form.tsx
Deep nesting detected (4 levels) — hard to read and maintain
Max nesting depth: 4
components/login-form.tsx has 4 levels of nesting. Use early returns, extract helper functions, or restructure conditionals to flatten the code.
medium·components/settings/api-keys-section.tsx
Deep nesting detected (4 levels) — hard to read and maintain
Max nesting depth: 4
components/settings/api-keys-section.tsx has 4 levels of nesting. Use early returns, extract helper functions, or restructure conditionals to flatten the code.
Deep nesting detected (4 levels) — hard to read and maintain
Max nesting depth: 4
components/settings/system-prompt-editor.tsx has 4 levels of nesting. Use early returns, extract helper functions, or restructure conditionals to flatten the code.
medium·components/sign-up-form.tsx
Deep nesting detected (6 levels) — hard to read and maintain
Max nesting depth: 6
components/sign-up-form.tsx has 6 levels of nesting. Use early returns, extract helper functions, or restructure conditionals to flatten the code.
medium·components/tutorial/fetch-data-steps.tsx
Deep nesting detected (4 levels) — hard to read and maintain
Max nesting depth: 4
components/tutorial/fetch-data-steps.tsx has 4 levels of nesting. Use early returns, extract helper functions, or restructure conditionals to flatten the code.
medium·components/tutorial/sign-up-user-steps.tsx
Deep nesting detected (4 levels) — hard to read and maintain
Max nesting depth: 4
components/tutorial/sign-up-user-steps.tsx has 4 levels of nesting. Use early returns, extract helper functions, or restructure conditionals to flatten the code.
medium·components/update-password-form.tsx
Deep nesting detected (4 levels) — hard to read and maintain
Max nesting depth: 4
components/update-password-form.tsx has 4 levels of nesting. Use early returns, extract helper functions, or restructure conditionals to flatten the code.
medium·lib/rag/embedder.ts
Deep nesting detected (4 levels) — hard to read and maintain
Max nesting depth: 4
lib/rag/embedder.ts has 4 levels of nesting. Use early returns, extract helper functions, or restructure conditionals to flatten the code.
medium·lib/rag/eval-runner.ts
Deep nesting detected (4 levels) — hard to read and maintain
Max nesting depth: 4
lib/rag/eval-runner.ts has 4 levels of nesting. Use early returns, extract helper functions, or restructure conditionals to flatten the code.
medium·lib/rag/optimizer/config.ts
Deep nesting detected (4 levels) — hard to read and maintain
Max nesting depth: 4
lib/rag/optimizer/config.ts has 4 levels of nesting. Use early returns, extract helper functions, or restructure conditionals to flatten the code.
medium·lib/rag/optimizer/experiment.ts
Deep nesting detected (4 levels) — hard to read and maintain
Max nesting depth: 4
lib/rag/optimizer/experiment.ts has 4 levels of nesting. Use early returns, extract helper functions, or restructure conditionals to flatten the code.
medium·lib/rag/optimizer/session.ts
Deep nesting detected (6 levels) — hard to read and maintain
Max nesting depth: 6
lib/rag/optimizer/session.ts has 6 levels of nesting. Use early returns, extract helper functions, or restructure conditionals to flatten the code.
medium·lib/rag/reranker.ts
Deep nesting detected (4 levels) — hard to read and maintain
Max nesting depth: 4
lib/rag/reranker.ts has 4 levels of nesting. Use early returns, extract helper functions, or restructure conditionals to flatten the code.
medium·lib/supabase/proxy.ts
Deep nesting detected (5 levels) — hard to read and maintain
Max nesting depth: 5
lib/supabase/proxy.ts has 5 levels of nesting. Use early returns, extract helper functions, or restructure conditionals to flatten the code.
medium·lib/supabase/server.ts
Deep nesting detected (6 levels) — hard to read and maintain
Max nesting depth: 6
lib/supabase/server.ts has 6 levels of nesting. Use early returns, extract helper functions, or restructure conditionals to flatten the code.
medium·services/ingestion/src/vlm.py
Deep nesting detected (4 levels) — hard to read and maintain
Max nesting depth: 4
services/ingestion/src/vlm.py has 4 levels of nesting. Use early returns, extract helper functions, or restructure conditionals to flatten the code.