commit 7777a84d115eb30ae36b80812a9419769c5e4684 Author: Hugo Thunnissen Date: Mon Jun 13 15:30:13 2022 +0200 Initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e5c5af8 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/publish diff --git a/assets/bookstack-logo.png b/assets/bookstack-logo.png new file mode 100644 index 0000000..5fb834b Binary files /dev/null and b/assets/bookstack-logo.png differ diff --git a/assets/drone-logo.svg b/assets/drone-logo.svg new file mode 100644 index 0000000..2a10910 --- /dev/null +++ b/assets/drone-logo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/gitea-logo.svg b/assets/gitea-logo.svg new file mode 100644 index 0000000..afeeacb --- /dev/null +++ b/assets/gitea-logo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/go-logo.svg b/assets/go-logo.svg new file mode 100644 index 0000000..666408b --- /dev/null +++ b/assets/go-logo.svg @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/ror-architecture.png b/assets/ror-architecture.png new file mode 100644 index 0000000..263038e Binary files /dev/null and b/assets/ror-architecture.png differ diff --git a/assets/ror-auth-request-flow.png b/assets/ror-auth-request-flow.png new file mode 100644 index 0000000..79a5c35 Binary files /dev/null and b/assets/ror-auth-request-flow.png differ diff --git a/assets/svelte-logo.png b/assets/svelte-logo.png new file mode 100644 index 0000000..21bc302 Binary files /dev/null and b/assets/svelte-logo.png differ diff --git a/assets/user-creation-and-authentication.html b/assets/user-creation-and-authentication.html new file mode 100644 index 0000000..68ea9d1 --- /dev/null +++ b/assets/user-creation-and-authentication.html @@ -0,0 +1,268 @@ + + + + + User Creation and Authentication + + + + + +
+
+ +

User Creation and Authentication

+ +
+ +

This feature will allow users to register an account through which they have access to the product. This feature is essential for the product, as the user accounts will be linked to essential information such as game data, payment details and crypto wallets.

+

Product Requirements

+
    +
  • The user can register an account +
      +
    • The system requires the user to provide an email address
      +
        +
      • The system enforces that the provided email address is valid according to RFC-5322.
      • +
      +
    • +
    • The system requires the user to choose a passphrase
      +
        +
      • The system requires that the chosen passphrase contains at least: +
          +
        • One upper case letter
        • +
        • One lower case letter
        • +
        • One number
        • +
        • One special character
        • +
        +
      • +
      • The system requires that the chosen passphrase is at least 16 characters long
      • +
      +
    • +
    +
  • +
  • The system only allows users to login to their account after their email has been verified.
    +
      +
    • If a user authenticates with correct credentials before their email address has been verified, they are able to request the system to send them another verification email.
    • +
    +
  • +
  • An email with instructions for email verification is sent to the user directly after account registration is complete.
  • +
  • The user can log into their registered account +
      +
    • The system requires the user to enter their email address
    • +
    • The system requires the user to enter their password
    • +
    • The system requires the user to have verified their email address before being able to log in
    • +
    +
  • +
  • If the user provides wrong credentials, the system does not tell the user which part of their credentials was wrong.
  • +
  • On authentication failure, the system does not tell the user whether an account for the provided username exists or not.
  • +
  • The system allows the user to reset their password without logging in by providing the system with their email address.
    +
      +
    • When a password reset is requested, the user is sent an email with instructions.
    • +
    • The system does not provide any information about whether an account exists for the given email address.
    • +
    • The password reset email contains instructions and a special link that the user can click. + +
    • +
    +
  • +
  • The system is able to save, edit and provide the following information about a user: +
      +
    • Username/email
    • +
    • Password
    • +
    • TOTP information
    • +
    +
  • +
  • The system is able to pair with a users' TOTP application for additional security. +
      +
    • The system requires a one-time-password for every login after the activation and setup of TOTP by a user.
    • +
    +
  • +
+

Design Requirements

+
    +
  • There is a graphical user registration form +
      +
    • The user registration form has explanations for each field and how it will be used by the software
    • +
    • The user is required to enter their password twice before submitting the form. +
        +
      • It is verified that both entered passwords are identical.
      • +
      +
    • +
    • The user registration form interactively validates that the user provides to the form +
        +
      • If the input for one of the form fields is invalid, the software instantly notifies the user through explicit visual cues.
      • +
      +
    • +
    • After registration is completed, the UI explicitly tells the user that they will only be able to login after they have verified their email.
    • +
    • After registration is completed, the UI explicitly tells the user that an email has been sent to them with instructions for email verification.
    • +
    +
  • +
  • There is a graphical user authentication form +
      +
    • The user authentication form prompts the user to enter their email and password
    • +
    • The user authentication form has a "register account" button that brings the user to the user registration form.
    • +
    • The user authentication form has a "login" button that attempts to authenticate the user using their provided credentials.
    • +
    +
  • +
  • There is a graphical representation for TOTP password login.
  • +
  • If the user successfully authenticates before their email address has been verified, they are presented with a page that explains the email verification requirement. +
      +
    • The page also contains a button with which users can request a new verification email.
    • +
    +
  • +
  • There is a password reset page that the special links in password reset emails lead to. +
      +
    • The form on the password reset page requires the user to enter their new password twice.
    • +
    +
  • +
  • There is a user settings page that allows the user to change their: +
      +
    • username
    • +
    • password
    • +
    • TOTP settings
    • +
    +
  • +
+

Engineering Requirements

+
    +
  • Email and passphrase are only used to request a JSON Web Token from the system.
    +
      +
    • The JWT is used as means of authentication for any other interactions with the system.
    • +
    +
  • +
  • The system needs to be able to save and retrieve users with unique, non-sequential identifiers.
  • +
+

User Stories

+

This section contains the user stories for this epic. After each user story, the accompanying requirements are defined in bullet point lists.

+ + + + + + + + + + + +
User storyAs a user, I want to be able to register a user account using an email address and password so that I can take part in Rise of Rulers gameplay.
Acceptance criteria +
    +
  • Given I am a user, I provide a correct email address and password to the system and click the register button, I am able to successfully register a user account.
  • +
  • Given I am a user, I have to enter my preferred password twice when registering an account and if both entries aren't identical I have to correct this before continuing.
  • +
+
+ + + + + + + + + + + +
User storyAs a user, I want to be able to verify my account within a reasonable amount of time by following the instructions in the account verification email.
Acceptance criteria +
    +
  • Given I am a user and I click the registration button after correctly filling out the form, the system tells me that my account registration is successful, the account needs to be verified for me to be able to use it and an email has been sent to my email address with verification instructions.
  • +
  • Given I am a user and the system tells me that an email has been sent out, the system has actually sent out the email at that instant so that I can receive it within a reasonable amount of time.
  • +
+
+ + + + + + + + + + + +
User storyAs a user, I want to be told that my email needs to be verified when I successfully authenticate through the login form before I have verified my email address.
Acceptance criteria +
    +
  • Given I am a user and I click the login button after providing valid credentials, I am greeted with a message about the required email verification and the option to have the system send a new verification email to my email address.
  • +
  • Given I am a user and I am logged in without my email being verified, the system does not allow me to use its core functionalities.
  • +
+
+ + + + + + + + + + + +
User storyAs a user, I want to be able to reset my account password by providing the system with the email address I used to register my account and following the instructions in a password reset email sent to my email address.
Acceptance criteria +
    +
  • Given I am a user and I click the reset password button after providing my email address, I am sent an email with instructions and a special link that I can use to change the password for my user account.
  • +
  • Given I am a user and I click the special link in the password reset email, I am presented with the password reset page which requires me to enter my new password twice.
  • +
  • Given I am a user and I do not enter two identical passwords into the password reset form, I am not allowed to continue before I correct this.
  • +
  • Given I am a user, I have correctly filled out the password form and I click the "reset password" button, my password is changed to the one provided in the form.
  • +
+
+ + + + + + + + + + + +
User storyAs a user, I want to be able to pair the software with my TOTP application so that I can use one-time passwords for additional security.
Acceptance criteria +
    +
  • Given that I am a user and I click the "enable TOTP" button on the user settings screen, I am able to go through the setup process and configure the system to work with my TOTP application.
  • +
  • Given that I am a user and I login after enabling TOTP for my account, I fill in a correct password and username and the system has verified these credentials, I am required to provide a one-time-password from the TOTP application before I am allowed to continue.
  • +
+
+ + + + + + + + + + + +
User storyAs a user, I want to be able to authenticate myself to the system using a username and password configured by me, so that I am able to partake in gameplay and my progress can be saved.
Acceptance criteria +
    +
  • Given that I am a user, I fill in the login form with a correct username and password and I click login, I am able to successfully authenticate to the system.
  • +
+
+
+
+ +
+
+ + + +Revision #12
+ + + + + +Created 22 February 2022 11:16:51 by Hugo +
+ + + + +Updated 7 March 2022 15:41:02 by Hugo +
+
+ + \ No newline at end of file diff --git a/assets/web-assembly-logo.svg b/assets/web-assembly-logo.svg new file mode 100644 index 0000000..241ff2b --- /dev/null +++ b/assets/web-assembly-logo.svg @@ -0,0 +1,35 @@ + + + + + web-assembly-logo + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/generate.bash b/generate.bash new file mode 100755 index 0000000..ef52a5f --- /dev/null +++ b/generate.bash @@ -0,0 +1,75 @@ +#!/bin/bash + +print-slide-top() { + declare title="$1" + + cat < + + + ${title} + + + + + +
+
+EOF +} + +print-slide-bottom() { + declare previous="$1" + declare next="$2" + + echo ' +
+
+ + +' +} + + +# Determine script directory (requires GNU readlink) +here="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" +publish_dir="$here/publish" + +printf 'Changing directory: ' +pushd "$here" || exit $? + +mkdir -p "$publish_dir" || exit $? + +publish_file="$here/publish.txt" + +declare -a slides=() +mapfile -t slides < "$publish_file" + +for i in "${!slides[@]}"; do + declare previous="${slides[i == 0 ? 0 : i -1]}" + declare next="${slides[i + 1 >= ${#slides[@]} ? i : i + 1]}" + declare slide="${slides[i]}" + + destination="$publish_dir/$(basename "$slide")" + previous="$(basename "$previous")" || exit $? + next="$(basename "$next")" || exit $? + + if ((i == 0)); then + destination="$publish_dir/index.html" + fi + + if ((i == 0)) || ((i == 1)); then + previous="index.html" + fi + + print-slide-top 'ROR Presentatie' > "$destination" + cat "$slide" >> "$destination" + print-slide-bottom "$previous" "$next" >> "$destination" +done + +cp -v style.css "$publish_dir/style.css" +cp -v main.js "$publish_dir/main.js" +cp -rv assets "$publish_dir/" diff --git a/main.js b/main.js new file mode 100644 index 0000000..82cd0d7 --- /dev/null +++ b/main.js @@ -0,0 +1,29 @@ + +function hugotOverrideFirstNext(func){ + document.hugotOverrideFirstNext = func; +} + +document.onkeydown = function (event) { + switch (event.keyCode) { + case 37: + //left key + document.getElementById('previous').click(); + case 38: + console.log("Up key is pressed."); + break; + case 39: + //right key + if (document.hugotOverrideFirstNext) { + let func = document.hugotOverrideFirstNext; + document.hugotOverrideFirstNext = null; + func(); + return; + } + + document.getElementById('next').click(); + break; + case 40: + console.log("Down key is pressed."); + break; + } +}; diff --git a/publish.txt b/publish.txt new file mode 100644 index 0000000..43824d0 --- /dev/null +++ b/publish.txt @@ -0,0 +1,17 @@ +slides/front.html +slides/topics.html +slides/product.html +slides/product-citybuilder.html +slides/a-good-rts-mmo.html +slides/monetization.html +slides/team-frontpage.html +slides/team.html +slides/process.html +slides/process-design.html +slides/process-ci.html +slides/challenges.html +slides/solutions.html +slides/architecture.html +slides/ror-auth.html +slides/nginx-auth-request.html +slides/demo.html diff --git a/slides/a-good-rts-mmo.html b/slides/a-good-rts-mmo.html new file mode 100644 index 0000000..36dcf38 --- /dev/null +++ b/slides/a-good-rts-mmo.html @@ -0,0 +1,10 @@ +
What makes a good MMO RTS
+ + diff --git a/slides/architecture.html b/slides/architecture.html new file mode 100644 index 0000000..15fc368 --- /dev/null +++ b/slides/architecture.html @@ -0,0 +1,3 @@ +
Architecture
+ + diff --git a/slides/challenges.html b/slides/challenges.html new file mode 100644 index 0000000..0ecccd0 --- /dev/null +++ b/slides/challenges.html @@ -0,0 +1,10 @@ +
Challenges
+ + diff --git a/slides/demo.html b/slides/demo.html new file mode 100644 index 0000000..a0b6b68 --- /dev/null +++ b/slides/demo.html @@ -0,0 +1,3 @@ +
Demo
+ +Dev instance diff --git a/slides/front.html b/slides/front.html new file mode 100644 index 0000000..a8940f2 --- /dev/null +++ b/slides/front.html @@ -0,0 +1,15 @@ +
Rise of Rulers
+ +
+
Sprint 4
+
+ + diff --git a/slides/monetization.html b/slides/monetization.html new file mode 100644 index 0000000..b58611b --- /dev/null +++ b/slides/monetization.html @@ -0,0 +1,7 @@ +
Monetization
+ + diff --git a/slides/nginx-auth-request.html b/slides/nginx-auth-request.html new file mode 100644 index 0000000..5e9d76a --- /dev/null +++ b/slides/nginx-auth-request.html @@ -0,0 +1,3 @@ +
NGINX Auth Request
+ + diff --git a/slides/process-ci.html b/slides/process-ci.html new file mode 100644 index 0000000..25c015c --- /dev/null +++ b/slides/process-ci.html @@ -0,0 +1,27 @@ +
Our Development Stack
+ + + + + + + + + + + + + + + + + +
Version Control Gitea
Continuous Integration
Backend + + Golang +
Frontend +
    +
  • +
  • Svelte
  • +
+
diff --git a/slides/process-design.html b/slides/process-design.html new file mode 100644 index 0000000..6ec1917 --- /dev/null +++ b/slides/process-design.html @@ -0,0 +1,18 @@ +
Architecture and Design Process
+ + diff --git a/slides/process.html b/slides/process.html new file mode 100644 index 0000000..ebe0d71 --- /dev/null +++ b/slides/process.html @@ -0,0 +1,11 @@ +
The Process
+ + diff --git a/slides/product-citybuilder.html b/slides/product-citybuilder.html new file mode 100644 index 0000000..a15fa8a --- /dev/null +++ b/slides/product-citybuilder.html @@ -0,0 +1,10 @@ +
A MMO RTS Game
+ + diff --git a/slides/product.html b/slides/product.html new file mode 100644 index 0000000..85262d4 --- /dev/null +++ b/slides/product.html @@ -0,0 +1,11 @@ +
The Product
+ + diff --git a/slides/ror-auth.html b/slides/ror-auth.html new file mode 100644 index 0000000..ed8caaf --- /dev/null +++ b/slides/ror-auth.html @@ -0,0 +1,7 @@ +
ROR AUTH
+ + diff --git a/slides/solutions.html b/slides/solutions.html new file mode 100644 index 0000000..8b75035 --- /dev/null +++ b/slides/solutions.html @@ -0,0 +1,14 @@ +
How we deal with them
+ + diff --git a/slides/team-frontpage.html b/slides/team-frontpage.html new file mode 100644 index 0000000..020dbef --- /dev/null +++ b/slides/team-frontpage.html @@ -0,0 +1,11 @@ +
The Team
+ + diff --git a/slides/team.html b/slides/team.html new file mode 100644 index 0000000..5a15cc5 --- /dev/null +++ b/slides/team.html @@ -0,0 +1,18 @@ +
The Team
+ + + + diff --git a/slides/topics.html b/slides/topics.html new file mode 100644 index 0000000..1d65a05 --- /dev/null +++ b/slides/topics.html @@ -0,0 +1,15 @@ +
+ Topics +
+ + diff --git a/slides/what-we-have-worked-on.html b/slides/what-we-have-worked-on.html new file mode 100644 index 0000000..fa8eb14 --- /dev/null +++ b/slides/what-we-have-worked-on.html @@ -0,0 +1,8 @@ +
Our main goal for sprint 4
+ + diff --git a/style.css b/style.css new file mode 100644 index 0000000..ebf87cb --- /dev/null +++ b/style.css @@ -0,0 +1,16 @@ + +@import '../../website/style.css'; + +nav { + position: fixed; + bottom: 0; + border-top: 1px solid var(--theme-text); +} + +body { + padding: 0; +} + +main { + font-size: 32px; +}