CSE 341: Web Services

W03 Assignment: Mongoose and Frontend APIs

Overview

This week, you will work with your team in the Kizuna Rail codebase. Kizuna Rail is a fictional scenic railway booking website for tourists in Japan. The existing application includes trip information, stations, schedules, ticket classes, a booking flow, and booking confirmations.

Team-based work begins this week

This is not an individual assignment. You will coordinate with teammates, claim assigned issues, and open pull requests through the team workflow. Your teammates will review your pull requests and those code reviews must be completed by the beginning of next week.

Assignment Requirements

In this assignment, your team will be refactoring the existing code to clean it up, add some dynamic functionality to the pages, and prepare it for future assignments. In particular, you will do the following:

You will use the following file organization pattern:

Mongoose Schemas
Models
Controllers
Routes

Feature Sets

The following feature sets describe the specific work that needs to be completed. Each person on the team should be assigned to complete one feature set. Feel free to help one another as needed so that everyone can complete their assigned work.

The first three feature sets are required for all teams. If you have at least four team members, you should also complete feature set 4. If you have five team members, you should also complete feature set 5.

You can break each feature set into as many GitHub issues and Pull Requests as you would like, but each feature set must have at least one GitHub issue and one Pull Request.

Feature Set 1: Trips

Required Task

This feature set must be completed by all teams, because it will be used in future assignments.

Feature Set 2: Schedules

Required Task

This feature set must be completed by all teams, because it will be used in future assignments.

Feature Set 3: Bookings

Required Task

This feature set must be completed by all teams, because it will be used in future assignments.

Feature Set 4: Ticket Classes

Optional Task

This feature set should be completed if you have at least four team members.

Feature Set 5: Stations

Optional Task

This feature set should be completed if you have five team members.

Workflow

Complete the setup tasks

Before starting any additional feature work, make sure your team has completed the setup tasks from the team activity. Your team should have a working deployed instance of the app and a shared MongoDB database that everyone can use.

Select and coordinate features

  1. Make sure every feature set has an owner.
  2. If your team has fewer than five people, ensure that the first three tasks are assigned.
  3. Post the decisions in your Microsoft Teams channel so everyone knows who is responsible for each piece of work.

Develop a spec for each of your features

For each feature assigned to you, write a detailed spec before coding. This spec should follow the pattern from your previous assignments. You are welcome to use a single spec for your entire feature set, but you might find it simpler and easier to create multiple specs for various parts.

Make sure to include the following information:

Create GitHub issues

Create at least one GitHub issue for your feature set. Include the information from your spec in the issue description.

Implement the features

Use AI to Help

You are encouraged to use AI to help write the code for your features. Rather than use a single prompt to update all of the files at once, you should go through each file individually and use AI to assist with the implementation as you go. This is important for two key reasons:

  1. You need to understand each line of code that you are contributing to your project. Your teammates (and your future company) will expect you to be able to explain and maintain the code you write.
  2. AI might not follow all of the conventions, expectations, and requirements of the assignment.

Follow these steps to implement your feature set and open a pull request. If you created multiple issues, you should repeat this process for each one and create multiple pull requests.

  1. Create a branch for the issue.
  2. Implement the work.
  3. Test the change locally.
  4. Run the ESLint check and correct any reported errors before creating the pull request.
  5. Create a walkthrough video that includes the following:
    • Show the feature working locally.
    • Show the code and walk through the key functions, describing what the lines of code do.
    • Describe the major decisions you had to make and why you choose the solution you did. (You must describe at least one decision.)
  6. Open a pull request and include the following:
    • Make sure it connects to the GitHub issue.
    • Include a brief summary of the changes.
    • Include the verified Test Plan steps from the issue.
    • Include a link to your walkthrough video.
  7. Post in your Microsoft Teams channel that the PR is ready for review.
  8. Repeat this process for any additional issues you created.

Pull requests are required

Each assigned feature should be completed through a pull request. Do not push code directly to main.

You must have at least one pull request to receive credit for this assignment.

Prepare for code review

Your teammates will review these pull requests (PRs) as soon as they are ready, and these code reviews are all due at the beginning of Week 04. Make sure each PR is ready for review before the end of this assignment.

Complete the reflection

  1. Download the Week 03 reflection template.
  2. Answer the questions in your own words.
  3. Upload the completed reflection document to Canvas.

Deliverables Checklist

Other Links: