The epibuilder-backend
is a Spring Boot application that serves as the backend for the epibuilder-frontend
project. It provides an API, and also integrates with Nextflow for running bioinformatics workflow.
To contribute to the project, you'll need to set up your local environment. Here are the requirements to run the project:
- JDK 21 (Java Development Kit)
- Maven (Build automation tool)
- Spring Boot (The project is built using Spring Boot)
- Nextflow (for executing bioinformatics workflows)
- Windows / macOS: Download and install JDK from AdoptOpenJDK or Oracle JDK.
- Linux: You can install JDK using your package manager. For example:
- Ubuntu/Debian:
sudo apt update sudo apt install openjdk-11-jdk
- CentOS/RHEL:
sudo yum install java-11-openjdk-devel
- Ubuntu/Debian:
To verify that Java is installed correctly, run the following command:
java -version
- Windows / macOS / Linux: Download and install Maven from Apache Maven.
- Linux: You can install Maven using your package manager. For example:
- Ubuntu/Debian:
sudo apt install maven
- CentOS/RHEL:
sudo yum install maven
- Ubuntu/Debian:
To verify that Maven is installed correctly, run the following command:
mvn -v
To run bioinformatics workflows, Nextflow must be installed. Follow the instructions on the Nextflow installation page for your platform.
For example, on Linux or macOS, you can install Nextflow via curl
:
curl -s https://get.nextflow.io | bash
For Windows, use the Windows installation instructions.
To verify that Nextflow is installed correctly, run:
nextflow -v
- Clone the repository:
git clone https://github.com/bioinformatics-ufsc/epibuilder-backend.git
- Navigate to the project directory:
cd epibuilder-backend
- Build the project using Maven:
mvn clean install
- Run the application:
mvn spring-boot:run
The backend will start and you can interact with it via the exposed APIs.
- Test the Nextflow Integration:
The backend interacts with Nextflow for running workflows. Ensure that you have Nextflow installed and configured properly before testing workflow execution. You can trigger a workflow execution via the backend's API.
The basic structure of the project is as follows:
epibuilder-backend/
├── src/ # Application source code
│ ├── main/
│ │ ├── java/ # Java source code
│ │ │ ├── ufsc/ # Base package
│ │ │ │ ├── br/ # Domain
│ │ │ │ │ ├── epibuilder/ # Main project package
│ │ │ │ │ │ ├── config/ # Configuration classes
│ │ │ │ │ │ ├── controller/ # API controllers (handling HTTP requests)
│ │ │ │ │ │ ├── dto/ # Data Transfer Objects (DTOs)
│ │ │ │ │ │ ├── exception/ # Exception handling classes
│ │ │ │ │ │ ├── loader/ # Data loading and pipeline management
│ │ │ │ │ │ ├── model/ # Domain models (entities, objects)
│ │ │ │ │ │ ├── repository/ # Data access layer (repositories for DB interactions)
│ │ │ │ │ │ ├── service/ # Services for business logic
│ │ ├── resources/ # Application configuration files
│ │ │ ├── application.properties # Spring Boot and other configurations
├── pom.xml # Maven configuration and dependencies
-
src/main/java/ufsc/br/epibuilder/
: Contains the main application logic.config/
: Configuration classes such as Spring Boot configurations.controller/
: API controllers that handle HTTP requests, map them to service calls, and return responses.dto/
: Data Transfer Objects used to transfer data between layers.exception/
: Custom exception classes, including global exception handlers and error responses.loader/
: Handles data loading.model/
: Domain models (entities or objects representing the core data in the application).repository/
: The data access layer for database interactions.service/
: Service classes that contain the business logic including NextFlow call.
-
src/main/resources/
: Contains configuration files.application.properties
: Configuration file for Spring Boot, including database configurations.
-
pom.xml
: The Maven configuration file where dependencies, plugins, and build settings are defined.
If you'd like to contribute to the project, please follow the steps below:
- Fork the repository.
- Create a new branch for your feature or fix:
git checkout -b my-feature
- Make your changes and commit:
git commit -m "Description of my changes"
- Push your changes to your fork:
git push origin my-feature
- Open a pull request on the main repository for your changes to be reviewed and merged.