Design Doc Review: Backend & Frontend Routes, Components
Closed this issue · 0 comments
RosemaryGonzaga commented
Backend Routes
- Contains the following sections: HTML, API Endpoints(Backend)
- Each route has a description
- API Endpoint routes contains wildcard variables written in
snake_case
- Routes does not contain superfluous routes
- Have API routes that will allow the front end to get all info it needs and does not have unneeded routes:
- probably doesn't need a
GET likes
api endpoint because that info comes through the post show
- probably doesn't need a
Comments
- List routes: The
DELETE
andPATCH
routes do not need to be nested. They only need a wildcard to identify thelist
to be deleted or updated. So the path for these routes should be/api/lists/:id
- Add paths for Card and Comment routes
Frontend Routes
- Frontend routes contains wildcard variables written in
camelCase
- Correctly formatted
- Routes are displayed with
inline coding text
(backticks)
- Routes are displayed with
Comments
/users/:userId
--> A route with a wildcard would typically be used to render a specific user's profile page, not an index of users./boards/:boardId
--> This should render theBoardShow
component, which is different from aBoardIndexItem
- The
CardIndex
andCardIndexItem
would also be rendered at this route (they make up the BoardIndex) - How are
lists
represented visually? You may want aListIndex
andListIndexItems
as well, to organize cards into columns on theBoardShow
page
- The
- A route with a
cardId
wildcard would typically render theCardShow
, not aCardIndex
andCardIndexItem
s. You also don't need the wordboard
in the route (I don't see it there on Trello). The/cards/:cardId
route should renderCardShow
/CardEdit
form, plus the list of comments and the new comment form, as you described in the last bullet point