Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🥷🏻 Initialize diagrams #1

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
22 changes: 22 additions & 0 deletions .github/workflows/plantuml.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Generate PlantUML
on:
push:
paths:
- "**.puml"
jobs:
generate_plantuml:
runs-on: ubuntu-latest
name: plantuml
steps:
- name: checkout
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: plantuml
id: plantuml
uses: grassedge/[email protected]
with:
path: "."
message: "Render PlantUML files"
env:
GITHUB_TOKEN: ${{ secrets.PUBLISH_ACCESS_TOKEN }}
128 changes: 128 additions & 0 deletions diagrams/database.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
@startuml

entity UserAccounts {
id: ID <<generated>>
created_at: DateTime
updated_at: DateTime
ethereumAddress: Text
is_blocked: boolean
}

entity Reviewers {
id: ID <<generated>>
claimed: boolean
ethereumAddress: Text
}

entity Moderators {
id: ID <<generated>>
ethereumAddress: Text
}

entity Applications {
id: ID <<generated>>
created_at: DateTime
updated_at: DateTime
name: Text
--
wave_id: ID <<FK>>
user_id: ID <<FK>>
category_id: ID <<FK>>
}

'private data of application
entity ApplicationContacts {
id: ID <<generated>>
created_at: DateTime
updated_at: DateTime
name: Text
email: Text
--
application_id: ID <<FK>>

}

entity ApplicationCategories {
id: ID <<generated>>
name: Text
}

entity ApplicationValue {
application_id: ID <<FK>>
user_id: ID <<FK>>
value: ContentValue
--
PrimaryKey(application_id, user_id)
}

entity Comments {
id: ID <<generated>>
created_at: DateTime
updated_at: DateTime
--
application_id: ID <<FK>>
user_id: ID <<FK>>
}

entity CommentValue {
comment_id: ID <<FK>>
user_id: ID <<FK>>
value: ContentValue
--
PrimaryKey(comment_id, user_id)
}

enum ContentValue {
POSITIVE
SPAM
}

entity Reviews {
comment_id: ID <<FK>>
application_id: ID <<FK>>
reviewer_id: ID <<FK>>

PrimaryKey(reviewer_id, application_id)
}

entity Wave {
id: ID <<generated>>
created_at: DateTime
updated_at: DateTime
name: Text
start_date: DateTime
end_date: DateTime
phase: WavePhase

}

Reviewers ||--o| UserAccounts
Moderators ||--o| UserAccounts
Applications }o--|| Wave
Applications }o--|| UserAccounts
Comments }o--|| Applications
Comments }o--|| UserAccounts
Reviews ||--o| Comments
Reviews }o--|| Applications
Reviews }o--|| UserAccounts
ApplicationContacts ||--|| Applications
Applications }o--|| ApplicationCategories
CommentValue }o--|| Comments
CommentValue }o--|| UserAccounts
ApplicationValue }o--|| Applications
ApplicationValue }o--|| UserAccounts


enum WavePhase {
OPEN
DENOISING
ASSESEMENT
CLOSED
}

WavePhase --> Wave

CommentValue <-- ContentValue
ApplicationValue <-- ContentValue

@enduml
1 change: 1 addition & 0 deletions diagrams/database.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
80 changes: 80 additions & 0 deletions diagrams/use_cases.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
@startuml

left to right direction

actor Moderator as moderator
actor Visitor as visitor
actor Member as member
actor Applicant as applicant
actor Reviewer as reviewer

rectangle Waves {
usecase "Create new wave" as uc1
usecase "Edit wave" as uc2
usecase "Switch wave phase" as uc4
}

rectangle Users {
usecase "Grant reviewer role" as uc3
usecase "See list of users" as uc5
usecase "See users activity" as uc6
usecase "Mark user as ignored" as uc7
usecase "Mark user as blocked" as uc8
usecase "See spam ranking" as uc9
usecase "Export list of users" as uc11
usecase "Log in" as uc23
usecase "Create an account" as uc24
}

rectangle Applications {
usecase "Export applications" as uc10
usecase "Mark as spam" as uc12
usecase "Assign value" as uc14
usecase "Mark as helpful" as uc15
usecase "Filter by categories" as uc16
usecase "Apply for a grant" as uc17
usecase "See public and hidden parts of application" as uc18
usecase "Save as draft" as uc19
}

rectangle Reviews {
usecase "Add review" as uc20
usecase "Mark as helpful" as uc21
}

rectangle Comments {
usecase "Mark as spam" as uc13
usecase "Edit comment" as uc22
}

moderator --> uc1
moderator --> uc2
moderator --> uc3
moderator --> uc4
moderator --> uc5
moderator --> uc6
moderator --> uc7
moderator --> uc8
moderator --> uc9
moderator --> uc10
moderator --> uc11

visitor --> uc23
visitor --> uc24
visitor --> (Browse POPGDP)

member --> uc12
member --> uc13
member --> uc14
member --> uc15
member --> uc16
member --> uc21
member --> uc22

applicant --> uc17
applicant --> uc18
applicant --> uc19

reviewer --> uc20

@enduml
Loading
Loading