Pinspire is a partial clone of the popular website Pinterest, created as part of a collaborative group project. Pinterest is known for its intuitive platform, designed for discovering and sharing creative ideas through visual content. Our team was inspired by Pinterest's clean and user-friendly interface, which makes exploring content engaging and seamless. We aimed to replicate the fluid layout, infinite scrolling, and core features like saving pins and organizing them into boards, all while ensuring the design remained visually appealing.
https://pinspire.onrender.com/
Featurelist | Schema | User Stories
image
image
image
image
GET /
Authenticates the current user.
Successful Response:
{
"id": 1,
"username": "user",
"email": "user@example.com"
}
Error Response:
HTTP Status Code 401
{
"errors": {
"message": "Unauthorized"
}
}
POST /login
Logs a user in. Requires email and password. Returns user details on successful login.
Successful Response:
{
"id": 1,
"username": "user",
"email": "user@example.com"
}
Error Response:
HTTP Status Code 401
{
"errors": {
"first_name": ["This field is required."],
"last_name": ["This field is required."],
"email": ["This field is required."],
"password": ["This field is required."]
}
}
POST /signup
Creates a new user and logs them in. Requires username, first name, last name, email, and password. Returns user details on successful signup.
Successful Response:
{
"id": 1,
"username": "user",
"email": "user@example.com"
}
GET /unauthorized
Returns an unauthorized error JSON when authentication fails.
GET /logout
Logs the user out. Returns a success message.
GET /
Retrieves all boards.
Successful Response:
[
{
"id": 1,
"name": "Board Name",
"private": true,
"pins": [
{
"id": 1,
"img_url": "http://example.com/image.jpg"
}
]
}
]
Error Response: HTTP Status Code 404
{
"message": "no boards found"
}
GET /<int:board_id>
Retrieves a specific board by its ID.
Successful Response:
{
"id": 1,
"name": "Board Name",
"private": true,
"pins": [
{
"id": 1,
"img_url": "http://example.com/image.jpg"
}
]
}
Error Response:
HTTP Status Code 404
{
"error": "no board found"
}
POST /create
Creates a new board. Requires board name and privacy status.
Successful Response:
{
"id": 1,
"name": "New Board",
"private": false
}
Error Response:
HTTP Status Code 400
{
"errors": {
"name": ["This field is required."]
}
}
PUT /<int:board_id>
Updates a specific board by its ID.
Successful Response:
{
"message": "board changes successful",
"board": {
"id": 1,
"name": "Updated Board",
"private": false
}
}
Error Response:
HTTP Status Code 404
{
"error": "no board found"
}
DELETE /<int:board_id>
Deletes a specific board by its ID.
Successful Response:
{
"message": "Successfully deleted board 1",
"boardId": 1
}
Error Response: HTTP Status Code 404
{
"error": "board does not exist"
}
GET /<int:board_id>/pins
Retrieves all pins associated with a specific board.
Successful Response:
{
"Pins": [
{
"id": 1,
"img_url": "http://example.com/image.jpg"
}
]
}
Error Response:
HTTP Status Code 404
{
"error": "no board found"
}
GET /<int:board_id>/pins/<int:pin_id>
Retrieves a specific pin associated with a board.
Successful Response:
{
"id": 1,
"img_url": "http://example.com/image.jpg"
}
Error Response:
HTTP Status Code 404
{
"error": "pin not found"
}
POST /<int:board_id>/pins/<int:pin_id>/create
Adds a pin to a specific board.
Successful Response:
{
"id": 1,
"img_url": "http://example.com/image.jpg"
}
Error Response:
HTTP Status Code 400
{
"message": "Pin already associated with this board"
}
DELETE /<int:board_id>/pins/<int:pin_id>/delete
Removes a pin from a specific board.
Successful Response:
{
"id": 1,
"img_url": "http://example.com/image.jpg"
}
Error Response:
HTTP Status Code 400
{
"message": "Pin not associated with this board"
}
GET /user/<int:user_id>
Retrieves all favorite pins for a specific user.
Successful Response:
[
{
"id": 1,
"pin_id": 1,
"user_id": 1
}
]
Error Response:
HTTP Status Code 403
{
"error": "Unauthorized access"
}
POST /<int:pin_id>/create
Adds a pin to the current user's favorites.
Successful Response:
{
"id": 1,
"pin_id": 1,
"user_id": 1
}
Error Response:
HTTP Status Code 400
{
"errors": "Pin already favorited"
}
GET /all
Retrieves all favorite pins for the current user.
Successful Response:
[
{
"id": 1,
"pin_id": 1,
"user_id": 1
}
]
DELETE /<int:pin_id>/delete
Removes a pin from the current user's favorites.
Successful Response:
{
"id": 1,
"pin_id": 1,
"user_id": 1
}
Error Response:
HTTP Status Code 404
{
"error": "Favorite not found"
}
GET /<int:pin_id>/comments
Retrieves all comments for a specific pin.
Successful Response:
{
"comments": [
{
"id": 1,
"comment": "Great pin!",
"user_id": 1
}
]
}
POST /<int:pin_id>/new-comment
Creates a new comment on a specific pin. Requires comment text.
Successful Response:
{
"id": 1,
"comment": "Great pin!",
"user_id": 1
}
Error Response:
HTTP Status Code 400
{
"errors": {
"comment": ["This field is required."]
}
}
PUT /<int:pin_id>/<int:comment_id>/edit
Updates a specific comment on a pin.
Successful Response:
{
"id": 1,
"comment": "Updated comment",
"user_id": 1
}
Error Response:
HTTP Status Code 404
{
"error": "comment not found"
}
DELETE /<int:pin_id>/<int:comment_id>
Deletes a specific comment from a pin.
Successful Response:
{
"message": "Successfully deleted comment"
}
Error Response:
HTTP Status Code 404
{
"error": "comment not found"
}
POST /create
Uploads an image for a new pin. Requires an image file.
Successful Response:
{
"img_url": "http://example.com/image.jpg"
}
Error Response:
HTTP Status Code 400
{
"errors": "Invalid image file"
}
GET /
Retrieves a list of all users.
Successful Response:
[
{
"id": 1,
"username": "user",
"email": "user@example.com"
}
]
GET /<int:id>
Retrieves details for a specific user by their ID.
Successful Response:
{
"id": 1,
"username": "user",
"email": "user@example.com"
}
Error Response:
HTTP Status Code 404
{
"error": "user not found"
}