tokopedia clone using ReactJS
-
/pages/HomePage.jsx
list of video thumbnail -
/pages/VideoDetail.jsx
detail of video from HomePages.jsx -
/pages/ProfilePage.jsx
profil of user
tokopedia play clone
#Product
- Product object
{
link_product : string,
title : string,
price : number
// video_id : <video_id>
}
Return all products in the system.
- URL Params
None - Data Params
None - Headers
- Success Response
- Code: 200
Content:
{
products : [
{<product_object>},
{<product_object>},
{<product_object>},
]
}
- Error Response:
Code: 500
Content{ message : err.message }
Return the specified user.
- URL Params
Required:id = [integer] - Data Params
None - Headers
- Success Response
- Code: 200
Content:{<product_object>} - Error Response:
Code: 500
Content{ message : err.message }
Create a new product and return the new object.
- URL Params
None - Data Params
{
title : string,
price : number
}
- Headers
Content-Type: ../json - Success Response
- Code: 200
Content:{<product_object>} - Error Response:
Code: 400
Content{ message : err.message }
Update field on the specified product and return the updated object.
- URL Params
Required:id = [integer] - Data Params
{
linkProduct : string,
title : string,
price : number
}
- Headers
Content-Type: ../json - Success Response
- Code: 200
Content:{<product_object>} - Error Response:
Code: 400
Content{ message : err.message }
Delete the specified product.
- URL Params
Required:id = [integer] - Data Params
None - Headers
Content-Type: ../json - Success Response
- Code: 200
Content:{<product_object>} - Error Response:
Code: 400
Content{ message : err.message }
#Video
- Video object
{
url_image : string,
thumbnail : string
}
Return the specified video.
- URL Params
Required:id = [integer] - Data Params
None - Headers
- Success Response
- Code: 200
Content:{<video_object>} - Error Response:
Code: 500
Content{ message : err.message }
#Comment
- Comment object
{
username : string,
comment : string,
timestamp,
// video_id : <video_id>
}
Return the specified comment.
- URL Params
Required:id = [integer] - Data Params
None - Headers
- Success Response
- Code: 200
Content:{<comment_object>} - Error Response:
Code: 500
Content{ message : err.message }
- git clone https://github.com/fairuzazzahra/mid-term
- cd mid-term
- create .env and adjust the environment value
- yarn install
- yarn run
