- Route
/
: Home page that introduces the game and provides navigation options. - Route
/single-round-game
: The main game interface where users not logged in can play the single round. - Route
/multi-round-game
: The main game interface where users logged in can play the meme game. - Route
/game-over
: Displays the results of the game after completion. - Route
/login
: User login page for authentication. - Route
/profile
: User profile page where the player can see their game history and scores. - Route
/game/:id
: Page where the user logged-in can see his game whid id id
-
POST
/api/sessions
- Request Body:
username
: stringpassword
: string
- Response Body:
id
: integerusername
: string- other user details
- Request Body:
-
GET
/api/sessions/current
- Request Parameters: None
- Response Body:
id
: integerusername
: string- other user details
-
DELETE
/api/sessions/current
- Request Parameters: None
- Response Body: Empty
-
POST
/api/check-captions
- Request Body:
memeId
: integercaptionId
: integer
- Response Body:
isCorrect
: boolean
- Request Body:
-
GET
/api/get-correct-captions/:memeId
- Request Parameters:
memeId
: integer
- Response Body:
- List of correct captions for the given memeId
- Request Parameters:
-
GET
/api/memes/:memeId
- Request Parameters:
memeId
: integer
- Response Body:
id
: integerimageUrl
: string- other meme details
- Request Parameters:
-
GET
/api/single-round-meme
- Request Parameters: None
- Response Body:
meme
: meme objectcaptions
: list of captions
-
GET
/api/multi-round-meme
- Request Parameters: None
- Response Body:
- List of memes and their respective captions for multiple rounds
-
POST
/api/games
- Request Body:
userId
: integerrounds
: array of round objectsfinalPoints
: integer
- Response Body:
- Created game object
- Request Body:
-
GET
/api/games/user/:userId
- Request Parameters:
userId
: integer
- Response Body:
- List of games played by the user
- Request Parameters:
-
GET
/api/games/:gameId/rounds
- Request Parameters:
gameId
: integer
- Response Body:
- List of rounds for the given gameId
- Request Parameters:
-
Table
users
id
: integer, primary key, uniqueemail
: string, not nullname
: string, not nullhash
: string, hashed, not nullsalt
: string, not null
-
Table
meme
id
: integer, primary keyimmagine
: string, not null
-
Table
didascalie
-
id
: integer, primary key -
text
: string, not null -
Table
didascalie_meme
-
id_meme
: integer, primary key -
id_didascalia
: string, not null
-
-
Table
gameplay
id_gameplay
: integer, primary keyid_utente
: integer, foreign keypunteggio
: datetimeid_round1
: integer, foreign keyid_round2
: integer, foreign keyid_round3
: integer, foreign keydate
: string
-
Table
round
id_round
: integer, primary keyid_meme
: integer, foreign keypunteggio
: integer, foreign key
MultiRoundGame
(inMultiroundGame.jsx
): Main component for the meme game, handles game logic and user interactions.AuthComponents
(inAuthComponent.jsx
): Component for user login, handles authentication.History
(inHistory.jsx
): Displays user profile information and game history.GameOver
: Displays the results of the game after completion.SingleGameHistory
(inMemSingleGameHistoryList.jsx
): Displays a list of rounds for the game.
- email:
peppe@polito.it
, password:password
- email:
mario@polito.it
, password:password