{"id":24905645,"url":"https://github.com/vitatriutami/garuda-api-auth","last_synced_at":"2026-04-18T15:33:01.790Z","repository":{"id":270685529,"uuid":"910999571","full_name":"vitatriutami/garuda-api-auth","owner":"vitatriutami","description":"Backend with Hapi Framework on a Forum App - Deploy on AWS","archived":false,"fork":false,"pushed_at":"2025-01-31T00:52:25.000Z","size":152,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-31T01:27:41.463Z","etag":null,"topics":["aws","backend","hapi","javascript","nginx"],"latest_commit_sha":null,"homepage":"http://wise-dragons-teach-bravely.a276.dcdg.xyz/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vitatriutami.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-02T02:36:53.000Z","updated_at":"2025-01-31T00:52:28.000Z","dependencies_parsed_at":"2025-01-31T01:24:27.570Z","dependency_job_id":"e3320ec1-deb5-46b3-bf1d-c47bdf8b49dc","html_url":"https://github.com/vitatriutami/garuda-api-auth","commit_stats":null,"previous_names":["vitatriutami/garuda-api-auth"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitatriutami%2Fgaruda-api-auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitatriutami%2Fgaruda-api-auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitatriutami%2Fgaruda-api-auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitatriutami%2Fgaruda-api-auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vitatriutami","download_url":"https://codeload.github.com/vitatriutami/garuda-api-auth/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245931756,"owners_count":20695958,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","backend","hapi","javascript","nginx"],"created_at":"2025-02-02T00:23:50.917Z","updated_at":"2026-04-18T15:33:01.758Z","avatar_url":"https://github.com/vitatriutami.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Garuda Forum API\n=========\n\nThis API serves as the backend for a forum application, allowing users to create threads, comment, reply to comments, and like comments. The API uses JWT authentication to secure certain endpoints.\n\nDeployed API Endpoint\n------------\n\nThe API is deployed and accessible at:\nhttps://wise-dragons-teach-bravely.a276.dcdg.xyz/\n\nKey Features\n------------\n\n-   **Threads**: Create and view thread details.\n-   **Comments**: Add and delete comments on threads.\n-   **Replies**: Reply to comments and delete replies.\n-   **Likes**: Like and unlike comments.\n-   **Authentication**: User registration, login, refresh token, and logout.\n\nHow to Access the API\n---------------------\n\n### 1\\. **User Registration**\n\n-   **Endpoint:** `POST /users`\n-   **Description:** Registers a new user.\n-   **Request Body:**\n\n    ```\n    {\n      \"username\": \"user123\",\n      \"password\": \"password123\",\n      \"fullname\": \"User Example\"\n    }\n\n    ```\n\n### 2\\. **Authentication (Login, Refresh Token, Logout)**\n\n-   **Login**\n    -   **Endpoint:** `POST /authentications`\n    -   **Request Body:**\n\n        ```\n        {\n          \"username\": \"user123\",\n          \"password\": \"password123\"\n        }\n\n        ```\n\n-   **Refresh Token**\n    -   **Endpoint:** `PUT /authentications`\n    -   **Request Body:**\n\n        ```\n        {\n          \"refreshToken\": \"your_refresh_token\"\n        }\n\n        ```\n\n-   **Logout**\n    -   **Endpoint:** `DELETE /authentications`\n    -   **Request Body:**\n\n        ```\n        {\n          \"refreshToken\": \"your_refresh_token\"\n        }\n\n        ```\n\n### 3\\. **Threads**\n\n-   **Create a Thread** *(Requires JWT Authentication)*\n    -   **Endpoint:** `POST /threads`\n    -   **Request Body:**\n\n        ```\n        {\n          \"title\": \"Thread Title\",\n          \"body\": \"Thread content.\"\n        }\n\n        ```\n\n-   **View Thread Details**\n    -   **Endpoint:** `GET /threads/{threadId}`\n\n### 4\\. **Comments**\n\n-   **Add a Comment** *(Requires JWT Authentication)*\n    -   **Endpoint:** `POST /threads/{threadId}/comments`\n    -   **Request Body:**\n\n        ```\n        {\n          \"content\": \"My comment.\"\n        }\n\n        ```\n\n-   **Delete a Comment** *(Requires JWT Authentication)*\n    -   **Endpoint:** `DELETE /threads/{threadId}/comments/{commentId}`\n\n### 5\\. **Replies**\n\n-   **Add a Reply** *(Requires JWT Authentication)*\n    -   **Endpoint:** `POST /threads/{threadId}/comments/{commentId}/replies`\n    -   **Request Body:**\n\n        ```\n        {\n          \"content\": \"My reply.\"\n        }\n\n        ```\n\n-   **Delete a Reply** *(Requires JWT Authentication)*\n    -   **Endpoint:** `DELETE /threads/{threadId}/comments/{commentId}/replies/{replyId}`\n\n### 6\\. **Likes**\n\n-   **Like/Unlike a Comment** *(Requires JWT Authentication)*\n    -   **Endpoint:** `PUT /threads/{threadId}/comments/{commentId}/likes`\n\nAuthentication\n--------------\n\nSome endpoints require JWT authentication. Make sure to include the token in the Authorization header:\n\n```\nAuthorization: Bearer your_jwt_token\n\n```\n\nTechnologies Used\n-----------------\n\n-   **Node.js** with **Hapi.js** as the framework\n-   **JWT** for authentication\n-   **PostgreSQL** as the database\n\n* * * * *\n\nThis documentation may be updated as the project evolves. Make sure to use a valid token when accessing protected endpoints.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvitatriutami%2Fgaruda-api-auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvitatriutami%2Fgaruda-api-auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvitatriutami%2Fgaruda-api-auth/lists"}