Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Introduction

Introduction documentation!

Architecture

This document specifies the architectural decisions of the serverwiz app.

High-level overview

graph TB
  A[ServerwizApplication] -- Injects --> B[Adapter] -- Into -->
    C[Use case] -- Calls --> D[Port]

Main

The main.rs file should only include presentation logic.

For reference: the current main.rs in the main branch:

{{#include ../../../serverwiz/src/main.rs}}

Lib

The lib.rs file should only inject dependencies to use cases and transfer calls from main.rs to use cases. For this it uses a ServerwizApplication struct.

For reference: the current lib.rs in the main branch:

{{#include ../../../serverwiz/src/lib.rs}}

It also serves the standard rust purpose of being the highest level module.

Hexagonal Architecture

The main paradigm serverwiz uses as the architectural base is hexagonal architecture. This architecture splits the logic into three separate layers: domain, ports and adapters, in which three separate types of structures are made: use cases, ports and adapters respectively.

Use cases

Use cases are domain-level structs that are independent of any dependencies. They call adapters to retrieve data and perform business logic on that data. Use cases should not be aware of the specific adapter they are calling, instead the adapter should be abstracted behind a port contract.

Ports

Ports are abstract contracts that define the expected functionality of an adapter.

Adapters

Adapters implement port contracts and are injected into use cases by the ServerwizApplication struct.

Constraints

IDConstraint

Functional requirements

IDRequirementOwnerPriority
FR01The user specifies a local git repo to useUserMust have
FR02The user specifies a remote git repo to useUserMust have
FR03The user specifies the packwiz directory within a repoUserShould have
FR04The user specifies a working directoryUserMust have
FR05The system updates the modpack in the working directorySystemMust have
FR06The system makes the minecraft jar compliant to the modpack settingsSystemShould have
FR07The system makes the modloader compliant to the modpack settingsSystemShould have
FR08The system can inject secrets into the project filesSystemShould have
FR09The system supports FabricSystemMust have
FR10The system supports ForgeSystemCould have
FR11The system supports QuiltSystemCould have
FR12The system supports NeoForgeSystemShould have

Non-functional requirements

Non-functional requirement attributes are based on the ISO 25010 norm.

IDRequirementAttributePriority
NF02The artefact runs in a containerised environmentPortabilityMust have
NF03The artefact’s Minecraft functionality is compliant with Mojang’s TOSMaturityMust have
NF04The artefact has health check functionalityFault tolerenceShould have