stresspilot backend is the central engine of the platform. Built with Spring Boot, it manages the execution of test projects, coordinates plugins, and serves APIs to the Super App and the Agent.
Core Design Patterns
The backend follows Clean Architecture principles. This ensures that the business logic (core) is decoupled from external frameworks and delivery mechanisms (ui, infrastructure).
Core Layer
Contains the domain models and use cases. This layer has no dependencies on Spring Boot or any database framework.
Infrastructure Layer
Implements interfaces defined in the core layer. This is where database operations (
PostgreSQL) and external integrations live.Key Components
Project Engine
Project Engine
Handles the creation, updates, and organization of test projects. It manages the entire lifecycle of a test configuration.
Execution Engine
Execution Engine
Responsible for executing individual endpoints and flows. It uses a scalable Thread Pool (
ExecutorService) to handle concurrent test executions for load testing.Plugin Manager
Plugin Manager
Dynamically loads and manages custom plugins at runtime using custom
ClassLoader mechanics. It provides an abstraction layer so the core engine can interact with any plugin via a common interface (EndpointExecutor).Persistence Layer
Persistence Layer
Uses PostgreSQL to store project configurations, endpoint definitions, and test results. We utilize
Spring Data JPA and Hibernate for ORM capabilities.APIs & Communication
The primary communication method with the Super App is over HTTP REST. While gRPC services are available in theui/grpc package, the primary clients rely on the RESTful controllers located in ui/restful. Test results are streamed back to the client using WebSockets.