From 46a84a516841ce7090998b2783825e1717ac57b5 Mon Sep 17 00:00:00 2001 From: 4o1x5 <4o1x5@4o1x5.dev> Date: Thu, 23 May 2024 09:28:09 +0200 Subject: [PATCH] expanded development secion/ removed contents added examples for git workflow added ci --- readme.md | 135 +++++++++++++++++------------------------------------- 1 file changed, 42 insertions(+), 93 deletions(-) diff --git a/readme.md b/readme.md index 2c9fe9c..0507884 100644 --- a/readme.md +++ b/readme.md @@ -1,42 +1,5 @@ # LearningPulse software surface level documentation -## Contents - -- [Abstract](#abstract) -- [Feature set](#feature-set) - - - [Classroom](#classroom) - - [Assigment list](#a-list-of-assignments) - - [Classpapers](#a-list-of-class-documents) - - [Teacher chat](#teacher-chat) - - [Quiz](#quiz) - - - [Question types](#question-types) - - [Text input](#text-input) - - [Basic select](#basic-select) - - [Complex select](#complex-select) - - [Pair match](#pair-match) - - [Ordering](#ordering) - - [File upload](#file-uploads) - - - [Roles](#role) - -- [Frontend](#frontend) - - [Themes](#themes) -- [Server](#server) - - - [Backend](#backend) - - [Authentication](#authentication) - - [Data storage](#data-storage) - - [Database](#database) - - [Load balancing](#load-balancing) - -- [Documentation](#documentation) - - [Server](#server) - - [Frontend](#frontend) -- [Development](#development) -- [Staging](#staging) - > **❗ Important!** > This documentation may change in the future. @@ -257,61 +220,6 @@ public Image getImage(URL url, String name) { } ``` -## Database - -> **Disclaimer**: -> May be altered in the future! - -```mermaid -classDiagram - - class User{ - +String username - +UUID id - - +UUID[ ] classes - +String firstName - +String lastName - - +UUID[ ] roles - } - -``` - -```mermaid -classDiagram - class Role{ - +String Name - +UUID id - - +string[ ] privileges -} -``` - -```mermaid -classDiagram - class Quiz { - +String Name - +UUID id - - +UUID belongsTo - - +UUID[] usersCompleted - - +UUID[] question -} -``` - -```mermaid -classDiagram - class Questions { - +Type type - +UUID id - - +Object data -} -``` - # Frontend Documenting the frontend is quite hard, but since there will be state management and complicated classes for managing data it has to be all written down. @@ -362,7 +270,11 @@ stateDiagram-v2 # Development -Using forgejo actions (similar to GitHub actions) the frontend and backend microservices will be built, tested and also deployed to the test server. +## CI _Continuous Integration_ + +If plans go right, nixos Hydra will be used to compile packages, create docker images and also package source code in zip files. +By default the repos (both server and clients) will have a nix flake with `hydraJobs` that describe every step on how to build it. +If plans gou south, as a backup actions will be used for this process. ```mermaid flowchart LR @@ -372,6 +284,43 @@ flowchart LR C --> D(Deploy to test server) ``` +## Git _Version control_ + +Since developers will choose their own features they want to implement, **creating a new branch for that feature, and developing there is a must!** By default if any other features get implemented into the main developer branch,that feature will need to be pulled and merged into the other development branch. +After the feature is stable and working and tested, the owner of that feature will create a pull request and merge into the `main` branch. +For pull request to be pulled into the developer branch, at least two people in the project have to review the code and approve it. If the code is not fitting for a member an issue can be raised to fix x y part of the code. Then the request can be review once again +An example of this process: + +```mermaid +gitGraph + commit + branch dev + checkout dev + branch user-service + commit + commit + checkout dev + merge user-service + branch drive-service + checkout drive-service + commit + commit + checkout dev + merge drive-service + checkout user-service + merge dev + commit + commit + checkout dev + merge user-service + checkout main + merge dev +``` + +## Developer shells _nix_ + +For every client and for the backend a developer shell via nix will be included. This insures that all developers in the project have the same version of java, or any other packages formatters required for the project. + # Staging _[go to top](#contents)_