business

Verdict

Submitted 6/7/2026, 1:03:30 AM · Completed 6/7/2026, 1:04:16 AM

6.5
pivot
The idea

ASP Net Web API Clean Arch and project references

Pain point
The user is struggling with managing HTTP dependencies in a Clean Architecture ASP.NET Web API project, leading to duplicated validation logic and testability issues.
Who has this problem
Developers using Clean Architecture in ASP.NET Web APIs
Contradiction (TRIZ)
The need to centralize HTTP calls and validation logic conflicts with the typical layering structure where infrastructure shouldn't reference the application layer.
Ideal final result
A centralized validation service that handles HTTP calls without violating architectural principles, allowing for better testability and reduced duplication.
Suggested solution
Create a dedicated validation service within the application layer that handles HTTP calls, with interfaces defined in the application layer and implementations in infrastructure. This allows infrastructure to reference the application layer for mapping responses while maintaining separation of concerns.
Show original source text →
I have an asp net web api project using clean arch. These are the layers: API (controllers) Application (UseCases) Domain Infrastructure (database access I need perform an http call and according to good practices use httpclient direct in usecase is not recommended due to http depencies and unit tests. So the best layer to add the http call is the infrastructure. My question is about where each file should be. I'll need the interface, implementation and the response object. In some projects I worked before all interface are created in domain project, and the implementation in infrastructure. This solution force create all response objects in Domain even objects that are not related to domain. Here is some real scenario that I want refactor in the application. I found 3 UseCases doing the same validation (repeated code). This validation perform an http call using HttpClient directly. I need extract these validations to one single service to centralize the validation logic. Create a valildation UseCase will resolve the duplication it break the SRP (a UseCase can not depend from another usecase) and the http dependency still sits on application layer (interfaces are much better for unit test). A proposed solution is create an application service to be shared between UseCases following this structure: Interface and the responses objects will be created in application layer (External contracts are not Domain concerns) Implementations in infrastructure project. The infrastructure will map the result of http call to the application response type. This solution requires that my infrastructure project references the application project and this is my concern. I've never worked on a project where the infrastructure references the application, and is that reference correct? The application is a inner layer, so in theory the infrastructure can reference the application.
TRIZ inventive level: 3/5· Principles: segmentation, parameter changes
Synthesis verdict
**Pivot**. The proposed architecture is technically sound, aligning with Clean Architecture principles by defining interfaces in the Application layer and implementations in the Infrastructure layer. However, the idea lacks a clear business problem or market need, and the architectural reversal, while acceptable, does not provide a strong unique differentiation. The centralization of validation logic improves maintainability but does not address a specific customer pain point or offer a novel competitive advantage. To pivot, the focus should shift towards tying this refactoring to a measurable business outcome or integrating it into a product offering that guarantees high API reliability.

Strengths

  • The proposed solution follows good practices and Clean Architecture principles.
  • Centralizing validation logic in a shared Application service reduces duplication and improves testability.
  • The Infrastructure layer can reference the Application layer to implement contracts defined there without violating Clean Architecture principles.

Weaknesses

  • The idea lacks a clear business problem or market need.
  • The architectural pattern does not provide a strong unique differentiation.
  • There's a risk of architectural entanglement and maintainability issues due to the dependency reversal.

Best angle

The sharpest framing for this idea would be to integrate the proposed architecture into a SaaS platform that guarantees high API reliability, thereby tying the technical improvement to a measurable business outcome.

Panel verdicts

Competition

nvidia/nemotron-3-nano-omni-30b-a3b-reasoning

6.0

Centralizing validation improves maintainability, but the architectural reversal (infrastructure referencing application) is already common, so differentiation is modest.

The core idea—centralizing HTTP validation in a dedicated service and moving the HttpClient call to the infrastructure layer—addresses duplication and improves testability, which are common refactoring goals. However, the architectural pattern of defining interfaces in the application layer and implementing them in infrastructure is already well‑established in Clean Architecture, Onion, and Hexagonal architectures, and many ASP.NET Core projects follow the same dependency direction (infrastructure depends on abstractions defined in inner layers). Therefore, while the solution is sensible and can be durable if properly encapsulated, it does not provide a strong, unique differentiation from existing approaches; the main benefit is reduced duplication rather than a novel competitive advantage.

Viability

meta/llama-4-maverick-17b-128e-instruct

8.0

The infrastructure layer referencing the application layer is acceptable in this case because it's implementing a contract defined by the application layer.

The proposed solution to extract the repeated validation logic into a shared application service is feasible and follows good practices. Creating an interface in the application layer and its implementation in the infrastructure layer is a suitable approach to handle the HTTP dependency. The concern about the infrastructure project referencing the application project is valid, as it inverts the traditional dependency direction. However, in this case, it's justified because the infrastructure layer is implementing a contract defined in the application layer. The key challenge lies in ensuring that the infrastructure layer correctly maps the HTTP call result to the application response type. Overall, a solo or 2-person team can build this solution within 4-12 weeks, as it involves refactoring existing code and applying established design patterns.

Market

qwen/qwen3-next-80b-a3b-instruct

7.0

Clean Architecture allows Infrastructure to reference Application — but without a paying customer or revenue model, this is an engineering optimization, not a business venture.

Your proposed architecture is technically sound and aligns with Clean Architecture principles: interfaces in Application, implementations in Infrastructure, and avoiding HTTP dependencies in UseCases. The concern about Infrastructure referencing Application is misplaced — in Clean Architecture, dependencies point inward, so Infrastructure (outer layer) can and should reference Application (inner layer) to implement interfaces defined there. This is standard practice in enterprise systems. The real win here is eliminating duplicated validation logic via a shared Application service, which improves maintainability and testability. However, the score is not higher because the idea lacks a clear business problem or market need. This is a technical refactoring question, not a business venture. There’s no indication of a paying audience, revenue model, or customer pain point being solved. Investors or customers don’t pay for ‘better architecture’ — they pay for faster features, lower costs, or new capabilities. Without tying this refactoring to a measurable business outcome (e.g., ‘reducing API failure rates by 40% which cuts customer support costs by $X/year’), this remains an internal engineering improvement. If this were part of a product offering — like a SaaS platform that guarantees high API reliability — then the score would be 9+. As-is, it’s a solid technical decision with zero market demand attached.

Risk

nvidia/llama-3.3-nemotron-super-49b-v1

4.0

Proposed dependency reversal compromises Clean Architecture principles, risking architectural entanglement and maintainability issues.

The proposed solution introduces a circular dependency risk by having Infrastructure reference Application, violating traditional layer independence. This breaks the Clean Architecture principle of directional dependency (Inner layers should not depend on Outer layers). While the intention to reduce duplication and improve testability is sound, the implementation approach significantly increases architectural risk. The dependency reversal (Infrastructure → Application) sets a precarious precedent, potentially leading to a tangled web of dependencies as the project grows. Furthermore, placing response objects in the Application layer may still blur domain boundaries if not carefully managed. **Failure Modes within 6-12 months:** 1. **Architectural Entanglement**: Dependencies become intractable, hindering maintainability and scalability. 2. **Testing Complexity**: Increased inter-layer dependencies complicate unit testing isolation. 3. **Domain Leakage**: Non-domain concerns (external response objects) pollute the Application layer, obscuring core business logic.

Monetization

mistralai/mistral-medium-3.5-128b

8.0

Infrastructure referencing Application is correct when implementing interfaces defined in Application for outer-layer concerns.

Your proposed architecture aligns well with Clean Architecture principles by isolating HTTP dependencies in Infrastructure and defining contracts (interfaces + DTOs) in Application. This avoids polluting Domain with external concerns while maintaining testability. The Infrastructure → Application reference is valid: Infrastructure (outer layer) can depend on Application (inner layer) to implement interfaces defined there. Centralizing the validation logic in an Application service reduces duplication without violating SRP, as the service is a shared utility, not a UseCase. The trade-off is a slight coupling between Infrastructure and Application, but this is acceptable since Infrastructure exists to serve Application. Unit testing remains clean via interface mocking, and Domain stays pure. The only minor risk is overloading Application with too many external contracts, but your use case justifies it.

Synthesized by meta/llama-3.3-70b-instruct · 6.6s