jasminellok/sayhello-app

Design Doc Review: Backend & Frontend Routes, Components

Closed this issue · 0 comments

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

Comments

  • List routes: The DELETE and PATCH routes do not need to be nested. They only need a wildcard to identify the list 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)

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 the BoardShow component, which is different from a BoardIndexItem
    • The CardIndex and CardIndexItem would also be rendered at this route (they make up the BoardIndex)
    • How are lists represented visually? You may want a ListIndex and ListIndexItems as well, to organize cards into columns on the BoardShow page
  • A route with a cardId wildcard would typically render the CardShow, not a CardIndex and CardIndexItems. You also don't need the word board in the route (I don't see it there on Trello). The /cards/:cardId route should render CardShow / CardEdit form, plus the list of comments and the new comment form, as you described in the last bullet point