The example implementation uses these tables:
Database name: inspiration_board_development
Columns:
board_id
, int, primary keytitle
, stringowner
, string
Columns:
card_id
, int, primary keymessage
, stringlikes_count
, intboard_id
, int, foreign key toboard_id
inboard
This implies that there are two models:
Board
Card
The example implementation uses these components.
Feel free to inspect the example implementation using React Dev Tools for more inspiration.
Components:
App
Board
NewBoardForm
CardList
NewCardForm
Card
Note: Why isn't there a BoardList
component? There's not really a good reason, besides a weird decision. Not every design turns out perfectly! Many designs evolve over time.
Don't forget that these are here to inspire your solution. They are not requirements!
The example implementation uses these props and state in the board-related components.
Feel free to inspect the example implementation using React Dev Tools for more inspiration.
State:
boardsData
selectedBoard
isBoardFormVisible
Props:
board
onBoardSelect
Props:
createNewBoard
State:
title
owner
The example implementation defines these endpoints.
GET
/boards
POST
/boards
GET
/boards/<board_id>/cards
POST
/boards/<board_id>/cards
DELETE
/cards/<card_id>
PUT
/cards/<card_id>/like
Don't forget that these are here to inspire your solution. They are not requirements!
In the example implementation, the front-end layer sends these request bodies to the back-end API.
Every time the front-end sends a request to the back-end, and the request needs to send data about a board, the HTTP request includes these key-value pairs:
{
"title": ...,
"owner": ...
}
Every time the front-end sends a request to the back-end, and the request needs to send data about a card, the HTTP request includes these key-value pairs:
{
"message": ...,
"likes_count": ...,
"board_id": ...
}
Don't forget that these are here to inspire your solution. They are not requirements!
In the example implementation, the back-end API sends back these responses to the front-end layer.
Every time the API sends back data about a board, the HTTP response includes these key-value pairs:
{
"board_id": ...,
"title": ...,
"owner": ...
}
When the API sends back a list of boards, the HTTP response looks like:
[
{
"board_id": ...,
"title": ...,
"owner": ...
},
{
"board_id": ...,
"title": ...,
"owner": ...
}
]
When the API sends back a card, the HTTP response looks like:
{
"card_id": ...,
"message": ...,
"likes_count": ...,
"board_id": ...
}
Lists of cards are in an array:
[
{
"card_id": ...,
"message": ...,
"likes_count": ...,
"board_id": ...
},
{
"card_id": ...,
"message": ...,
"likes_count": ...,
"board_id": ...
}
]