First and Last
First and Last (www.first-and-last.com) is a learning tool for writers. One of the best ways to improve writing is to imitate the prose of good writers. Writers are at their best, in general, in their first and last sentences. Users of First and Last can add sentences from books, browse the collection, do a guess-the-book quiz, see three random entries, and like or comment on their favourite sentences. It is a single-page web application built with Angular 2, Express, Node and MongoDB.
After registering, users can add first and last sentences to the database. They can first search to see if the book is already in the collection. A user that attempts to enter a book already entered will receive an error message.
The sentences are stored in JSON format in MongoDB. The user who entered the sentences is also stored, along with the date. The entry in the database is updated when another user likes or comments on the sentences.
Users can click the “3 random entries” button and the app will fetch random entries from the database. If logged in, a user can like a pair of sentences, but will receive an error if they try to like the same entry more than once. Users can also leave a comment about a pair of sentences.
Users can also try the guess-the-book quiz. They will be presented with a pair of sentences and asked to choose the book title from three possibilities. The number of correct answers in a row is displayed. The counter is reset to zero when an incorrect title is chosen.
Users can also see the entire collection of book titles by selecting “Full List” from the menu. Only the book titles are displayed. The first and last sentences for a book, however, are fetched when a user clicks on the title.