Within the framework of the practical assignment, it is planned to develop a web system, that allows people to write stories together sentence by sentence. Every registered user will be able to write a story, that starts and end with his own sentence. The middle part of the story will be completed by other users, who will be able to freely join group of authors of every opened story. All the authors will sequentially fulfill the story by a sentence repeatedly. Once the creator of the story decides to finish it, he/she writes a final sentence and closes the story. He/she is also able to remove any inappropriate or incongruous sentence, written by other users. Visitors will be able to read all the stories, like or dislike them, leave comments, get acquainted with all the authors and their contributions, follow the authors, select stories by keywords or find by a phrase included in a title, read the most recent stories, see the most hardworking story-writers.
The most significant concepts in the system: story, story repository, keywords, story creator and authors - contributors, comments, author rating, personalized story feed. The system consists of stories. Each story user-wise has its creator and authors – contributors. Each story feature-wise has keywords, rating (upvotes and downvotes), comments. Each author can be rated as well. According to that rating, the top-writers list will be generated. There will be built other rating as well: top hardworking authors, the most recent stories, the most popular stories, the most used keywords. Every author will have his/her own personal room with avatar, author’s rating, the most recent comments, the most recent contributions and stories.
The system will be implemented following an MVC paradigm (MTV paradigm in case of Django). The system will be distributed into the following components: Models:
-
User,
-
Sentence,
-
Story,
-
Keyword,
-
Comment
-
list of stories (sorted by different parameters),
-
list of created stories to join,- list of keywords (sorted by different parameters),
-
list of authors (sorted by different parameters),
-
view with information about a particular story,
-
personal profile page view,
-
other authors’ profile page view,
-
new story creation view,
-
view for sentence adding to a story,
-
view for story editing for the story creator,
-
story deletion view,
-
view for adding a comment to a story,
-
view for adding keywords to a story
-
StoryController with methods for retrieving and showing a list of stories (index), creating
(create) and saving (store) a new story, returning a list of stories filtered by search string in story name (search), view with top stories (top), a view for joining the circle of authors of the story;
-
SentenceController with methods for retrieving and showing a sentence with the precise
creation time, author, upvotes and downvotes (index), creating (create) and saving (store) a new sentence for the story [probably, I will add an ability to append a story straight from the view, generated by StoryController] , deleting (destroy) or editing (edit) a sentence [only for admins or story creators], returning a list of sentences, written by a certain person (search);
-
AuthorController with methods for retrieving and showing a list of authors (index), a list of top-
contributors and top hardworking authors (top), personal profile page (profile);
-
KeywordsController with methods for retrieving and showing a list of keywords (index), search
by keywords (search), list of the most popular keywords (top);
-
AdminController with methods for retrieving and showing a list of users (index), blocking or
unblocking a user (block); [still not sure about this controller, because user profiles will be available for everyone, which means, that a block button will be displayed according to the user role]
-
Laravel standard RegisterController and LoginController.
The system supports several user roles - a simple visitor, registered user, administrator. Each of these roles have different operations available in the system. Simple visitor:
-
Read stories;
-
Search for stories;
-
Explore keywords;
-
Explore top-rated authors;
Registered user:
-
Simple vositor’s rules;
-
Personal profile page;
-
Explore profiles of other users;
-
Read, comment and upvote / downvote stories;- Join the authors group and contribute a story
-
Upvote / downvote other authors’ sentences
-
Create a story -> gains additional rules
Registered user + Creator of the story (all the following point are related to his/her own story):
-
Write the title of the story;
-
Add keywords;
-
Add image, representing the story;
-
Start the story with the first sentence / couple of sentences;
-
Control joined contributors (remove from contributors);
-
Control sentences of other authors, who eventually joined the story (delete / edit / approve
sentences); Administrator:
-
Registered user’s rules;
-
Delete inappropriate stories / sentences;
-
Block users;
-
Delete keywords;
For the user authentication, it is possible to use a local registration system. There is a chance, that eventually I decide to integrate OAuth authentication system – login with Facebook, Google. But for now, this feature stays in to-do list.