- Clone this repo
- Run
npm install
- Start your MongoDB!
mongod
- In a separate window run
npm start
- Solve the following exercises in order
- Concentrate on JS, not on CSS
- Write clean code
- the folder
src
(andpublic
) contains the frontend code, the rest is backend - Get to know the Card model
- Get to know the App.js
- Add a post method so you can add new Cards to the DB
- Add a few cards with
title
with POSTMAN
- Extract the fetch method to seperate file called
services.js
- Create a component
Card
that renders a card (it only has a title right now) - Add a component
CardList
that renders all cards - Your
App
should now just renderCardList
which renders multipleCard
s
- Add a
description
andtags
(an Array of Strings) to the Card model - Delete all existing Cards from the DB
- Add a new Card via POSTMAN that contains everything from the cardSchema
- Add description and tags to your
Card
- To show the tags, create a
Tag
component
- Create a
Form
component to create newCard
s - Make sure to create an Array of Strings from the
tag
String - Add that
Form
above theCardList
- Add a function
postCard
toservices
- Use
postCard
in the Form and update thestate
when the server responds with a new card
- Save all cards in localStorage
- Load all cards from localStorage when you initialize the
state
- Update the localStorage, whenever you add a new
Card
- Add a boolean property
bookmarked
to your cardSchema with a default value offalse
- Add a
patch
method to your server in order to be able to update a card
- Add a text to each card that says
bookmark
orbookmarked
depending on the card data - Add a new method
patchCard
toservices
- Use that on click on
bookmark
to toggle the bookmark-state on the server - When the server responds, update the card in your state