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
| ID | Constraint |
|---|
Functional requirements
| ID | Requirement | Owner | Priority |
|---|---|---|---|
| FR01 | The user specifies a local git repo to use | User | Must have |
| FR02 | The user specifies a remote git repo to use | User | Must have |
| FR03 | The user specifies the packwiz directory within a repo | User | Should have |
| FR04 | The user specifies a working directory | User | Must have |
| FR05 | The system updates the modpack in the working directory | System | Must have |
| FR06 | The system makes the minecraft jar compliant to the modpack settings | System | Should have |
| FR07 | The system makes the modloader compliant to the modpack settings | System | Should have |
| FR08 | The system can inject secrets into the project files | System | Should have |
| FR09 | The system supports Fabric | System | Must have |
| FR10 | The system supports Forge | System | Could have |
| FR11 | The system supports Quilt | System | Could have |
| FR12 | The system supports NeoForge | System | Should have |
Non-functional requirements
Non-functional requirement attributes are based on the ISO 25010 norm.
| ID | Requirement | Attribute | Priority |
|---|---|---|---|
| NF02 | The artefact runs in a containerised environment | Portability | Must have |
| NF03 | The artefact’s Minecraft functionality is compliant with Mojang’s TOS | Maturity | Must have |
| NF04 | The artefact has health check functionality | Fault tolerence | Should have |