- Route
/: home page, here it is all the game logic and graphic (for guest and logged user) - Route
/login: login page - Route
/profile: profile page visible only for logged user, where all the cards related to the games are shown - Route
/gameInstructions: instructions page for guest and logged user
-
POST
/api/login- request parameters: none, request body content: email and password
- return user or error
-
POST
/api/logout- request parameters: none, request body content: credentials
- return nothing
-
STATIC
/static- for getting card images
-
POST
/api/card- request parameters: none, request body content: number of cards wanted and list of idCard already used
- return json list of generated cards
-
GET
/api/session/currentONLY AUTHENTICATED USER- request parameters: none, request body content: credentials
- return user in json format
-
POST
/api/game/cardsONLY AUTHENTICATED USER- request parameters: none, request body content: list of cards used in the game with all the infos
- return nothing
-
GET
/api/game/getAllGamesCardsONLY AUTHENTICATED USER- request parameters: none, request body content: user credentials
- return json list of all games with all rounds and all cards collect with infos
- Table
users- contains- id: integer, auto increment, unique, not null, primary key
- name: text, not null
- email: text, not null
- salt: text
- saltedPassword: text
- Table
cards- contains- id: integer, auto increment, unique, not null, primary key
- name: text, not null
- badLuckIndex: real, not null
- imgName: text, not null
- Table
games- contains- id: integer, auto increment, unique, not null, primary key
- date: text, not null
- idUser: integer, not null, foreign key on users(id)
- victory: integer, not null
- Table
gameCards- contains- idCard: integer, not null, primary key, foreign key on cards(id)
- idGame: integer, not null, primary key, foreign key on games(id)
- flag: integer, not null
- round: integer, not null
MyCard(inMyCard.js): card component used for the game and the profile page, showing image, name and badLuckIndexMyModal(inMyModal.js): modal component used in all the applicationMyNavbar(inMyNavbar.js): navbar of all the application
- s343884@studenti.polito.it, password
- another.one@gmail.com, password

