Skip to content

Project 1: Online Reading Club

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

Project 1: Online Reading Club

The main goal of the project is to implement a web application allowing the users (readers and administrators) to register and read different types of publications (books, papers, web resources) online, and share their unique personal points of view and ideas by annotating different publication sections with thoughtful comments.

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;
  • picture of the user (optional)- valid URL, if missing should ne substituted with an avatar according to the gender;
  • status - validity status of the user account (ACTIVE, CHANGE_PASSWORD - should change password on login, SUSPENDED, or DEACTIVATED), accessible and editable only by Administrators;
  • metadata (optional) - string up to 512 characters long, accessible and editable only by Administrators;
  • comments - list of Users own 'Comments;
  • 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 Readers should have following attributes:
  • publicationsRead - list of all Publications the Reader has already read and/or commented;
  • friends - list of all friends (Users), the user wants to share his Comments with;
The Administrators should have in addition to the User's attributes, the following fields:
  • publicationsAdded - list of all Publications the administrator has added to the library;
The Readers 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 Authors and Publications together with their Sections. The Publications have the following structure:

  • id (generated automatically) - long number;
  • title - string 2 to 120 characters long;
  • authors - list of all Authors of the Publication;
  • description (optional) - string 20 - 2500 characters long, supporting Markdown syntax;
  • tags - string including comma separated tags, allowing to find the Publication by quick search;
  • type - enumeration including BOOK, PAPER, and WEB_RESOURCE;
  • url (optional) - the url of the publication on WWW, should be a valid URL;
  • sections (optional) - the list of Sections of the Publication, described further;
  • comments (optional) - the list of Comments about the Publication in general;
  • 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 Section should have the following attributes:
  • id (generated automatically) - long number;
  • publication - the Publication that the Section belongs to;
  • title - string 2 to 120 characters long;
  • description (optional) - string 20 - 2500 characters long, supporting Markdown syntax;
  • tags - string including comma separated tags, allowing to find the entity by quick search;
  • type - enumeration including INTRODUCTION, CHAPTER, TOC,INDEX, and SUB_SECTION;
  • url (optional) - the URL of the section, could be relative to the Publication URL;
  • startPage (optional) - the start page of the section in case of printed resource;
  • endPage (optional) - the end page of the section in case of printed resource;
  • subSections (optional) - list of Section entities, that are sub-sections of the current Section; !!! ADVANCED: Implement it only if you have enough time
  • comments (optional) - the list of Comments about the current Section;
  • 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;
All users should be able to add Comments about the Publications in general and/or their Sections in particular. Each Reader should be able to manage (edit / delete) her/his own Comments. The Comments of Reader's friends and Administrators should be visible together with own Comments while reading the Publication/Section. The Administrator should be able to view and manage (edit / delete) Comments of all Users.

Each Comment should have the following attributes:

  • id (generated automatically) - long number;
  • author - the comment's author (User);
  • publication - the Publication the comment is about;
  • section - the Section the comment is about;
  • fragment (optional) - the relative #fragment URL inside the Publication/Section;
  • page (optional) - the commented page in the Publication/Section in case of printed resource;
  • text - string 5 - 1500 characters long, supporting Markdown syntax;
  • tags - string including comma separated tags, allowing to find the entity by quick search;
  • url (optional) - the URL of a web resource Comment author wants to refer, should be 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;
Each Author should have the following attributes:
  • id (generated automatically) - long number;
  • firstName - string 2 to 15 characters long;
  • lastName - string 2 to 15 characters long;
  • picture of the author (optional) - valid URL, presented only in Author's view, if missing should be skipped;
  • description (optional) - string 5 - 1500 characters long, supporting Markdown syntax;
  • publications - list of all Publications of the current Author;
  • 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;
In addition to the above described functionality, the web application should allow to manage (add, browse, view, edit, and delete) different types of Users, Authors, Publications, Sections, 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