{"id":23442186,"url":"https://github.com/sealonk/notes-app-back-end","last_synced_at":"2025-04-09T21:48:37.766Z","repository":{"id":261562487,"uuid":"884667591","full_name":"Sealonk/notes-app-back-end","owner":"Sealonk","description":"Backend server for managing notes with CRUD operations built using Hapi.js.","archived":false,"fork":false,"pushed_at":"2024-12-14T06:06:12.000Z","size":27,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-09T21:48:31.970Z","etag":null,"topics":["backend","crud","hapijs","javascript","notes-app","rest-api"],"latest_commit_sha":null,"homepage":"","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/Sealonk.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":"2024-11-07T07:07:21.000Z","updated_at":"2024-12-14T06:06:16.000Z","dependencies_parsed_at":"2024-12-23T17:29:35.783Z","dependency_job_id":"72b5d16e-4922-4a59-a842-cdb0100482a4","html_url":"https://github.com/Sealonk/notes-app-back-end","commit_stats":null,"previous_names":["sealonk/notes-app-back-end"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sealonk%2Fnotes-app-back-end","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sealonk%2Fnotes-app-back-end/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sealonk%2Fnotes-app-back-end/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sealonk%2Fnotes-app-back-end/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Sealonk","download_url":"https://codeload.github.com/Sealonk/notes-app-back-end/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248119403,"owners_count":21050754,"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":["backend","crud","hapijs","javascript","notes-app","rest-api"],"created_at":"2024-12-23T17:28:57.331Z","updated_at":"2025-04-09T21:48:37.748Z","avatar_url":"https://github.com/Sealonk.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Notes App Back-End\n\nThis is a simple back-end application for managing notes. The server is built using Hapi.js and provides a RESTful API with CRUD operations to create, read, update, and delete notes.\n\n## Features\n\n- **Add Notes**: Create a new note with a title, tags, and body.\n- **View All Notes**: Retrieve a list of all notes.\n- **View Note by ID**: Retrieve the details of a specific note by its ID.\n- **Edit Notes**: Update the details of an existing note.\n- **Delete Notes**: Remove a note from the list.\n\n## Technologies Used\n\n- [Hapi.js](https://hapi.dev/): Web framework for building the server.\n- [Node.js](https://nodejs.org/): JavaScript runtime used for server-side development.\n\n## Setup\n\nTo get started with this project locally, follow these steps:\n\n### 1. Clone the repository\n\n```bash\ngit clone https://github.com/Sealonk/notes-app-back-end.git\n```\n\n### 2. Install dependencies\n\n```bash\ncd notes-app-back-end\nnpm install\n```\n\n### 3. Run the appliation\n\nTo start the server,run:\n```bash\nnpm run start\n```\n\nThe server will start running at `http://localhost:5000`.\n\n### 4. Test the API\n\nYou can test the API endpoints using tools like [Postman](https://www.postman.com/) or [curl](https://curl.se/).\n\n## API Endpoints\n\n### `POST /notes`\n\nCreate a new note.\n\n#### Request:\n\n```json\n{\n  \"title\": \"My Note\",\n  \"tags\": [\"personal\", \"important\"],\n  \"body\": \"This is the content of the note.\"\n}\n```\n\n#### Response:\n\n```json\n{\n  \"status\": \"success\",\n  \"message\": \"Catatan berhasil ditambahkan\",\n  \"data\": {\n    \"noteId\": \"unique-note-id\"\n  }\n}\n```\n\n### `GET /notes`\n\nRetrieve all notes.\n\n#### Response:\n\n```json\n{\n  \"status\": \"success\",\n  \"data\": {\n    \"notes\": [\n      {\n        \"id\": \"unique-note-id\",\n        \"title\": \"My Note\",\n        \"tags\": [\"personal\", \"important\"],\n        \"body\": \"This is the content of the note.\",\n        \"createdAt\": \"2024-12-14T12:00:00Z\",\n        \"updatedAt\": \"2024-12-14T12:00:00Z\"\n      }\n    ]\n  }\n}\n```\n\n### `GET /notes/v`\n\nRetrieve a note by its ID.\n\n#### Response:\n\n```json\n{\n  \"status\": \"success\",\n  \"data\": {\n    \"note\": {\n      \"id\": \"unique-note-id\",\n      \"title\": \"My Note\",\n      \"tags\": [\"personal\", \"important\"],\n      \"body\": \"This is the content of the note.\",\n      \"createdAt\": \"2024-12-14T12:00:00Z\",\n      \"updatedAt\": \"2024-12-14T12:00:00Z\"\n    }\n  }\n}\n```\n\n### `PUT /notes/{id}`\n\nUpdate an existing note by its ID.\n\n#### Request:\n\n```json\n{\n  \"title\": \"Updated Note\",\n  \"tags\": [\"work\"],\n  \"body\": \"This is the updated content of the note.\"\n}\n```\n\n#### Response:\n\n```json\n{\n  \"status\": \"success\",\n  \"message\": \"Catatan berhasil diperbarui\"\n}\n```\n\n### `DELETE /notes/{id}`\n\nDelete a note by its ID.\n\n#### Response:\n\n```json\n{\n  \"status\": \"success\",\n  \"message\": \"Catatan berhasil dihapus\"\n}\n```\n\n## Folder Structure\n\n```bash\n- node_modules/\n- src/\n  - handler.js         # Contains all handler functions for the API\n  - notes.js           # Stores the list of notes\n  - routes.js          # Defines API routes and their handlers\n  - server.js          # Initializes and starts the Hapi.js server\n- .gitignore           # Git ignore file\n- eslint.config.mjs    # ESLint configuration file\n- package.json         # Project metadata and dependencies\n- package-lock.json    # Lock file for npm dependencies\n- README.md            # Project documentation\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsealonk%2Fnotes-app-back-end","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsealonk%2Fnotes-app-back-end","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsealonk%2Fnotes-app-back-end/lists"}