From afab38a44c1bd22843c2d0b229cecb55fa2dd019 Mon Sep 17 00:00:00 2001 From: 4o1x5 <4o1x5@4o1x5.dev> Date: Sat, 18 May 2024 15:31:26 +0200 Subject: [PATCH] basic database structure, added role proposal --- readme.md | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) diff --git a/readme.md b/readme.md index b9ca299..f0dc03d 100644 --- a/readme.md +++ b/readme.md @@ -28,6 +28,7 @@ - [Documentation](#documentation) - [Server](#server) - [Frontend](#frontend) +- [Development](#development) - [Staging](#staging) > **❗ Important!** @@ -120,6 +121,16 @@ Teachers can create quizzes that students may fill out. This test is server-side Depends. The teacher may give the field a maximum achievable point that user can see when filling out. Then after the test is sent in teachers may grade accordingly. +## Role + +Roles like what discord has will be implemented too. Basically administrators can create roles and assign it to members of LearningPulse. +Roles will have permissions that provide users with abilities to do certain actions. + +Examples: +`learningpulse.administrator` - Administrator privileges, overwrites all and has permission to do anything +`learningpulse.classes.edit` - Allows the role to edit any class. +`learningpulse.quizes.view` - Allows the role to view any quiz. + ## Drive Each user, including teachers will have their own drive where they can upload any kind of file which they may share with other users on the platform. For the sake of less complications S3 storage will be used to build this part of the project. @@ -240,6 +251,61 @@ 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. @@ -288,6 +354,18 @@ stateDiagram-v2 Crash --> [*] ``` +# Development + +Using forgejo actions (similar to GitHub actions) the frontend and backend microservices will be built, tested and also deployed to the test server. + +```mermaid +flowchart LR + A(Git push) + A --> B(Build services) + B --> C(Run tests) + C --> D(Deploy to test server) +``` + # Staging _[go to top](#contents)_