Skip to content

Project 4: Hyper Quiz

Trayan Iliev edited this page May 12, 2019 · 15 revisions

Project 4: Hyper Quiz

The main goal of the project is to implement a web application allowing the Users (Contestants and Administrators) to share different Quizzes (ala Kahoot - https://kahoot.com/ :) of Recipes online, and Comment about their personal experience and ideas, when cooking and enjoying them.

All Users should have following common attributes:

  • id (generated automatically) - long number;
  • firstName - string 2 to 15 characters long;
  • lastName - string 2 to 15 characters long;
  • email - should be valid email address, unique within the system, cannot be changed;
  • username - string 2 to 15 characters long - word characters only, unique within the system, cannot be changed;
  • password - string 8 to 15 characters long, at least one digit, one capital letter, and one sign different than letter or digit, NOT sent back to the User clients for security reasons;
  • gender - MALE / FEMALE enumeration;
  • role - READER or ADMIN enumeration, READER by default, editable only by Administrators;
  • picture of the user (optional)- valid URL, if missing should ne substituted with an avatar according to the gender;
  • description (optional) - string 20 - 250 characters long;
  • metadata (optional) - string up to 512 characters long, visible and editable only by Administrators;
  • status - validity status of the user account (ACTIVE, CHANGE_PASSWORD - should change password on login, SUSPENDED, or DEACTIVATED), visible and editable only by Administrators;
  • quizzes - list of all Quizzes added by the current User;
  • created (generated automatically) - time stamp of the moment the user account was created;
  • modified (generated automatically) - time stamp of the moment the user account was last modified;
Additionally, the Contestants should have following attributes:
  • results - list of all Results from Quizzes the User has taken;
  • favoriteRecipes - list of favorite Recipes chosen by the User;
  • favoriteCooks - list of favorite HomeCooks (Users) chosen by the current User;
The Administrators should have in addition to the User's attributes, the following fields:
  • categoriesModerated - list of all Categories the Administrator moderates Recipes for;
The HomeCooks should be able to manage their own personal data and change their passwords. The Administrators should be able to manage all User's data, except their passwords. The IDs of all entities should be generated automatically and should NOT be changeable;

The Administrators should be able to add new Categories and Recipes. The HomeCooks should be able to add new Recipes only to existing Categories.

Each Category has the following structure:

  • id (generated automatically) - long number;
  • name - string 2 to 120 characters long;
  • description (optional) - string 10 - 500 characters long, supporting Markdown syntax;
  • tags - string including comma separated tags, allowing to find the Publication by quick search;
  • created (generated automatically) - time stamp of the moment the entity was created;
  • modified (generated automatically) - time stamp of the moment the entity was last modified;
Each Recipe has the following structure:
  • id (generated automatically) - long number;
  • category - the Category the Recipe belongs to;
  • title - string 2 to 120 characters long;
  • author - the User sharing the Recipe;
  • shortDescription - string 2 to 250 characters long;
  • cookingTime - integer number in minutes;
  • usedProducts - string 20 - 500 characters long, supporting Markdown syntax;
  • picture - of the cooked meal, valid URL to the picture;
  • description (optional) - string 150 - 2500 characters long, supporting Markdown syntax;
  • tags - string including comma separated tags, allowing to find the Recipes by quick search;
  • comments (optional) - the list of Comments about the Recipe;
  • created (generated automatically) - time stamp of the moment the entity was created;
  • modified (generated automatically) - time stamp of the moment the entity was last modified;
The Recipes should be able to find by browsing Categories and by Search using Recipe's title, products, short description, and tags. In addition to this the Recipes should be able to filter by cooking time.

All Users should be able to add Recipes and Comments about the Recipes sharing personal experience and ideas. Each HomeCook should be able to manage (edit / delete) her/his own Recipes and Comments. All Comments should be visible from the Recipe details view. The Administrator should be able to view and manage (edit / delete) Comments and Recipes of all Users.

Each Comment should have the following attributes:

  • id (generated automatically) - long number;
  • author - the Comment's author (User);
  • recipe - the Recipe the comment is about;
  • text - string 5 - 1500 characters long, supporting Markdown syntax;
  • url (optional) - the URL of a web resource Comment's author wants to attach, should be a valid URL;
  • created (generated automatically) - time stamp of the moment the entity was created;
  • modified (generated automatically) - time stamp of the moment the entity was last modified;
In addition to the above described functionality, the web application should allow to manage (add, browse, view, edit, and delete) different types of Users, HomeCooks, Categories, Recipes, and Comments, according to the privileges (role) of the logged-in User, as described above. All input data should be validated according to the above specified requirements. For further questions and clarification - please ask the instructor.

Clone this wiki locally