Sweetwafer is a partial clone of the website 'Sweetwater', an e-commerce site that I like to describe as 'Amazon for musicians'. I've always loved the layout and functionality of this site. It has the right amount of redundancy to make navigation easy and intuitive. The site is visually busy without feeling crowded or messy. The site also sports some impressive css features such as auto-zoom on hover for product page images and more. Hopefully I can get to some of these extras, but 2 weeks can be a tight deadline... Moving past the deadline of the capstone project, I hope to make this clone REALLY shine and occupy it's rightful place as the jewel of my resume!
https://sweetwafer.onrender.com
Feature List | Database Schema | User Stories | Wireframes
- Purpose: This fetch is sent upon initial app load and on subsequent refreshes and navigations. It returns an object representing the current user, if user is logged in.
- Method:
POST
- URL:
/api/auth/
- Successful Response: HTTP Status Code 200
{
'cart': ARRAY_OF_PRODUCT_OBJECTS,
'createdat': STRING,
'email': STRING,
'id': INT,
'updatedat': STRING,
'username': STRING
}
- Error Response: HTTP Status Code 401
{
'errors': 'Unauthorized'
}
- Purpose: This endpoint will be routed to in the case that a protected route does not pass validations for the current user.
- Method
POST
- URL:
/api/auth/unauthorized
- Successful Response: NA
- Error Response: HTTP Status Code 401
{
'errors': 'Unauthorized'
}
- Purpose: This fetch sends the signup form data to the backend to process the creation of a new user.
- Method:
POST
- URL:
/api/auth/signup
- Successful Response: HTTP Status 201
{
'id': INT,
'username': STRING,
'email': STRING,
}
- Error Response: HTTP Status 400
{
'errors': ARRAY_OF_STRINGS
}
- Purpose: This fetch attempts to login a user with the provided credentials.
- Method:
POST
- URL:
/api/auth/login
- Successful Response: HTTP Status 200
{
'id': INT,
'username': STRING,
'email': STRING,
}
- Error Response: HTTP Status 400
{
'errors': ARRAY_OF_STRINGS
}
- Purpose: This fetch will logout the current user.
- Method:
POST
- URL:
/api/auth/logout
- Successful Response: HTTP Status 200
{
'message': 'User logged Out'
}
- Error Response: HTTP Status 404
{
'errors': 'No session'
}
- Purpose: This fetch is sent to add a new item to the cart table.
- Method:
POST
- URL:
/api/cart/add
- Body:
{
'item_id': INT
}
- Successful Response: HTTP Status 201
{
'id': INT,
'category': STRING,
'vendor_name': STRING,
'manufacturer_id': STRING,
'name': STRING,
'model': STRING,
'serial': STRING,
'description': STRING,
'tech_specs': STRING,
'price': FLOAT,
'quantity': INT
}
- Error Response: HTTP Status 404
{
'error': 'Item with given id Not Found'
}
- Purpose: This fetch is sent to update the quantity value of a cart item.
- Method:
PUT
- URL:
/api/cart/quantity
- Body:
{
'id': INT,
'val': INT
}
- Successful Response: HTTP Status 200
{
'id': INT,
'category': STRING,
'vendor_name': STRING,
'manufacturer_id': STRING,
'name': STRING,
'model': STRING,
'serial': STRING,
'description': STRING,
'tech_specs': STRING,
'price': FLOAT,
'quantity': INT
}
- Error Response1: HTTP Status 404
{
'errors': 'Item with given id Not Found'
}
- Error Response2: HTTP Status 400
{
'errors': ARRAY_OF_STRINGS
}
- Purpose: This fetch is sent to delete an item from the cart.
- Method:
DELETE
- URL:
/api/cart/delete/int:id
- Successful Response: HTTP Status 200
{
'message': 'Success'
}
- Error Response: HTTP Status 404
{
'errors': 'Item with given id Not Found'
}
- Purpose: This fetch is sent to delete all items from the cart.
- Method:
DELETE
- URL:
/api/cart/clear/int:id
- Successful Response: HTTP Status 200
{
'message': 'Cart Emptied'
}
- Error Response: HTTP Status 404
{
'errors': 'Cart with given id Not Found'
}
- Purpose: This fetch is sent to retrieve all shipping info records for the user specified by the id.
- Method:
GET
- URL:
/api/shipping/int:user_id
- Successful Response: HTTP Status 200
[
{
apt_number: INT,
city: STRING,
company: STRING,
country: STRING,
primary: BOOLEAN,
shipping_name: STRING,
state: STRING,
street: STRING,
user_id: INT,
zip: STRING
}
]
- Error Response: HTTP Status 404
{
'errors': 'User with given id Not Found'
}
- Purpose: This fetch is sent to add a new entry to the shipping info table.
- Method:
POST
- URL:
/api/shipping/add
- Body:
{
apt_number: INT,
city: STRING,
company: STRING,
country: STRING,
primary: BOOLEAN,
shipping_name: STRING,
state: STRING,
street: STRING,
user_id: INT,
zip: STRING
}
- Success Response: HTTP Status 201
[
{
apt_number: INT,
city: STRING,
company: STRING,
country: STRING,
primary: BOOLEAN,
shipping_name: STRING,
state: STRING,
street: STRING,
user_id: INT,
zip: STRING
}
]
- Error Response1: HTTP Status 400
{
'errors': ARRAY_OF_STRINGS
}
- Error Response2: HTTP Status 404
{
'errors': 'User with given id Not Found'
}
- Purpose: This fetch is sent to update the shipping info record specified by the shipping id.
- Method:
PUT
- URL:
/api/shipping/update/int:shipping_id
- Body:
{
apt_number: INT,
city: STRING,
company: STRING,
country: STRING,
primary: BOOLEAN,
shipping_name: STRING,
state: STRING,
street: STRING,
user_id: INT,
zip: STRING
}
- Successful Response: HTTP Status 200
[
{
apt_number: INT,
city: STRING,
company: STRING,
country: STRING,
primary: BOOLEAN,
shipping_name: STRING,
state: STRING,
street: STRING,
user_id: INT,
zip: STRING
}
]
- Error Response1: HTTP Status 400
{
'errors': ARRAY_OF_STRINGS
}
- Error Response2: HTTP Status 404
{
'errors': 'Shipping Record with given id Not Found'
}
- Purpose: This fetch sends a shipping info id in the body of the request of the record to be deleted.
- Method:
DELETE
- URL:
/api/shipping/delete
- Body:
{
'id': INT
}
- Successful Response: HTTP Status 200
[
{
apt_number: INT,
city: STRING,
company: STRING,
country: STRING,
primary: BOOLEAN,
shipping_name: STRING,
state: STRING,
street: STRING,
user_id: INT,
zip: STRING
}
]
- Error Response: HTTP Status 404
{
'errors': 'Shipping Record with given id Not Found'
}
- Purpose: This fetch is sent to retrieve all billing info records for the user specified by the id.
- Method:
GET
- URL:
/api/billing/int:user_id
- Successful Response: HTTP Status 200
[
{
apt_number: INT,
city: STRING,
company: STRING,
country: STRING,
primary: BOOLEAN,
shipping_name: STRING,
state: STRING,
street: STRING,
user_id: INT,
zip: STRING
}
]
- Error Response: HTTP Status 404
{
'errors': 'User with the given id Not Found'
}
- Purpose: This fetch is sent to add a new entry to the billing info table.
- Method:
POST
- URL:
/api/billing/add
- Body:
{
apt_number: INT,
city: STRING,
company: STRING,
country: STRING,
primary: BOOLEAN,
shipping_name: STRING,
state: STRING,
street: STRING,
user_id: INT,
zip: STRING
}
- Successful Response: HTTP 201
[
{
apt_number: INT,
city: STRING,
company: STRING,
country: STRING,
primary: BOOLEAN,
shipping_name: STRING,
state: STRING,
street: STRING,
user_id: INT,
zip: STRING
}
]
- Error Response1: HTTP Status 400
{
'errors': ARRAY_OF_STRINGS
}
- Error Response2: HTTP Status 404
{
'errors': 'User with given id Not Found'
}
- Purpose: This fetch is sent to update the billing info record specified by the billing id.
- Method:
PUT
- URL:
/api/shipping/update/int:billing_id
- Body:
{
apt_number: INT,
city: STRING,
company: STRING,
country: STRING,
primary: BOOLEAN,
shipping_name: STRING,
state: STRING,
street: STRING,
user_id: INT,
zip: STRING
}
- Successful Response: HTTP Status 200
[
{
apt_number: INT,
city: STRING,
company: STRING,
country: STRING,
primary: BOOLEAN,
shipping_name: STRING,
state: STRING,
street: STRING,
user_id: INT,
zip: STRING
}
]
- Error Response1: HTTP Status 400
{
'errors': ARRAY_OF_STRINGS
}
- Error Response2: HTTP Status 404
{
'errors': 'Billing Record with given id Not Found'
}
- Error Response3: HTTP Status 404
{
'errors': 'User with given id Not Found'
}
- Purpose: This fetch sends a billing info id in the body of the request. Upon successful deletion we return the updated array of user entries.
- Method:
DELETE
- URL:
/api/billing/delete
- Body:
{
'id': INT
}
- Successful Response: HTTP Status 200
[
{
apt_number: INT,
city: STRING,
company: STRING,
country: STRING,
primary: BOOLEAN,
shipping_name: STRING,
state: STRING,
street: STRING,
user_id: INT,
zip: STRING
}
]
- Error Response: HTTP Status 404
{
'errors': 'Billing record with given id Not Found'
}
- Cart
- Shipping Entries
- Billing Accounts
- Reviews (w/AWS image uploads)
- ChatHelpBot (websockets)
- Search Bar
- Sales Professionals
- Payment Accounts (Credit Cards / PayPal)
- Make pixel perfect to target site.