routes - michael-berman/Blue-Prints GitHub Wiki

Frontend Routes

  • /
    • Home page
  • /login
  • /users/:user_id
    • For member profile and own project collection
  • /register (signup)
  • /featured
    • Renders Projects that have many favorites
  • /project/:project_id
    • Renders specific project along with its comments
    • Renders all of the steps accordingly
  • /project/new
    • Creates to project
  • /project/:project_id/edit
    • Edits page for specific project
  • /category/:category_id
    • Renders projects for that category (similar to featured page)

Backend Routes

Users

  • GET /api/users
    • Returns the user information for the User Search feature
  • POST /api/users
    • Creates a user
  • GET /api/users/:user_id
    • Returns user information for specific user with projects

Session

  • GET /api/session
    • Returns the user information
  • delete /api/session
    • Logs out current user

Projects

  • GET /api/projects
    • Returns projects that are recent
  • GET /api/projects/featured
    • Returns projects that have most follows
  • GET /api/projects/:project_id
    • Returns specific project depending on id along with comments and favorites
  • POST /api/projects
    • Creates a project
  • PATCH /api/projects/:project_id
    • Edits a project
  • DELETE /api/projects/:project_id
    • Remove a project

Steps

  • GET /api/projects/:project_id/steps
    • Returns steps for a specific project
  • POST /api/projects/:project_id/steps
    • Uploads a step for a specific project

Videos

  • GET /api/projects/:project_id/videos
    • Returns videos for a specific project
  • POST /api/projects/:project_id/videos
    • Uploads an video for a specific project
  • DELETE /api/videos/:video_id
    • Removes an video on a project

Images

  • GET /api/projects/:project_id/images
    • Returns images for a specific project
  • POST /api/projects/:project_id/images
    • Uploads an image for a specific project
  • DELETE /api/images/:image_id
    • Removes an image on a project

Comments

  • POST /api/projects/:project_id/comments
    • Creates a comment for a specific project
  • DELETE /api/comments/:comment_id
    • Removes a comment on a project

Favorites (Bonus, once rest of features are finished)

  • POST /api/projects/:project_id/favorites
    • Creates a favorite for a specific project from the current user
  • DELETE /api/projects/:project_id/favorites/:favorite_id
    • removes a favorite on a project from the current user if there is one

Categories (Bonus, once rest of features are finished)

  • GET /api/categories/:categories_id
    • Returns projects for certain category
⚠️ **GitHub.com Fallback** ⚠️