ELot | Live Site
Welcome to the ELot ReadMe! ELot is a simulated market storefront inspired by Ebay and Gamestop.
This caused an idea to where what if you had a store that had news from the users and products from the users as well, only being a middleman company?
This shows the idea, with Products, both Traditional and Electronic, articles on these topics, a Transaction and Cart system, and finally a Review System for purchased products.
Feature List | Schema | User Stories
Description: Queries for all users and returns them in a list of user dictionaries
Authentication: Logged In
Response 200 OK:
{
"users":[
{
"id":1,
"username":"demo",
"email":"demo@aa.io"
}
]
}Description: Queries for a specific user, getting all info needed to see their profile
Parameters:
:userIdId of the user
Response 200 OK:
{
"user":{
"id":1,
"username":"demo",
"products":[
{
"id":1,
"name":"Conker's Bad Fur Day",
"description":"Product Description",
"isTraditional":false,
"images":[
{
"id":1,
"imageUrl":"URL"
}
],
"owner":{
"id":1,
"username":"demo",
},
"price":13.99,
"purchased":false,
"tags":[
{
"id":1,
"tag":"Nintendo"
}
],
"timeCreated":"TimeCreated",
"timeUpdated":"TimeUpdated",
}
],
"articles":[
{
"id":1,
"title":"Article Title",
"body":"Article Body",
"owner":{
"id":1,
"username":"demo",
},
"tags":[
{
"id":1,
"tag":"Nintendo"
}
],
"imageUrl":"Article Image URL",
"timeCreated":"TimeCreated",
"timeUpdated":"TimeUpdated",
}
],
"madeReviews":[
{
"id":1,
"reviews":"Review Text",
"rating":3,
"owner":{
"id":1,
"username":"demo",
},
"product":4,
"timeUpdated":"Last Creation or Update Time"
}
],
"reviews":[
{
"id":1,
"reviews":"Review Text",
"rating":2,
"owner":{
"id":1,
"username":"marnie",
},
"product":1,
"timeUpdated":"Last Creation or Update Time"
}
],
"madeComments":[
{
"id":1,
"comment":"Comment Text",
"rating":3,
"owner":{
"id":1,
"username":"demo",
},
"article":{
"id":4,
"title":"title",
"body":"line1\nline2",
"imageUrl":"link"
},
"timeUpdated":"Last Creation or Update Time"
}
],
"comments":[
{
"id":2,
"comment":"Comment Text",
"rating":4,
"owner":{
"id":2,
"username":"marnie",
},
"article":{
"id":1,
"title":"title",
"body":"line1\nline2",
"imageUrl":"link"
},
"timeUpdated":"Last Creation or Update Time"
}
]
}
}Respone 404 Not Found:
{
"message":"User does not exist"
}Description: Queries for all products belonging to the current logged in user
Authentication: Logged In
Response 200 OK:
{
"products":[
{
"id":1,
"name":"Conker's Bad Fur Day",
"description":"Product Description",
"isTraditional":false,
"images":[
{
"id":1,
"imageUrl":""
}
],
"owner":{
"id":1,
"username":"demo",
},
"price":13.99,
"purchased":false,
"tags":[
{
"id":1,
"tag":"Nintendo"
}
],
"timeCreated":"TimeCreated",
"timeUpdated":"TimeUpdated",
}
]
}Description: Queries for all articles of the current logged in user
Authentication: Logged In
Response 200 OK:
{
"articles":[
{
"id":1,
"title":"Article Title",
"body":"Article Body",
"owner":{
"id":1,
"username":"demo",
},
"tags":[
{
"id":1,
"tag":"Nintendo"
}
],
"imageUrl":"Article Image URL",
"timeCreated":"TimeCreated",
"timeUpdated":"TimeUpdated",
}
]
}Description: Authenticates a user
Response 200 OK:
{
"user":{
id:1,
username:"demo",
email:"demo@aa.io"
}
}Respone 401 Unauthorized:
{
"message":"unauthorized"
}Description: Logs in a user
Request:
{
"email" :"demo@aa.io",
"password" : "USERPASSWORD"
}Response 200 OK:
{
"user":{
"id":1,
"username":"demo",
"email":"demo@aa.io"
}
}Respone 401 Unauthorized:
{
"email":[
"Data Required",
"Email Provided not found"
],
"password":[
"Data Required",
"No such user exists",
"Password was incorrect"
],
}Description: Logs out the current user
Response 200 OK:
{
"message": "User logged out"
}description: Signs up a new user to the site
request:
{
"username":"navi",
"email":"lookatme@aa.io",
"password":"S0M3C00LP4SSW0RD",
}Response 200 OK:
{
"id":2,
"email":"lookatme@aa.io",
"username":"navi"
}Response 401:
{
"username":["Username is already in use","Data Required"],
"email":["Email is already in use","Data Required"],
"password":"Data Required",
}Description: Returns an unauthorized JSON when flask-login authentication fails
Response 401:
{
"message":"Unauthorized"
}Description: Grab all products from the database
Response 200 OK:
{
"products":[
{
"id":1,
"name":"Conker's Bad Fur Day",
"description":"Product Description",
"isTraditional":false,
"images":[
{
"id":1,
"imageUrl":""
}
],
"owner":{
"id":1,
"username":"demo",
},
"price":13.99,
"purchased":false,
"tags":[
{
"id":1,
"tag":"Nintendo"
}
],
"timeCreated":"TimeCreated",
"timeUpdated":"TimeUpdated",
}
]
}Description: Grab a single product from the database
Parameters:
:productIdId of the product
Response 200 OK:
{
"product":{
"id":1,
"name":"Conker's Bad Fur Day",
"description":"Product Description",
"isTraditional":false,
"images":[
{
"id":1,
"imageUrl":""
}
],
"owner":{
"id":1,
"username":"demo",
},
"price":13.99,
"purchased":false,
"tags":[
{
"id":1,
"tag":"Nintendo"
}
],
"timeCreated":"TimeCreated",
"timeUpdated":"TimeUpdated",
}
}Response 404:
{
"message":"Product Not Found",
"errors":{
"product":"Product does not exist"
}
}Description: Make a new product in the database
Authentication: Logged In
Request:
{
"name":"Pokemon Emerald",
"description":"Travel throguh the hoenn region to stop team aqua and magma!",
"price":95.99,
"tags":[
"Pokemon",
"Nintendo",
"GameBoy Advance",
],
"isTraditional":false,
"image":"Valid Image File",
}Response 200 OK:
{
"product":{
"id":2,
"name":"Pokemon Emerald",
"description":"Travel throguh the hoenn region to stop team aqua and magma!",
"isTraditional":false,
"images":[
{
"id":2,
"imageUrl":"AWS URL"
}
],
"owner":{
"id":1,
"username":"demo",
},
"price":95.99,
"purchased":false,
"tags":[
{
"id":3,
"tag":"Pokemon",
},
{
"id":4,
"tag":"Nintendo",
},
{
"id":5,
"tag":"GameBoy Advance",
},
],
"timeCreated":"TimeCreated",
"timeUpdated":"TimeUpdated",
}
}Response 400:
{
"message":"Bad Request",
"errors":{
"name":"Data Required",
"description":"Data Required",
"price":"Data Required",
"tags":"Data Required",
"isTraditional":"Data Required",
"image":[
"File is Required",
"Not a valid file type"
],
}
}Description: Update a single product in the database
Authentication: Logged In, Owner of the Product
Parameters:
:productIdId of the product
Request:
{
"name":"Pokemon Emerald 2",
"description":"Travel throguh the hoenn region to stop team aqua and magma!",
"price":97.99,
"tags":[
"Pokemon",
"GameBoy Advance",
],
"isTraditional":false,
"addImage":true,
"deleteImages":true,
"image":"Valid Image File",
}Response 200 OK:
{
"product":{
"id":2,
"name":"Pokemon Emerald 2",
"description":"Travel throguh the hoenn region to stop team aqua and magma!",
"isTraditional":false,
"images":[
{
"id":2,
"imageUrl":"NEW AWS URL"
}
],
"owner":{
"id":1,
"username":"demo",
},
"price":97.99,
"purchased":false,
"tags":[
{
"id":3,
"tag":"Pokemon",
},
{
"id":4,
"tag":"GameBoy Advance",
},
],
"timeCreated":"TimeCreated",
"timeUpdated":"TimeUpdated",
}
}Response 404:
{
"message":"Product Not Found",
"errors":{
"product":"Product does not exist"
}
}Response 400:
{
"message":"Bad Request",
"errors":{
"name":"Data Required",
"description":"Data Required",
"price":"Data Required",
"tags":"Data Required",
"isTraditional":"Data Required",
"addImage":"Data Required",
"deleteImages":"Data Required",
"image":"Not a valid file type",
}
}Response 401 Unauthorized:
{
"message":"Not the owner of the product post"
}Description: Delete a single product from the database
Authentication: Logged In, Owner of the Product
Parameters:
:productIdId of the product
Response 200 OK:
{
"id":1
}Response 404:
{
"message":"Product Not Found",
"errors":{
"product":"Product does not exist"
}
}Response 401 Unauthorized:
{
"message":"Not the owner of the product post"
}Description: Add one photo to a specific product
Authentication: Logged In, Owner of the Product
Parameters:
:productIdId of the product
Request:
{
"image":"Image File"
}Response 200 OK:
{
"product":{
"id":2,
"name":"Pokemon Emerald",
"description":"Travel throguh the hoenn region to stop team aqua and magma!",
"isTraditional":false,
"images":[
{
"id":2,
"imageUrl":"AWS URL"
},
{
"id":3,
"imageUrl":"NEW AWS URL"
}
],
"owner":{
"id":1,
"username":"demo",
},
"price":97.99,
"purchased":false,
"tags":[
{
"id":3,
"tag":"Pokemon",
},
{
"id":4,
"tag":"GameBoy Advance",
},
],
"timeCreated":"TimeCreated",
"timeUpdated":"TimeUpdated",
}
}Response 400:
{
"message":"Bad Request",
"errors":{
"image":[
"File is Required",
"Not a valid file type"
],
}
}Response 404:
{
"message":"Product Not Found",
"errors":{
"product":"Product does not exist"
}
}Response 401 Unauthorized:
{
"message":"Not the owner of the product post"
}Description: Delete a specific image from the database
Authentication: Logged In, Owner of the Product
Parameters:
:imageIdId of the image
Response 200 OK:
{
"product":{
"id":2,
"name":"Pokemon Emerald",
"description":"Travel throguh the hoenn region to stop team aqua and magma!",
"isTraditional":false,
"images":[
{
"id":3,
"imageUrl":"AWS URL"
}
],
"owner":{
"id":1,
"username":"demo",
},
"price":97.99,
"purchased":false,
"tags":[
{
"id":3,
"tag":"Pokemon",
},
{
"id":4,
"tag":"GameBoy Advance",
},
],
"timeCreated":"TimeCreated",
"timeUpdated":"TimeUpdated",
}
}Response 404:
{
"message":"Image could not be found"
}Response 401 Unauthorized:
{
"message":"Must be the owner to perform this action"
}Description: Get all articles in the database Response 200 OK:
{
"articles":[
{
"id":1,
"title":"Article Title",
"body":"Article Body",
"owner":{
"id":1,
"username":"demo",
},
"tags":[
{
"id":1,
"tag":"Nintendo"
}
],
"comments":[
{
"id":1,
"owner":{
"":2,
"username":"marnie",
},
"comment":"comment",
"rating":3,
"timeUpdated":"last created/updated"
}
],
"imageUrl":"Article Image URL",
"timeCreated":"TimeCreated",
"timeUpdated":"TimeUpdated",
}
]
}Description: Get one article in the database
Parameters:
:articleIdId of the article
Response 200 OK:
{
"article":{
"id":1,
"title":"Article Title",
"body":"Article Body",
"owner":{
"id":1,
"username":"demo",
},
"tags":[
{
"id":1,
"tag":"Nintendo"
}
],
"comments":[
{
"id":1,
"owner":{
"id":2,
"username":"marnie",
},
"comment":"comment",
"rating":3,
"timeUpdated":"last created/updated"
}
],
"imageUrl":"Article Image URL",
"timeCreated":"TimeCreated",
"timeUpdated":"TimeUpdated",
}
}Response 404:
{
"message":"Article not found"
}Description: Make a new article in the database
Authentication: Logged In
Request:
{
"title":"This is my article!",
"body":"I wonder what I should write?",
"tags":["Co-Op"],
"image":"IMAGE FILE"
}Response 200 OK:
{
"article":{
"id":2,
"title":"This is my article!",
"body":"I wonder what I should write?",
"owner":{
"id":1,
"username":"demo",
},
"tags":[
{
"id":1,
"tag":"Co-Op"
}
],
"comments":[],
"imageUrl":"NEW AWS URL",
"timeCreated":"TimeCreated",
"timeUpdated":"TimeUpdated",
}
}Response 400:
{
"message":"Bad Request",
"errors":{
"title":"Data Required",
"body":"Data Required",
"tags":"Data Required",
"image":[
"File Required",
"Not a valid file type"
]
}
}Description: Update an article in the database
Authentication: Logged In, Owner of the Article
Parameters:
:articleIdId of the article
Request:
{
"title":"This is my article 2!",
"body":"I wonder what I should write? There are so many options!",
"tags":["Co-Op"],
"changeImage":true,
"image":"IMAGE FILE"
}Response 200 OK:
{
"article":{
"id":2,
"title":"This is my article 2!",
"body":"I wonder what I should write? There are so many options!",
"owner":{
"id":1,
"username":"demo",
},
"tags":[
{
"id":1,
"tag":"Co-Op"
}
],
"comments":[
{
"id":1,
"owner":{
"id":2,
"username":"marnie",
},
"comment":"comment",
"rating":3,
"timeUpdated":"last created/updated"
}
],
"imageUrl":"NEW AWS URL",
"timeCreated":"TimeCreated",
"timeUpdated":"TimeUpdated",
}
}Response 400:
{
"message":"Bad Request",
"errors":{
"title":"Data Required",
"body":"Data Required",
"tags":"Data Required",
"changeImage":"Data Required",
"image":"Not a valid file type"
}
}Response 404:
{
"message":"Article not found"
}Response 401 Unauthorized:
{
"message":"Must be owner of the Article"
}Description: Delete an article in the database
Authentication: Logged In, Owner of the Article
Parameters:
:articleIdId of the article
Response 200 OK:
{
"id":2
}Response 404:
{
"message":"Article not found"
}Response 401 Unauthorized:
{
"message":"Must be owner of the Article"
}Description: Get all transactions that are related to the current user
Response 200 OK:
{
"transactions":[
{
"id":1,
"owner":{
"id":1,
"username":"demo",
},
"status":"pending",
"products":[
{
"id":1
// Product Info
},
{
"id":2
// Product Info
},
{
"id":4
// Product Info
},
]
}
]
}Description: Get one Transaction by the Id
Response 200 OK:
{
"transaction":{
"id":1,
"owner":{
"id":1,
"username":"demo",
},
"status":"pending",
"products":[
{
"id":1
// Product Info
},
{
"id":2
// Product Info
},
{
"id":4
// Product Info
},
]
}
}Reponse 404:
{
"message":"Transaction could not be found"
}Description: Make a purchase and insert a new transaction entry and the corresponding transaction detail entries to the database
Authentication: Login Required
Request:
///MUST BE A STRINGIFIED JSON
{
"products":[
5,6,7,8
]
}Response 200 OK:
{
"id":2,
"owner":{
"id":1,
"username":"demo",
},
"status":"pending",
"products":[
{
"id":5
// Product Info
},
{
"id":6
// Product Info
},
{
"id":7
// Product Info
},
{
"id":8
// Product Info
},
]
}Response 400:
{
"message":"Bad Request",
"errors":{
"products":"Need at least 1 product id"
}
}Description: Edit a transaction to remove products from the order
Authentication: Login Required
Parameters:
:transactionIdid of the Transaction
Request:
///MUST BE A STRINGIFIED JSON
{
"products":[
5,6,8
]
}Response 200 OK:
{
"id":1,
"owner":{
"id":1,
"username":"demo",
},
"status":"pending",
"products":[
{
"id":5
// Product Info
},
{
"id":6
// Product Info
},
{
"id":8
// Product Info
},
]
}Response 400:
{
"message":"Bad Request",
"errors":{
"products":"Need at least 1 product id"
}
}Reponse 404:
{
"message":"Transaction could not be found"
}Response 401 Unauthorized:
{
"message":"Not the owner of this transaction"
}Description: Delete a specific transaction
Authentication: Login Required
Parameters:
:transactionIdid of the Transaction
Response 200 OK:
{
"id":1
}Reponse 404:
{
"message":"Transaction could not be found"
}Response 401 Unauthorized:
{
"message":"Not the owner of this transaction"
}Description: Runs time comparisons to update the shipping status of a all transactions belonging to the current user for the frontend
Authentication: Login Required
Response 200 OK:
{
"verify":"a"
}Description: Get all of the current users reviews
Authentication: Login Required
Response 200 OK:
{
"reviews":[
{
"id":1,
"rating":3,
"review":"An alright game",
"product":{
"id":1,
"name":"Conker's Bad Fur Day"
},
"owner":{
"id":1,
"user":"demo",
}
}
]
}Description: Get a review by the Id
Parameters:
:reviewIdid of the Review
Response 200 OK:
{
"review":{
"id":1,
"rating":3,
"review":"An alright game",
"product":{
"id":1,
"name":"Conker's Bad Fur Day"
},
"owner":{
"id":1,
"user":"demo",
}
}
}Response 404:
{
"message":"Review does not exist"
}Description: Get all of the reviews about a users products
Parameters:
:userIdid of the User
Response 200 OK:
{
"reviews":[
{
"id":1,
"rating":3,
"review":"An alright game",
"product":{
"id":1,
"name":"Conker's Bad Fur Day"
},
"owner":{
"id":1,
"user":"demo",
}
}
]
}Description: Post a new review related to a specific product
Authentication: Login Required
Parameters:
:productIdid of the Product
Response 200 OK:
{
"review":{
"id":1,
"rating":3,
"review":"An alright game",
"product":{
"id":1,
"name":"Pokemon Emerald"
},
"owner":{
"id":1,
"user":"demo",
}
}
}Response 401:
{
"message":"Bad Request",
"errors":{
"review":"Data Required",
"rating":"Data Required",
}
}Description: Update a specific review
Authentication: Login Required
Parameters:
:reviewIdid of the Review
Response 200 OK:
{
"review":{
"id":1,
"rating":4,
"review":"A fantastic game",
"product":{
"id":1,
"name":"Pokemon Emerald"
},
"owner":{
"id":1,
"user":"demo",
}
}
}Response 401:
{
"message":"Bad Request",
"errors":{
"review":"Data Required",
"rating":"Data Required",
}
}Response 404:
{
"message":"Review does not exist"
}Response 401 Unauthorized:
{
"message":"Not the owner of this review"
}Description: Delete a specific review
Authentication: Login Required
Parameters:
:reviewIdid of the Review
Response 200 OK:
{
"id":1
}Response 404:
{
"message":"Review does not exist"
}Response 401 Unauthorized:
{
"message":"Not the owner of this review"
}Description: Get all of the current users comments
Authentication: Login Required
Response 200 OK:
{
"comments":[
{
"id":1,
"rating":3,
"comment":"An alright article",
"article":{
"id":1,
"title":"E3 Highlights",
"body":"line1\nline2",
"imageUrl":"image link"
},
"owner":{
"id":1,
"user":"demo",
}
}
]
}Description: Get a comment by the Id
Parameters:
:reviewIdid of the Review
Response 200 OK:
{
"comment":{
"id":1,
"rating":3,
"comment":"An alright article",
"article":{
"id":1,
"title":"E3 Highlights",
"body":"line1\nline2",
"imageUrl":"image link"
},
"owner":{
"id":1,
"user":"demo",
}
}
}Response 404:
{
"message":"Comment does not exist"
}Description: Get all of the comments beling to a userId
Parameters:
:userIdid of the User
Response 200 OK:
{
"comments":[
{
"id":1,
"rating":3,
"comment":"An alright article",
"article":{
"id":1,
"title":"E3 Highlights",
"body":"line1\nline2",
"imageUrl":"image link"
},
"owner":{
"id":1,
"user":"demo",
}
}
]
}Description: Post a new comment related to a specific article
Authentication: Login Required
Parameters:
:articleIdid of the Product
Response 200 OK:
{
"comment":{
"id":2,
"rating":3,
"comment":"An alright article",
"article":{
"id":1,
"title":"E3 Highlights",
"body":"line1\nline2",
"imageUrl":"image link"
},
"owner":{
"id":2,
"user":"marnie",
}
}
}Response 401:
{
"message":"Bad Request",
"errors":{
"comment":"Data Required",
"rating":"Data Required",
}
}Description: Update a specific comment
Authentication: Login Required
Parameters:
:reviewIdid of the Review
Response 200 OK:
{
"comment":{
"id":2,
"rating":5,
"comment":"A Fantastic article",
"article":{
"id":1,
"title":"E3 Highlights",
"body":"line1\nline2",
"imageUrl":"image link"
},
"owner":{
"id":2,
"user":"marnie",
}
}
}Response 401:
{
"message":"Bad Request",
"errors":{
"comment":"Data Required",
"rating":"Data Required",
}
}Response 404:
{
"message":"Comment does not exist"
}Response 401 Unauthorized:
{
"message":"Not the owner of this comment"
}Description: Delete a specific comment
Authentication: Login Required
Parameters:
:reviewIdid of the Review
Response 200 OK:
{
"id":1
}Response 404:
{
"message":"Comment does not exist"
}Response 401 Unauthorized:
{
"message":"Not the owner of this comment"
}- Clean up detail page styling
- Set a max price ($999,999.99?)
- Add a refresh button to retrieve more products from the backend and update searching on the same request
- Possibly disable for 10 seconds by greying out and displaying number countdown on top of the icon using abolute inside of button or div.