Skip to content

Latest commit

 

History

History
102 lines (73 loc) · 4.12 KB

README.markdown

File metadata and controls

102 lines (73 loc) · 4.12 KB



Task Overview | Installation | Link to Module 2 | Link to Y Combinator Program

Introduction

College Students: Learn how to work at a Y Combinator startup
Train online for the skills Y Combinator startups are looking for. One of the official ways to get recruited into a Y Combinator startup.

Module 2 Task Overview

Working Fullstack 2: Backend updates for new features. Implement the backend changes for the new productivity tool.

Aim: Your task is to take the latest version of the Shiptivitas app and now tie it to the NodeJS backend. In the backend, what you need to do is write a few functions that take the user event on the frontend and then save it to your database.

Acceptance Criteria

  • When a user moves a card from one swimlane to another, the database updates the position of the client accordingly.
  • When a user rearranges a card in the same swimlane, the database updates the position of the client accordingly.
  • When a user refreshes the page, the cards position and order should remain in the same spot as before.

Installation

  1. Clone the Shiptivity frontend repository
  2. Make the necessary changes to the code.
    note: this app does not require any user auth systems or permission levels yet

Shiptivity API server

This is a node js application using Express

To run the application make sure you have node installed.

Once you have cloned the repo, run: npm install to install all dependencies

Start the server by running: npm start This command will run the Express server on localhost:3001

Try the API by running:

curl -X PUT http://localhost:3001/api/v1/clients/1 -H "Content-Type: application/json" -d '{"status":"in-progress", "priority": 6}'

For this task, you only need to update the API for updating client detail.

Valid status:

  • backlog
  • in-progress
  • complete

client.priority should be unique per status. Ordered from 1 to x where priority 1 means most important client.

Some sample curl to help you test your code (make sure you restart your server each time you run this):

Should do nothing

curl -X PUT http://localhost:3001/api/v1/clients/1 -H "Content-Type: application/json" -d '{"status":"in-progress"}'

Should insert the client as lowest priority (biggest number) with status complete

curl -X PUT http://localhost:3001/api/v1/clients/1 -H "Content-Type: application/json" -d '{"status":"complete"}'

Should insert the client at the right priority and reorder the priority in clients with different statuses

curl -X PUT http://localhost:3001/api/v1/clients/1 -H "Content-Type: application/json" -d '{"status":"complete", "priority": 3}'

Additional Resources

Node JS: https://nodejs.org/en/ Express: https://expressjs.com better-sqlite3: https://github.com/JoshuaWise/better-sqlite3/blob/HEAD/docs/api.md