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.
Working Fullstack 2: Backend updates for new features. Implement the backend changes for the new productivity tool. Module 2 Task Overview
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
- Clone the Shiptivity frontend repository
- 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:
http://localhost:3001/api/v1/clients
curl -X GEThttp://localhost:3001/api/v1/clients?status=backlog
curl -X GEThttp://localhost:3001/api/v1/clients/1
curl -X GEThttp://localhost:3001/api/v1/clients/1 -H "Content-Type: application/json" -d '{"status":"in-progress", "priority": 6}'
curl -X PUTFor 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
http://localhost:3001/api/v1/clients/1 -H "Content-Type: application/json" -d '{"status":"in-progress"}'
curl -X PUTShould insert the client as lowest priority (biggest number) with status complete
http://localhost:3001/api/v1/clients/1 -H "Content-Type: application/json" -d '{"status":"complete"}'
curl -X PUTShould insert the client at the right priority and reorder the priority in clients with different statuses
http://localhost:3001/api/v1/clients/1 -H "Content-Type: application/json" -d '{"status":"complete", "priority": 3}'
curl -X PUTAdditional Resources
Node JS: https://nodejs.org/en/ Express: https://expressjs.com better-sqlite3: https://github.com/JoshuaWise/better-sqlite3/blob/HEAD/docs/api.md