Analyze the following [CODE/DESIGN/PROBLEM] with brutal honesty.
INPUT:
[PASTE YOUR CODE/ARCHITECTURE/PROBLEM HERE]
CONSTRAINTS:
– Technology stack: [e.g., Express.js, React, PostgreSQL]
– Environment: [e.g., production, free tier deployment]
– Scale requirements: [e.g., MVP, 10k users/month, etc]
ANALYZE FOR:
1. Security vulnerabilities (auth, data exposure, injection attacks)
2. Performance bottlenecks (queries, caching, N+1 problems)
3. Scalability issues (database design, API limits, race conditions)
4. Code quality (maintainability, readability, best practices)
5. Edge cases & error handling (null checks, timeouts, rollbacks)
OUTPUT FORMAT – For each flaw found:
– Flaw: [What's wrong]
– Consequence: [Why it matters & potential cascading failures]
– Severity: Critical / Major / Minor
– Fix: [Specific, actionable solution]
– Alternative: [1-2 better approaches]
THEN:
– Identify remaining risks if this fix fails
– Propose 2 completely different architectures (if applicable)
– Rank all issues by impact, not just severity
– No sugar-coating. Be direct & ruthless.
Notes:can give some feedback through comment.