CSE 341: Web Services

W03 Project: Project 2 Part 1 (CRUD Operations)

Overview

Purpose: Start developing a new API and gain experience performing CRUD operations.

Project Description

For Weeks 03-04, you will create a new project of your choosing. You will have two weeks in this course to complete it, just like the last project. This project will perform CRUD operations on a MongoDB database, be published to the Web, incorporate security measures, and include API documentation.

Overall Requirements (Due at the end of Week 04)

The overall requirements for this project (to be completed in Week 04) are:

  1. Be sure to review the rubric in Canvas to see how you will be graded on this assignment.
  2. The database should store at least two collections.
  3. At least one collection should store documents that have 7 fields or more.
  4. The Node project successfully connects to MongoDB.
  5. API routes perform GET, POST, PUT, DELETE requests that are fully functional.
  6. All routes should include data validation and error handling.
  7. Project must incorporate use of OAuth for user management.
  8. API Documentation is professional, comprehensive, relevant, and accurate
  9. API is published to Render and can be called from external sources
  10. Create a 5 to 8 minute video that goes through the items in Rubrics. Upload it to YouTube. Videos longer than the alloted time will receive a zero and will be asked to resubmit.
  11. Submit the following links in Canvas: GitHub repo, Render site, and YouTube video.

Part 1 requirements (Due at the end of Week 03)

To help you make progress toward finishing this project, for this week's assignment you need to complete the Create, Retrieve, Update, and Delete (CRUD) operations with validation and error handling.

Then, in Week 04 you will finish the project by adding authentication.

Start the Project

Complete the following to get started:

  1. Create a new Node.js project.
  2. You'll use the same MongoDB cluster/account, but you should create a new database for this project. (When you connect to MongoDB Compass, you connect to your account, and your list of databases shows up in the bottom left corner.)
  3. Create your first REST API routes (similar to what we did with the routes and controllers folders in your previous, Contacts project). You will need both GET and POST requests for this assignment.

Add Documentation and Publish your API

Complete the following:

  1. Create API documentation for these two routes and test them.
  2. Create a new Render project.
  3. Be sure to create an env file for your local MongoDB credentials, and add config vars to your Render project. Your MongoDB credentials should never get pushed to git, so be sure to include your env file in your gitignore.

Add Update and Delete Functionality and Validation

Complete the following:

  1. Add PUT and DELETE routes to your API. Verify in MongoDB that these work as intended.
  2. Add validation to your routes.
  3. Add error handling to your routes.
  4. Be sure to update your API documentation to include all of your routes.

Prepare for Submission

Complete the following:

  1. Push to GitHub.
  2. Publish to Render.
  3. Create a brief video demonstrating the functionality of your assignment. Upload it to YouTube (public or unlisted).
  4. Submit GitHub, Render, and YouTube links in Canvas.
  5. Be sure to review the rubric in Canvas to see how you will be graded on this assignment.

Submission

When you have finished the assignment:

Other Links: