I need help with Assignment Mongodb Node/Express for 100 Assignment – Library + Database Server
This assignment further extends your Library assignments.
Your web server program is required to handle book management and client management via MongoDB.
Assignment Specifications
Your Node/Express/Handlebars/MongoDB or Mongoose/JSON/Router/Session with cookie(s)-based deliverable must address the following:
MongoDB Database/Collections/Documents
- Sign up and create a new MongoDB Atlas account on http://www.mongodb.com/cloud/atlas
- Create your own MongoDB database under your MongoDB Atlas account
- Set up a books collection (table) by populating it with a minimum of 15 documents (records) that are in the following format:
Books Collection | |||
ID | Title | Author | Available |
11345 | The Shining | Stephen King | false |
12406 | Rainbow Six | Tom Clancy | true |
29937 | Steve Jobs | Walter Isaacson | true |
44444 | Elon Musk | Ashley Vance | false |
48912 | Pride and Prejudice | Jane Austen | true |
50000 | Killing Floor | Lee Child | false |
55755 | Rules of Prey | John Sandford | true |
68529 | The C Programming Language | Kernighan and Ritchie | true |
76008 | On a Pale Horse | Piers Anthony | true |
79112 | Mortal Stakes | Robert B. Parker | true |
83098 | The Firm | John Grisham | false |
86868 | Exit Lines | Reginald Hill | true |
90044 | Point of Impact | Stephen Hunter | false |
93571 | Pronto | Elmore Leonard | true |
99992 | A Deadly Shade of Gold | John D. MacDonald | true |
- The new MongoDB books collection replaces the books.json file used by assignment two
- Changing the layout and structure of books collection is prohibited
- Set up a clients collection (table) by populating it with a minimum of 5 documents (records) matching the users in the users.json file in the following format:
Clients Collection | |
Username | IDBooksBorrowed (array object) |
[email protected] | 44444, 50000, 83098 |
[email protected] | |
[email protected] | |
[email protected] | |
[email protected] | 11345 |
[email protected] | 90044 |
- Changing the layout and structure of clients collection is prohibited
Modifying Existing Webpages
Landing Webpage
- Remain unchanged
Sign in Webpage
- Remain unchanged
Home Webpage
- The container situated to the left of the webpage and its functionality is to remain unchanged
- The container situated to the right of the webpage is to be populated by
- The email address of the signed in user
- The content of books collection with the title of all books borrowed by the signed in user and corresponding checkbox elements
- A button with Return as its caption
- The available property for each book in the books collection is to be updated per Borrow/Return button selection
- The IDBooksBorrowed property for each client is to be updated per Borrow/Return button selection with borrowed book IDs
- The same book cannot be borrowed at the same time by multiple clients
- The remaining functionality is to remain unchanged
Modifying the Web Server Program Structure
- Utilize the Express Router middleware to isolate a minimum of one business functionalities (e.g. login, borrow, return etc.) of your web server program by
- Create and export a new JavaScript file that is to specifically handle the chosen functionality
- Import the new JavaScript file to your web server program and utilize accordingly
- The remaining design criteria are to be decided by the web app designer
Technical Specifications
- Code one JavaScript server application using Node.js for routing, Express.js for framework and Handlebars.js for templating
- Necessary npm modules are: express, express-handlebars, mongodb and/or mongoose, fs, path, randomstring and express-session
- If the session was left inactive for more than three minutes, the session is to be automatically terminated and returns to the Sign in page when user tries to submit another request message
Assignment Requirements
- Hand in your assignment by date specified on the weekly schedule in media specified in the course overview
- The completed assignment is to include at least two js file, three hbs files, one package.json file, one users.json file, your assignment URL and necessary image files all compressed into one zip file
- Do not include your node_modules subfolder as part of your zip file
- Single Page Application (SPA) development is prohibited
- Usage of front-end framework such as React, Vue, Angular are prohibited
- Your assignment is to be submitted via Blackboard
- Ensure your assignment can be successfully tested via localhost:3000
- Optional: Deploy your assignment to your Cyclic/Heroku account
- Optional: Ensure your assignment can be successfully tested via your Cyclic/Heroku URL
Note: This assignment is worth 25% of your final grade.