How arthurmascaro/pipegene-back-end works
Based on your provided file tree and README, this project is a backend application built with Java (using Maven) that orchestrates genomic data processing pipelines. Its main purpose is to manage and trigger external Python provider services that execute specific pipeline steps (such as pre-processing a MAF file into a PNG, further pre-processing output, and variant classification). The backend ties together user management, pipeline configuration, execution management, and external integrations (via REST or similar calls) while persisting domain data (using PostgreSQL via Docker).
Main components
• Backend Application Layer: Represented by your Spring Boot “PipegeneApplication”, the REST controllers (in the “web/controller” packages), and the security configuration components. These manage API endpoints, handle user and pipeline requests, and secure communications (using JWT, CORS, etc.).
• Business Logic / Use Cases: Capture the “usecases” packages (account, execution, group, pipeline, project, provider, etc.). These components orchestrate calls to the persistence layer and external services.
• Domain and Persistence Layer: Include the “domain” models and the “external/persistence” DAOs and Entity classes. This layer maps business objects and handles read/write operations with the database.
• Configuration and Infrastructure: Include the configuration components (security, Jackson, scheduling, properties) that set up dependencies and behavior, and the Docker configuration for Postgres.
Relationships and Data Flow
• Clients (or users via a potential frontend or API consumers) send requests that hit the Backend’s REST Controllers.
• Controllers delegate processing to the corresponding Use Case classes which implement business logic.
• Use Cases interact with the Persistence Layer (DAOs) to read/write domain data (e.g., project, pipeline, execution information) and update records in the PostgreSQL database.
• Use Cases also call External Provider Clients. For example:
• The “Grafico pré processamento” provider receives a MAF file and returns a PNG.
• The “Pré processamento - Rodrigo” provider receives a MAF and returns a processed MAF.
• The “Classificação de variante - Rodrigo” provider receives a processed MAF and returns a classification PNG.
• The local storage service (LocalStorageService) is used for managing file uploads/downloads by the web layer.
Important Architectural Patterns and Principles
• Layered Architecture: Clearly separate the presentation layer (web controllers) from the business logic layer (use cases/service layer) and data access layer (persistence/DAOs).
• External API Integration: Use dedicated client components (in “external/client”) for communication with Python services.
• Configuration & Security: Emphasize the use of properties configuration (via YAML and dedicated properties classes), JWT and CORS for securing access.
• Use of Docker for infrastructure: The Docker Compose setup for PostgreSQL clearly encapsulates your database environment.
Instructing the Principal Software Engineer
• Start from the top with client interactions hitting the Web layer (REST controllers). Label these clearly.
• Branch out to illustrate two major interactions:
1. To the Persistence Layer/Database: show CRUD operations via DAOs and Entities.
• Dockerized PostgreSQL instance.