No service-layer separation
Part of Architecture & Best Practices, which counts for 15% of the overall score. When this check fires it deducts 4 points from that category, once per scan, no matter how many places it turns up.
What it detects
A large route/controller file makes direct data-access calls inline, mixing HTTP concerns with business logic.
Why it matters
When a route file both parses HTTP and talks to the database, the business logic can only be tested through HTTP and cannot be reused by a background job, CLI, or another route. Validation and data rules drift between endpoints that do the same thing. A thin service layer keeps each endpoint short and gives the logic one home.
How to fix it
Pull data access and business rules out of the route file into service or repository modules: functions like getUser(id) or createOrder(input) that take plain arguments and return plain results, with no req/res in their signatures. The route handler shrinks to validate input, call the service, and shape the response. The same pattern applies in Python, with FastAPI or Flask handlers delegating to a services module.
The paid report includes a ready-to-paste prompt for your AI coding agent for every check it finds, pointed at the exact findings from your scan. See pricing
Does your repo trip this check?
Paste a GitHub URL or drop a project folder. Scans run in your browser and take seconds.
Scan your repo