X-Git-Url: https://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=doc%2FARCHITECTURE.txt;h=b89ba88ca3fc7a9104b6757b7353aa3b9297721e;hb=HEAD;hp=f8ce26cbb5a8204132264eea2792ba01e9c9590c;hpb=a14eae7c480e832eb070f0fdb6d51e0700bab9d2;p=brisk.git diff --git a/doc/ARCHITECTURE.txt b/doc/ARCHITECTURE.txt index f8ce26c..b89ba88 100644 --- a/doc/ARCHITECTURE.txt +++ b/doc/ARCHITECTURE.txt @@ -1,7 +1,59 @@ -Sparse documentation about Brisk. +===== Sparse documentation about Brisk. ===== + +==== Form Workflow ==== + +- div on page + + +User cleanup: + spush::garbage_manager() + if (user->the_end) + close opened socket + + brisk->users_cleanup() to reset all users with the_end set + +==== brisk/table/user relationships ==== + +=== points management === + +read from db: + * continue a match + * calculate placings + * calculate explain + +write to db: + * finish a game + +=== in the room === + +// when standup +bri->user[user_idx] = user +user->idx = user_idx +user->idx_orig = user_idx + +// when sitdown +table->player[player_idx] = user_idx +user->table_pos = player_idx + +=== in the game === + +bin5->user[user_idx] = user +table->player[player_idx] = user_idx +user->table_pos = player_idx + Many things aren't documented at all, but I start with authentication workflow. +==== MODIFY USERS TABLE ==== + +=== PHP CODE === + +web/Obj/dbase_base.phh + function LoginDBItem -> args & body + function LoginDBItemFromRecord -> args & body + +=== SQL CODE === +sql/sql.d/nnn-name-patch.sql AUTHENTICATION WORKFLOW @@ -16,7 +68,7 @@ index.php: --- CLI ------------ POST index.php with passid_private field equal to calcMD5(tokens[1]+calcMD5(form.elements['passid'].value)) - + add_user -> validate_name, login_verify ===== Game Lifecycle ===== @@ -35,3 +87,48 @@ index.php: - align many status var with briskin5 user values - room_join_wakeup() +==== Chunk flow ==== + + +$ret = $user->maincheck($old_stat, $old_subst, $old_step, $this->rd_stat, $this->rd_subst, $this->rd_step, + $splashdate, $table_idx, $table_token)) +$user->rd_transp->chunk($this->rd_scristp++, $ret); + + +===== New users workflow ===== + + UserA UserB Admin +------------------------------------------------------------------------- + guarante UserB + | + v + Save on mail + table, + email to UserB + (Disabled, MAILED) +------------------------------------------------------------------------- + Receive email + to check address + | + v + Click on link + | + v + Check on mail + table, + update user status, + delete mail rec + (Disabled, TOBECHK) +------------------------------------------------------------------------- + admin panel + accept user + | + v + send email with + password, + update user status + (Normal, NONE) +------------------------------------------------------------------------- + Receive email + with password +-------------------------------------------------------------------------