- NodeJS: A cross-platform runtime environment built on Chrome's V8 JavaScript engine used to run JavaScript code on the server. It facilitates dependency management and database communication.
- ExpressJS: A NodeJS web application framework.
{
"username": "agung",
"email": "agung5@gmail.com",
"password": "Ayam123!"
}{
"success": false,
"message": "Username or email already registered"
}{
"success": true,
"message": "success registered"
}{
"email": "agung@gmail.com",
"password": "Ayam1234!"
}{
"status": false,
"error": "No User found"
}{
"status": true,
"message": "login successfully",
"accessToken": "<your_access_token>",
"refreshToken": "<your_refresh_token>",
"expRefreshToken": "2024-12-20T02:33:44.467Z"
}{
"message": "Invalid or expired token"
}Authorization: <your_bearer_token>
{
"journalContent": "<your_content>"
}409 Conflict:
{
"status": false,
"message": "Journal already created today"
}422 Unprocessable Entity:
{
"status": false,
"message": "validation error when create new journal",
"errors": [
"String must contain at least 200 character(s)"
]
}{
"status": true,
"message": "Successfully created journal"
}Authorization: <your_bearer_token>
{
"status": true,
"result": {
"email": "komangweda@gmail.com",
"username": "KomangWeda",
"name": "Mr. Wednesday",
"gender": "male",
"country": "Not Representing",
"urlphoto": "https://storage.googleapis.com/bucket-profile-moodify/profileImage_komangweda@gmail.com_03122024_055647.jpeg"
}
}Authorization: <your_bearer_token>
{
"name": "bagus candra",
"gender": "male",
"country": "USA"
}{
"status": false,
"error_msg": {
"name": [
"String must contain at least 4 character(s)"
]
}
}{
"status": true,
"message": "Success update your profile"
}Authorization: <your_bearer_token>
{
"image": <image_file>
}
Image Size Above 2 MB:
{
"status": false,
"message": "internal server error, Max size of image file must be below 2 MB"
}No Value Provided:
{
"status": false,
"message": "Please provide your photo profile"
}Wrong Format:
{
"status": false,
"message": "internal server error, Only PNG, JPEG, JPG, and WEBP are allowed"
}{
"status": true,
"message": "success upload image",
"imageUrl": "https://storage.googleapis.com/bucket-profile-moodify/profileImage_agung52@gmail.com_13122024_025756.png"
}Authorization: <your_bearer_token>
{
"status": true,
"message": "successfully fetch bookmark article for user with email: komangweda@gmail.com",
"articles": [
{
"id": "03e37921-8d94-4e6c-a584-b33ec4879453",
"source": "Forbes",
"author": "Lance Eliot",
"title": "Generative AI Is Helping To Clear Up Brain Fog",
"description": "People talk about having brain fog. The meaning differs. One creative way to aid diagnosing and resolving brain fog is via generative AI. Here's the inside scoop.",
"url": "https://www.forbes.com/sites/lanceeliot/2024/11/24/generative-ai-is-helping-to-clear-up-brain-fog/",
"urlToImage": "https://imageio.forbes.com/specials-images/imageserve/6742bd86c3e3f33f6f0ec417/0x0.jpg",
"publishedAt": "2024-11-24T05:52:47.000Z",
"content": "Generative AI and large language models (LLMs) are now one of the modern solutions..."
}
]
}Authorization: <your_bearer_token>
date (string, e.g. 2024-12-10)
{
"status": false,
"message": "Journal created that day is not found"
}{
"status": true,
"message": "Journal fetch successfully from database",
"journal": {
"emailAuthor": "komangweda@gmail.com",
"journalId": "9f7fbc3e-be0c-4e0e-bec4-fc21012e88ee",
"content": "Today felt like an emotional rollercoaster...",
"createdAt": "2024-12-11T07:57:25.393Z",
"updatedAt": "2024-12-11T07:57:25.393Z",
"isPredicted": true
}
}Authorization: <your_bearer_token>
Query Parameter: index (integer, e.g., 0, 1, 2, 10)
{
"status": false,
"error": "connect ECONNREFUSED <redis_ip>"
}{
"status": true,
"message": "success get article from DB",
"index": 0,
"totalArticle": 10,
"data": [
{
"bookmarkedCount": 8,
"id": "03e37921-8d94-4e6c-a584-b33ec4879453",
"title": "Generative AI Is Helping To Clear Up Brain Fog",
"description": "People talk about having brain fog. The meaning differs. One creative way to aid diagnosing and resolving brain fog is via generative AI. Here's the inside scoop.",
"url": "https://www.forbes.com/sites/lanceeliot/2024/11/24/generative-ai-is-helping-to-clear-up-brain-fog/",
"urlToImage": "https://imageio.forbes.com/specials-images/imageserve/6742bd86c3e3f33f6f0ec417/0x0.jpg?format=jpg&crop=2882,2160,x664,y0,safe&height=900&width=1600&fit=bounds",
"publishedAt": "2024-11-24T05:52:47.000Z",
"content": "Of the newest paths to try and cope with brain fog, generative AI and large language models (LLMs) ... [+] enter into the realm.\r\ngetty\r\nIn todays column, I explore the dreary and potentially imperil… "
},
{
"bookmarkedCount": 5,
"id": "02ab236c-358c-4d74-aba9-f17a439ad754",
"title": "Generative AI As Your Faithful Guide Toward Manifestation And Achieving Your Dreams And Life Goals",
"description": "A trending topic is manifestation. Here's what it is all about. Plus, the twist is that generative AI can aid in your manifestation pursuits. Pro tips are provided.",
"url": "https://www.forbes.com/sites/lanceeliot/2024/11/25/generative-ai-as-your-faithful-guide-toward-manifestation-and-achieving-your-dreams-and-life-goals/",
"urlToImage": "https://imageio.forbes.com/specials-images/imageserve/6744f29104d97693032485a5/0x0.jpg?format=jpg&crop=3013,2259,x365,y0,safe&height=900&width=1600&fit=bounds",
"publishedAt": "2024-11-26T02:36:56.000Z",
"content": "People are talking about manifestation, which turns out can be aided via the use of modern-day ... [+] generative AI and LLMs.\r\ngetty\r\nIn todays column, I explore the trending topic of manifestation,… "
}
]
}Authorization: <your_bearer_token>
Request Body:
{
"articleId": "02ab236c-358c-4d74-aba9-f17a439ad754"
}{
"status": false,
"message": "Article with id: 03e37921-8d94-4e6c-a584-b33ec4879453a is not found"
}{
"status": true,
"message": "Success bookmarked article with id: 03e37921-8d94-4e6c-a584-b33ec4879453"
}Authorization: <your_bearer_token>
Request Body:
{
"articleId": "02ab236c-358c-4d74-aba9-f17a439ad754"
}{
"status": false,
"error": "can't delete article with id 02ab236c-358c-4d74-aba9-f17a439ad754",
"message": "Article not found in bookmark with email: agung52@gmail.com"
}{
"status": true,
"message": "successfully delete article with id 03e37921-8d94-4e6c-a584-b33ec4879453 from bookmark"
}Authorization: <your_bearer_token>
Cookie: refreshToken=<your_refresh_token>
{
"expiredDate": "2024-11-29T02:52:13.318Z"
}{
"error": true,
"message": "internal server error, token has expired"
}{
"error": false,
"message": "Successfully refreshed token",
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImFndW5nNTJAZ21haWwuY29tIiwiaWF0IjoxNzM0MDY3NjQ3LCJleHAiOjE3MzQxNTQwNDd9.dNE2J0KOAcK3cD33I-rnHqp64iuSD3SpCq9wAhX8gK0",
"expiredDate": "2024-12-20T05:27:27.908Z"
}Authorization: <your_bearer_token>
Query Parameter: date (string, e.g., 2024-12-10)
{
"error": false,
"moods": {
"anger": 8,
"enthusiasm": 51,
"happiness": 33,
"sadness": 8,
"worry": 3
}
}














