Skip to content

abellonioandrea/progettoWebAppI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Review Assignment Due Date

Exam #1: "Stuff Happens"

Student: s343884 ABELLONIO ANDREA

React Client Application Routes

  • 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

API Server

  • 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/current ONLY AUTHENTICATED USER

    • request parameters: none, request body content: credentials
    • return user in json format
  • POST /api/game/cards ONLY AUTHENTICATED USER

    • request parameters: none, request body content: list of cards used in the game with all the infos
    • return nothing
  • GET /api/game/getAllGamesCards ONLY 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

Database Tables

  • 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

Main React Components

  • MyCard (in MyCard.js): card component used for the game and the profile page, showing image, name and badLuckIndex
  • MyModal (in MyModal.js): modal component used in all the application
  • MyNavbar (in MyNavbar.js): navbar of all the application

Screenshot

User history

Screenshot

Gameplay

Screenshot

Users Credentials

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors