update TODO.txt and ARCHITECTURE.txt
[brisk.git] / TODO.txt
1  TODO |
2 ------+
3
4   FEATURES |
5  ----------+
6    - PLACEMENT-NORMALIZATION
7       DONE . Normalize previous points
8       DONE . Denormalize "Info" view
9       DONE . Denormalize explained matches
10       DONE . Check placement
11       DONE . Distinguish between inherited mult and local mult
12
13    - AUTO-MAINTENANCE
14      DONE . Terms Of Service acceptance
15        DONE . print date of hard switch
16        DONE . TOS version
17        DONE . user TOS acceptance (db field)
18        DONE . show TOS ([show me later, yes, no]/[yes, no])
19        DONE . switch-off date
20        DONE . manage accept
21        DONE . manage refuse
22        DONE . show current TOS
23        DONE . disable user reason integer field and remove SUSPEND state (db, php)
24        DONE . fix tos layout
25        DONE . opt - download TOS
26        . opt - checkbox for anonimous users with message when not checked
27        . opt - button enabled when arrived to the bottom of the TOS only
28        . opt - check TOS version between config file and TOS file
29      DONE . show guarantee (/guar <login> command)
30        DONE . multi-language
31        DONE . command documentation
32        DONE . manage disagreeding users investigation
33        DONE . self guaranteed
34      . DONE New Users Guarantee Procedure
35        . DONE Change guarantee workflow
36        . DONE Db update
37
38          UserA                 UserB                      Admin
39 -------------------------------------------------------------------------
40       guarante UserB
41            |
42            v
43       Save on mail
44          table,
45       email to UserB
46     (Disabled, MAILED)
47 -------------------------------------------------------------------------
48                            Receive email
49                            to check address
50                                  |
51                                  v
52                            Click on link
53                                  |
54                                  v
55                            Check on mail
56                                table,
57                            update user status,
58                            delete mail rec
59                           (Disabled, TOBECHK)
60 -------------------------------------------------------------------------
61                                                        admin panel
62                                                        accept user
63                                                             |
64                                                             v
65                                                      send email with
66                                                      password,
67                                                      update user status
68                                                       (Normal, NONE)
69 -------------------------------------------------------------------------
70                            Receive email
71                            with password
72 -------------------------------------------------------------------------
73
74      . Email-address expiration check
75      . Account expiration
76
77
78    DONE - CONTINUE FEATURE
79      DONE . replace explicit strings with multilanguage array
80      DONE . add a php downloader with filtering on allowed requests
81      DONE . save points every game
82      DONE . modify points calculation to include order and mazzo
83      DONE . exclude not standard types from statistics
84          DONE . daily reports (1 for each active tournament)
85          DONE . monthly stats (for normal match only)
86      DONE . show current match ID when created
87      DONE . add info about continue to the info page
88      DONE . add command to continue
89          DONE . check consistency of the request
90      DONE . rearrange users and game status to continue the selected match
91      DONE . investigate user reordering ??
92
93    - WEBSOCKET TRANSPORT
94      . refactoring $enc attribute management
95      DONE . reintroduced $enc = 'plain' for websocket
96      DONE . fallback for not correct WS version
97      DONE . fini of ws stream
98      DONE . reactivate compression
99      DONE . fix xynt_test01
100      DONE M2: brisk working
101      DONE . manage multiport apache config
102      DONE . manage headers correctly in sac-a-push
103      DONE . manage transport.close method where required
104      DONE . xynt_stream: manage fallback to multiple ports
105      DONE . manage fini for ws
106      POST . server: manage input data from clients
107      POST . manage ping/pong (seems not required)
108
109      DONE . client (xynt_streaming.js)
110      DONE . server (transport.phh)
111
112      DONE M1: xynt_test01.php working
113
114
115    - improved S
116      . db update (add components, maybe single string)
117      . filter in index.php
118      . filter in index_wr.php
119
120    - prefs API:
121      . prefs_assign(content): assign json content as output var
122      . prefs_apply(prefs_new): apply new content to g_prefs and system
123      . prefs_load(content): load json content and apply to g_prefs and system
124
125      . prefs_update: update preferences temporarly
126      . prefs_save: save to the server the new prefs
127
128    - preferences (listen into preferences)
129         // js var, volatile server, (db server || cookie)
130         temporary: js var, volatile server
131         permanent: js var, volatile server, (db server || cookie)
132
133      . data from db OR, if missing, from cookies
134
135      . update values
136      . database change
137      . MANAGE NOT AUTH USERS
138
139    - preferences (with "modifiable S")
140      . Mod. S: new flag into database
141      . graph infrastructure
142      . new box to edit color
143
144   MAJOR |
145  -------+
146    - BUG: some connection to the named socket fails
147    - Not simultaneous more then one stream
148
149
150   MINOR |
151  -------+
152    WIP - try to be more antivirus-friendly
153    - multiple rows between games
154    - packetize and automatize php-ancillary and apache module
155    - DISABLED_TO_FIX: DNS access (perform blocking dns requests, must be fixed)
156
157
158   DONE |
159  ------+
160    DONE - temporarly server hung not reflected on user timeouts
161    DONE - timeouted users are still be able to sit down (only the first at the table is banned)
162    DONE - page still opened after the server restart
163    DONE - log_legal address fix
164    DONE - manage too fast reload in xynt-streaming
165    DONE - add xhr as transport layer and manage different streams better
166    TEST - BUG: pari + 72 non fa 4x ma attualmente fa 3x, da correggere
167    TEST - BUG: lurker are logged out (and remain a pending socket opened (look the spush log)
168    DONE - save/restore database
169    DONE - into the room local step remains -1
170    DONE - centralize all '<script ...' incapsulation to allow multiple transport system.
171    DONE - BUG: access with password from 2 diff browsers the second go in strange "page not found" 
172           in the first tentative, the second works
173    DONE - BUG: access with password from 2 diff browsers place the first in a strict loop (the 
174           problem was a call to a static parent method instead of the overrided child method,
175           substitute self:: with the dynamically get class::)
176    DONE - garbage management
177
178    DONE/FROZEN - problem with getpeer (HOSTADDR)
179
180    DONE - slow cards distribution
181    DONE - substr to mb_substr
182    DONE - parametrizations:
183           . parametrization of $DOCUMENT_ROOT  var in brisk-spush.phh file
184           . parametrization of SITE_PREFIX(_LEN) define
185           . move the name of the named socket into the configuration file
186    DONE - manage and test cross forwarder between table and room
187    DONE - setcookie (for tables only and persist prefs)
188    DONE - images flickering on slow windows: try to poll stream every 300 ms (seems to be download problem)
189    DONE - database connection fails after a while, check close and try PGSQL_CONNECT_FORCE_NEW.
190    DONE - unneeded garbage_time.expired access
191    DONE - BUG: fast loop on stream index_rd_ifra page (js watchdog start without timeout corrupt counts)
192    DONE - BUG: logout failed (fixed with a garbage_collector wrapper at sac-a-push level
193    DONE - 404 wrong page management (remove directories redirections (es. brisk/))
194    DONE - configuration file management
195    DONE - app level keep-alive
196    DONE - index_wr other issues
197    DONE - from room to table
198    DONE - from table to room
199    DONE - chunked
200    DONE - bug: read from a not resource handle (already closed because a new socket substitute it)
201    DONE - partial write for normal page management
202    DONE - index_rd_ifra: last_clean issue
203    DONE - fwrite failed error management (select, buffer where store unsent data, and fwrite check and retry)
204    DONE - bug: after restart index_rd.php receive from prev clients a lot of req
205    DONE - index_wr.php::chat
206    DONE - index_wr.php::exit
207    DONE - index_rd.php porting
208    DONE - generic var management from internet
209    DONE - index.php auth part
210    ABRT - index_wr.php::reload - reload is js-only function
211    ABRT - keepalive management - not interesting for our purposes
212
213  BRISK4 (mammuth)
214  ======
215
216  - STEP MANAGEMENT VERIFY
217  Slim Paragraph
218  DONE - move the garbage timeout on file
219  DONE - in index_rd load all data only when required
220  - briskin5 alignment
221    DONE . extern del garb_timeout
222    DONE . user_load parameters verify
223    DONE . Bin5::load_data and Bin5::save_data refactoring with
224           data split
225    . move many function into "Bin5 class"
226  - garbaging of .step files
227
228  DB: - initial usage
229      DONE - configurabilità file o db
230      DONE - aggiornare le funz di gestione db in modo che prevedano anche il flag DISABLE
231      DONE - travasatore file to pg
232        DONE - travaso punteggi
233        DONE - memorizzazione nuovi i punteggi nel db
234        DONE - gestione classifiche in SQL
235          DONE - produrle
236          DONE - mostrarle
237
238      STEP 1.1
239        DONE - points archiver
240
241      STEP 1.2
242        DONE - partial usability if database go down.
243
244      STEP 1.5
245      - sistema di inserimento nuovi utenti (riversatore da form di inserimento)
246
247      STEP 2
248      - modifica password   
249      - ripristino password 
250
251      STEP 3
252      - comunicazioni di aggiornamento (stato salvato sul server) 
253
254  DONE - var $G_base aggiunta per gestire include in include da path differenti
255
256  BRISK3 (trusty)
257  ======
258   DONE - donameter
259     DONE - G_donors
260     DONE (WOW!) - js object with infos
261     DONE - main logic at login (cookie check in index_rd.php; show_message and createCookie via snippets with block
262            to prevent fast reload)
263     DONE - cookie per non assillare e visualizz.
264     DONE - graphical donameter
265     WIP content (in conf.)
266
267   DONE - numero di tavoli auth-only nel .brisk-install
268   - isolation
269     TEST - ricalcolo delle persone in piedi quando si cambia modalità
270     DONE - se si e' in isolation non si può cambiare nick perdendo l' auth
271     DONE - non leggere le chat di quelli non autenticati (in isolation)
272     DONE - regole per passare alla modalita' (in piedi o ai tavoli autenticati) 
273     DONE - treni non auth da nascondere 
274     DONE - verso gli altri ??: uguale a prima
275
276   finire multilingua (briskin5/index_wr.php e altri se ce ne sono)
277   coniglio
278   only auth strictly
279   placing limits to config file
280
281 Dunque, 
282
283 - come vengono aggiornate le classifiche: ogni giorno alle 23:58
284
285 - cosa cambia tra le tre coppie di classifiche: 
286   ci sono le classifiche dell' ultima settimana, quelle dell' ultimo mese,  e quelle dell' ultimo trimestre,
287   per ognuno di questi lassi di tempo poi c'è la classifica di chi ha giocato più di TOT partite o meno di TOT partite, con TOT che cambia a seconda del lasso di tempo.
288
289 - come vengono calcolate le classifiche: per ogni utente vengono presi tutti i punti fatti ai tavoli con lucchetto nel lasso di tempo preso in considerazione (ultima settimana, ultimo mese o ultimo trimestre), sommati e divisi per il numero di partite fatte in quello stesso lasso di tempo per normalizzare i valori; poi siccome la gente quando vede 0.18734 sbarella ho deciso di moltiplicare il tutto per 100.
290
291 Un esempio per chiarire:
292
293   l'utente 'pippo' che è nuovo gioca 4 partite nell'ultima settimana con i seguenti punteggi:
294     -2, 1, 2, 1
295   lo score viene { [ (-2) + (1) + (2) + (1) ] / 4 }  * 100 = 50.0
296   
297   a parità di score tra utenti va più in alto chi ha giocato più partite.
298
299 Se dopo quelle 4 partite 'pippo' non ne giocherà più, passata una settimana dall'ultima giocata 
300 sparirà dalla classifica settimanale e rimarrà in quelle mensili e trimestrali.
301
302
303   
304
305
306
307
308  BUG
309  ---
310  
311   DONE - paste da demauroparavia
312   DONE - recupero partita per re-login con password
313   DONE - problema "|" nei nomi (manca enhance degli script lato server)
314   - problema col treno se mouse sopra mentre stringe (verif)
315   
316  MINOR
317  -----
318
319  NORMAL
320  ------
321
322   - win test
323   WIP - /listen 
324     DONE - skin della textarea
325     DONE - set cookie 
326     DONE - init client (read from cookie) - ALWAYS BY SERVER
327     DONE - init server
328     DONE - after cookie check auth-only when no-auth case
329     DONE - aggiungi info accanto a "Chat"
330   DONE - /mesgtoadm
331   DONE - img dei comandi
332
333   DONE - form per garantire utenti (accoda in un file nel formato corretto)
334   DONE -   process request
335   DONE -   show form
336   DONE -   close butt
337   DONE -   submit form
338   DONE -   process form js side 
339   DONE -   process form
340   DONE -   documentazione in help
341
342   DONE - user status
343
344   DONE - aggiornare help
345   DONE -   overflow management
346   DONE -   for status
347   -   for password
348
349   DONE - reload home
350   - notify for long pages
351
352   - buddy list
353   - silenziastolti vari (fino al buddy import)
354   - restrict challenge per IP
355   - restricted charset for login
356   - watchdog
357
358   - db (minimal)
359     - db admin page
360     - user db admin
361     - use db 
362     - admin db
363
364     - studiare un anti-dos
365   - login modify
366  DONE  - db (fake)
367  DONE  - display auth
368     - manage preferences 
369
370  minor
371  -----
372    - auth after login
373
374 ----- done ------
375
376  BUG
377  ---
378   DONE   righe troncate
379   DONE - questione "a monte" che:
380   DONE   - lascia fuori il bottone
381   DONE   - scrive &agrave e compagnia
382   DONE - refresh act_table when unauthorized
383   DONE - problema ghost autenticato (ne prendi il posto ovunque sia)
384
385  MINOR
386  -----
387   DONE - refactoring of the owner name (auth attr for owner name)
388   DONE   - room
389   DONE     - at chat input line 
390   DONE     - in the chat output line
391   DONE     - deauth management
392   DONE - table
393   DONE   - at chat input line
394   DONE   - in the chat output line
395   DONE   - for user area of other users
396   DONE   - deauth management
397   DONE - alart to one user
398
399
400  NORMAL
401  ------
402   DONE - strong ban: "expire time|IP|session|(nick if authenticated)"
403   DONE   - login: se auth      -  verifica solo gli expire per quel nick
404   DONE   -        se non auth  -  verifica gli expire per IP e sessione
405   DONE   - riscrivere messaggi
406
407   DONE - login 
408   DONE   - se pass:
409   DONE     - richiede per l' utente un token (tutta la parte backend va un minimo studiata)
410   DONE     - lo legge, ci hasha la password
411   DONE     - invia la pass al server hashata
412   DONE   - se non pass:
413   DONE     - check del login e return corretto
414   DONE     - oggetto in shm single table con ( "ip", "login", timestamp ) e suo management
415   DONE     - rename ghost if logged
416   DONE     - onunload_cb e onbeforeunload_cb !!! 
417   DONE   - da change attrs a change class (input field)
418   DONE     - colore del bg per arrivare ad essere omogeneo
419   DONE     - cambiare path e file di config
420   DONE   - login with or without pass
421   DONE   - registered nick notice (METTERE IL MSG NELLA PAG DI LOGIN)
422   DONE     - segnalare tavoli solo per auth
423   DONE     - rename restriction at auth table
424   DONE     - change nick (strcasecmp)
425   DONE   - refact js tables to handle flags
426   DONE - room javascript refactoring
427
428   DONE - work background
429   DONE - reserved tables
430
431
432  BRISK2 (spawn)
433  ======
434
435    
436    URGENT - tables spawn
437             DONE - link with photos
438             DONE - top banner in Etc file
439             DONE - spawn of a table
440             DONE - data to cookies (removed table_idx from xhr calls also)
441             DONE - set subst to shutdowner/shutdowned
442             DONE - return to index.php
443             DONE - game's token
444             DONE - recover of corrupted table data
445             DONE - closure of a table
446             DONE - flush of the table
447             DONE - security checks for right scope access
448             DONE - garbage collector management
449             DONE -    recursive garbage - howto ?
450             DONE - stat & subst in browser
451             DONE - laccwr setting and exit if all players are unactive for some time
452             DONE - the list of test case
453             DONE - shm dimension
454             DONE - remove unused parts
455             DONE - move images
456             DONE - optimizations
457             DONE - cambiare titolo al tavolo
458             DONE - shutdowning lock tables
459             DONE - topbanner
460             DONE - public announcements
461             DONE - 10 sec to exit from table
462
463             FAR - inheritances
464    
465    TRAIN  -  DONE - add again in reload   
466              DONE - wag_set refact
467              DONE - filtra char speciali per title
468              DONE - chatt_send refact 
469              DONE - elenco dei giocatori
470              DONE - documentazione online
471              DONE - timeout management     
472              LATER - border color a muzzo
473        
474    NORM   - testament
475    NORM   - public announcements
476    NORM   - 10 sec to exit from table
477    NORM   - moving label for tables click
478
479 ----------------- join -----------------
480    NORM   - map
481
482    NORM   - restart preload img
483    NORM   - tools dir with a main and some pages where check briscola tools.
484    NORM   - watchdog
485
486    NORM   - chat vecchie in reload (forse)
487
488  MIDDLE TODO
489  ===========
490
491    - user assistant (with button to enable disable)
492    - documentation
493
494
495  FAR TODO
496  ========
497    NORM - internationalization
498    NORM - img -> div + css
499    
500  WEB
501  ===
502
503    - link to stable/unstable
504
505 -------------------------------------------------------------------
506  DONE
507  ====
508
509    ABORTED - asta: highlight buttons (css hover) - change pointer when over
510    DONE - step proxy
511    DONE - special chars in js
512    DONE - ban temporaneo dai tavoli
513    DONE - flash player to play sound
514    DONEBUG - (aum. il timeout) - carte giocate che restano girate
515          Sembra non migliorare di molto la cosa, gestita la cache
516          correttamente, sono apposto.
517
518    DONE - one player reject a game, to less points (<= 2)
519    DONE - help page
520    DONE - test di download per la cache
521    DONE - se passano tutti tranne l'ultimo l'asta va al penultimo.
522           Corretto il codice, occorre verificare se questo
523           ingenera qualche problema.
524    DONE - raddoppiato il numero di righe nella chat
525    DONE - corretto bug del /nick
526    DONE - carosello pubblicità altout
527    DONE - smammamorti
528    DONE - unload of the stream
529    DONE - standup centrati
530    DONE - current player - in info
531    DONE - HELP butt con ABOUT, REGOLE, VERSIONE
532    DONE - welcome lines in the chats (room and table)
533    DONE - welcome lines in the chats (room and table)
534    DONE - nomi in primo piano se vai sul quadrato   
535    DONE - to pass explicit config file to INSTALL.sh
536    DONE - flag to create a config file
537    ABRT - bottoni => immagini
538    DONE - aggiungere bottone al login
539    DONE - nomi in primo piano se vai sul quadrato   
540    DONE - installer to set cookie path
541    DONE - change name
542    DONE - automatic and manual logout
543    DONE - cache problems solved via .htaccess
544    DONE - all players out of the auction
545    DONE - time to send cards
546    DONE - hide cards before sends at a new game
547    DONE - well recognization of the browser and O.S.
548    DONE - login consistency !!!!
549    DONE - functionalization of garbage
550    DONE - call garbage function into login
551    DONE - game
552    DONE - manage the reload from scratch of the table page
553    DONE - table reset
554    DONE - sendcard => card_send(idx, ....)
555    DONE - show table for game
556    DONE - points calculation
557    DONE - make-up of the chooser
558    DONE - where place the briscola on the table
559    DONE - users info
560    DONE - show current auction position
561    DONE - table with internal management of the transition between pages.
562    DONE - server side page abort management  
563    DONE - cookie problem with Ajax
564    DONE - spostare il tasto "esco"
565    DONE - to pass explicit config file to INSTALL.sh 
566    DONE - 8 tables
567    DONE - safety out management
568    DONE - info enhancement and related button (how win the last game and
569           with how much points ?)
570
571  WEB
572    DONE - homepage
573    DONE - screenshots
574
575 DOC
576    CHAPTERS
577       HTTP Streaming
578       Local serializer
579       Database on shmem
580       Page abort (reload on http streaming case)
581       Chat
582       Cookies management
583       CSS tricks
584
585 CHECK ON NEW SERVERS
586 .htaccess AllowOverwrite mode for Cache-Control directive
587
588
589
590
591 */
592