For the backend API, we use express js to make the endpoint. We try to make endpoint that deployed on the app engine. The configuration for the app engine are on the app.yaml. When the android hit the predict endpoint, the predict images are store in the cloud storage bucket. Also, for the articles image are on the cloud storage. For the database, we use mongoDB cloud to store the NoSQL database like the user, history user, and articles collection.
- Method: POST
- Url: /api/v1/auth/signin
{
"email": "string",
"password": "string"
}
- Method: POST
- Url: /api/v1/auth/signup
{
"name": "string",
"email": "string",
"password": "string"
}
- Method: POST
- Url: /api/v1/predict
- Header: Bearer token
- Body:
multipart/form-data
- Method: GET
- Url: /api/v1/users/profile
- Header: Bearer token
{
"error": "boolean",
"message": "string",
"data": [
{
"name":"string",
"email": "string",
"password": "string",
"imageUrl": "string",
"createdAt": "string",
}
]
}
- Method: GET
- Url: /api/v1/users/profile/images
- Header: Bearer token
{
"error": "boolean",
"message": "string",
"data": [
{
"userId":"string",
"email": "string",
"imageUrl": "string",
"createdAt": "string",
}
]
}
- Method: GET
- Url: /api/v1/users/history
- Header: Bearer token
{
"error": "boolean",
"message": "string",
"data": [
{
"userId":"string",
"email": "string",
"imageUrl": "string",
"articleName": "string",
"predictRate": "string",
"createdAt": "string",
}
]
}
- Method: GET
- Url: /api/v1/articles/upload
- Header: Bearer token
{
"error": "boolean",
"message": "string",
"data": [
{
"url": "string",
"name": "string",
}
]
}
- Method: GET
- Url: /api/v1/articles
- Header: Bearer token
{
"error": "boolean",
"message": "string",
"data": [
{
"imageUrl": "string",
"name": "string",
"latinName": "string",
"family": "string",
"description": "string",
"ingredient": "string",
"efficacy": ["string"],
"onlineShop": "string",
}
]
}