{"id":20765671,"url":"https://github.com/boratanrikulu/noisy-notes","last_synced_at":"2025-05-11T08:33:59.011Z","repository":{"id":129411132,"uuid":"265285078","full_name":"boratanrikulu/noisy-notes","owner":"boratanrikulu","description":"Keep your notes as a noise.","archived":false,"fork":false,"pushed_at":"2020-06-08T15:21:04.000Z","size":187,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2025-04-30T10:03:37.248Z","etag":null,"topics":["api","golang","google-speech-to-text","notes","recognition"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/boratanrikulu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2020-05-19T15:23:13.000Z","updated_at":"2024-08-21T08:19:32.000Z","dependencies_parsed_at":"2023-07-24T04:30:45.347Z","dependency_job_id":null,"html_url":"https://github.com/boratanrikulu/noisy-notes","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boratanrikulu%2Fnoisy-notes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boratanrikulu%2Fnoisy-notes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boratanrikulu%2Fnoisy-notes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boratanrikulu%2Fnoisy-notes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/boratanrikulu","download_url":"https://codeload.github.com/boratanrikulu/noisy-notes/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253540461,"owners_count":21924522,"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":["api","golang","google-speech-to-text","notes","recognition"],"created_at":"2024-11-17T11:18:18.700Z","updated_at":"2025-05-11T08:33:58.678Z","avatar_url":"https://github.com/boratanrikulu.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\t\u003cimg src=\"logo.png\" alt=\"Noisy Notes\"\u003e\n\u003c/p\u003e\n\n#\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/boratanrikulu/noisy-notes)](https://goreportcard.com/report/github.com/boratanrikulu/noisy-notes)\n\nNoisy Notes lets you **keep your notes with noise.**\n\nEach sent noise is converted to text by using google's speech-to-text api.  \nIn this way, you'll be able to search in noises.\n\nFor example, you have 100 noisy notes.  \nAnd, you want to **find the noisy notes that includes speech** \"Rabbit is cute\".  \nNoisy Notes gives you this ability.\n\n\u003e **Note:** This project only keeps the API.  \n [**Click**](https://github.com/batin/NoisyNotes) to see the frontend repo.\n\n## TODOs\n\n\u003e **This project do not have any release yet.**  \n**It is havily under development.**\n\n- [x] Noise recognition.\n- [x] Session create and delete endpoints.\n- [x] CRUD for the noise.\n- [x] Make a queue structure for recognition.\n- [x] Add tag option for noises.\n- [x] Search endpoint.\n- [ ] Tags endpoint that is returned noises for user's tag.\n\n## API Endpoints\n\n- [**Signup**](#signup)\n- [**Login**](#login)\n- User\n\t- [**Me**](#me)\n\t- [**Create Noise**](#create-noise)\n\t- [**Get Noises**](#get-noises)\n\t- [**Get Noise**](#get-noise)\n\t- [**Get Noise's File**](#get-noises-file)\n    - [**Update Noise**](#update-noise)\n    - [**Delete Noise**](#delete-noise)\n\t- [**Logout**](#logout)\n\n## Signup\n\n\u003e Creates an user account.\n\n**URL:** /signup\n\n**Request:**\n\n- Type: **POST**\n- Body: \n\t- Form Data :\n\t\t- username  \n        \u003e `must`  \n        `at least 2 characters`\n\t\t- password  \n        \u003e `must`  \n        `at least 8 characters`\n\t\t- name  \n        \u003e `must`  \n\t\t- surname  \n        \u003e `must`  \n\n**Response:**\n\n- Type: **403**\n\t- That means the inputs are not valid.\n- Type: **202**\n\t- That means the user is created.\n\t- Includes the created user.\n\n**Example:**\n\nRequest:\n\n```bash\ncurl --location --request POST 'localhost:3000/signup' \\\n\t--form 'username=testing-user' \\\n\t--form 'password=testing-pass' \\\n\t--form 'name=Test' \\\n\t--form 'surname=Account'\n```\n\nResponse:\n\n```json\n{\n    \"Message\": \"Account is created.\",\n    \"User\": {\n        \"ID\": 15,\n        \"CreatedAt\": \"2020-06-02T16:39:21.182619391+03:00\",\n        \"UpdatedAt\": \"2020-06-02T16:39:21.182619391+03:00\",\n        \"DeletedAt\": null,\n        \"Name\": \"Test\",\n        \"Surname\": \"Account\",\n        \"Username\": \"testing-user\",\n        \"Noises\": null,\n        \"Tags\": null\n    }\n}\n```\n\n## Login\n\n\u003e Creates a session for the user.\n\n**URL:** /login\n\n**Request:**\n\n- Type: **POST**\n- Body: \n\t- Form Data :\n\t\t- username  \n        \u003e `must`  \n\t\t- password  \n        \u003e `must`  \n\n**Response:**\n\n- Type: **401**\n\t- That means the login info is wrong.\n- Type: **403**\n\t- That means the inputs are not valid.\n- Type: **202**\n\t- That means the session is created.\n\t- Includes the token value.\n\n**Example:**\n\nRequest:\n\n```bash\ncurl --location --request POST 'localhost:3000/login' \\\n\t--form 'username=testing-user' \\\n\t--form 'password=testing-pass'\n```\n\nResponse:\n\n```json\n{\n    \"Token\": \"2ec69760-ef38-4a47-af5c-0ef1a7e6ecf1\",\n    \"TokenType\": \"Bearer\",\n    \"ExpiresIn\": 3600\n}\n```\n\n## Me\n\n\u003e Returns the current user.\n\n**URL:** /user/me\n\n**Request:**\n\n- Type: **GET**\n- Header: \n\t- Authorization: **Bearer** Token  \n    \u003e `must`  \n\n**Response:**\n\n- Type: **401**\n\t- That means the token is not valid.\n- Type: **200**\n\t- That means the login is okay.\n\t- Includes the current user.\n\n**Example:**\n\nRequest:\n\n```bash\ncurl --location --request GET 'localhost:3000/user/me' \\\n\t--header 'Authorization: Bearer 2ec69760-ef38-4a47-af5c-0ef1a7e6ecf1'\n```\n\nResponse:\n\n```json\n{\n    \"ID\": 15,\n    \"CreatedAt\": \"2020-06-02T16:39:21.182619+03:00\",\n    \"UpdatedAt\": \"2020-06-02T16:39:21.182619+03:00\",\n    \"DeletedAt\": null,\n    \"Name\": \"Test\",\n    \"Surname\": \"Account\",\n    \"Username\": \"testing-user\",\n    \"Noises\": null,\n    \"Tags\": null\n}\n```\n\n## Create Noise\n\n\u003e Creates a noise.  \nRecognition is run in a queue. \n\n\u003eSo,  \nIt will be inactive firstly.  \nWhen recognition is done, the noise will be activated.\n\n**URL:** /user/noises\n\n**Request:**\n\n- Type: **POST**\n- Header: \n\t- Authorization: **Bearer** Token  \n    \u003e `must` \n- Body:\n\t- Form Data :\n\t\t- title  \n        \u003e `must` \n\t\t- file  \n        \u003e `must`  \n        \u003e Audio format may be one of them;  \n        `audio/mpeg`, `audio/mp3`, `audio/ogg`, `audio/wav`, `audio/flac`, `audio/aac`\n\t\t- tags\n        \u003e `not must`  \n        example: `Tag 1, Tag 2, Tag3`\n\n**Response:**\n\n- Type: **401**\n\t- That means the token is not valid.\n- Type: **403**\n\t- That means input are not valid.\n- Type: **202**\n\t- That means the noisy note was created.\n\t- Includes the noisy notes.\n\n**Example:**\n\nRequest:\n\n```bash\ncurl --location --request POST 'localhost:3000/user/noises' \\\n\t--header 'Authorization: Bearer 2ec69760-ef38-4a47-af5c-0ef1a7e6ecf1' \\\n\t--form 'title=First noise note' \\\n\t--form 'tags=Tag 1, Tag 2, Tag 3' \\\n\t--form 'file=@/path/to/audio_test.mp3'\n```\n\nResponse:\n\n```json\n{\n    \"ID\": 51,\n    \"CreatedAt\": \"2020-06-02T16:53:00.500487332+03:00\",\n    \"UpdatedAt\": \"2020-06-02T16:53:00.500487332+03:00\",\n    \"DeletedAt\": null,\n    \"Title\": \"First noise note\",\n    \"Tags\": [\n        {\n            \"ID\": 1,\n            \"CreatedAt\": \"2020-06-04T01:55:19.545495012+03:00\",\n            \"UpdatedAt\": \"2020-06-04T01:55:19.561174344+03:00\",\n            \"DeletedAt\": null,\n            \"Title\": \"Tag 1\"\n        },\n        {\n            \"ID\": 2,\n            \"CreatedAt\": \"2020-06-04T01:55:19.55087435+03:00\",\n            \"UpdatedAt\": \"2020-06-04T01:55:19.562559461+03:00\",\n            \"DeletedAt\": null,\n            \"Title\": \"Tag 2\"\n        },\n        {\n            \"ID\": 3,\n            \"CreatedAt\": \"2020-06-04T01:55:19.556297971+03:00\",\n            \"UpdatedAt\": \"2020-06-04T01:55:19.563764474+03:00\",\n            \"DeletedAt\": null,\n            \"Title\": \"Tag 3\"\n        }\n    ],\n    \"Text\": \"\",\n    \"IsActive\": false\n}\n```\n\n## Get Noises\n\n\u003e Returns all noises as noise array.\n\n**URL:** /user/noises\n\n**Request:**\n\n- Type: **GET**\n- Header: \n\t- Authorization: **Bearer** Token  \n    \u003e `must` \n- Params:\n    - q\n    \u003e `not must`  \n    \u003e to search,  \n    it checks `noises' titles`, `noises' texts` and `tags' titles`\n    - take\n    \u003e `not must`  \n    \u003e to limit size to take,  \n    default: `-1`\n    - sort\n    \u003e `not must`  \n    \u003e to sort by updated_at, only allowed: `asc`, `desc`.  \n    default: `desc`\n\n**Response:**\n\n- Type: **401**\n\t- That means the token is not valid.\n- Type: **200**\n\t- That means the noises were listed.\n\t- Includes a noise array.\n\n**Example:**\n\nRequest:\n\n```bash\ncurl --location --request GET 'localhost:3000/user/noises' \\\n    --header 'Authorization: Bearer 2ec69760-ef38-4a47-af5c-0ef1a7e6ecf1' \\\n    --form 'q=tavşan' \\\n    --form 'sort=asc' \\\n    --form 'take=2'\n```\n\nResponse:\n\n```json\n[\n    {\n        \"ID\": 51,\n        \"CreatedAt\": \"2020-06-02T16:53:00.500487+03:00\",\n        \"UpdatedAt\": \"2020-06-02T16:53:02.703716+03:00\",\n        \"DeletedAt\": null,\n        \"Title\": \"First noise note\",\n        \"Tags\": [\n            {\n                \"ID\": 1,\n                \"CreatedAt\": \"2020-06-04T01:55:19.545495012+03:00\",\n                \"UpdatedAt\": \"2020-06-04T01:55:19.561174344+03:00\",\n                \"DeletedAt\": null,\n                \"Title\": \"Tag 1\"\n            },\n            {\n                \"ID\": 2,\n                \"CreatedAt\": \"2020-06-04T01:55:19.55087435+03:00\",\n                \"UpdatedAt\": \"2020-06-04T01:55:19.562559461+03:00\",\n                \"DeletedAt\": null,\n                \"Title\": \"Tag 2\"\n            },\n            {\n                \"ID\": 3,\n                \"CreatedAt\": \"2020-06-04T01:55:19.556297971+03:00\",\n                \"UpdatedAt\": \"2020-06-04T01:55:19.563764474+03:00\",\n                \"DeletedAt\": null,\n                \"Title\": \"Tag 3\"\n            }\n        ],\n        \"Text\": \"Tavşan ile kuşun macerası\",\n        \"IsActive\": true\n    },\n    {\n        \"ID\": 52,\n        \"CreatedAt\": \"2020-06-02T16:59:00.500487+03:00\",\n        \"UpdatedAt\": \"2020-06-02T16:59:02.703716+03:00\",\n        \"DeletedAt\": null,\n        \"Title\": \"Second noise note\",\n        \"Tags\": [\n            {\n                \"ID\": 1,\n                \"CreatedAt\": \"2020-06-04T01:55:19.545495012+03:00\",\n                \"UpdatedAt\": \"2020-06-04T01:55:19.561174344+03:00\",\n                \"DeletedAt\": null,\n                \"Title\": \"Tag 1\"\n            },\n        ],\n        \"Text\": \"Tavşan tatlıdır\",\n        \"IsActive\": true\n    }\n]\n```\n\n## Get Noise\n\n\u003e Return a specific noise. \n\n**URL:** /user/noises/{id}\n\n**Request:**\n\n- Type: **GET**\n- Header: \n\t- Authorization: **Bearer** Token  \n    \u003e `must` \n- Path:\n\t- ID\n\n**Response:**\n\n- Type: **401**\n\t- That means the token is not valid.\n- Type: **403**\n\t- That means record was not found.\n- Type: **200**\n\t- That means the noise were listed.\n\t- Includes a noise array.\n\n**Example:**\n\nRequest:\n\n```bash\ncurl --location --request GET 'localhost:3000/user/noises/51' \\\n\t--header 'Authorization: Bearer 2ec69760-ef38-4a47-af5c-0ef1a7e6ecf1'\n```\n\nResponse:\n\n```json\n{\n    \"ID\": 51,\n    \"CreatedAt\": \"2020-06-02T16:53:00.500487+03:00\",\n    \"UpdatedAt\": \"2020-06-02T16:53:02.703716+03:00\",\n    \"DeletedAt\": null,\n    \"Title\": \"First noise note\",\n    \"Tags\": [\n        {\n            \"ID\": 1,\n            \"CreatedAt\": \"2020-06-04T01:55:19.545495012+03:00\",\n            \"UpdatedAt\": \"2020-06-04T01:55:19.561174344+03:00\",\n            \"DeletedAt\": null,\n            \"Title\": \"Tag 1\"\n        },\n        {\n            \"ID\": 2,\n            \"CreatedAt\": \"2020-06-04T01:55:19.55087435+03:00\",\n            \"UpdatedAt\": \"2020-06-04T01:55:19.562559461+03:00\",\n            \"DeletedAt\": null,\n            \"Title\": \"Tag 2\"\n        },\n        {\n            \"ID\": 3,\n            \"CreatedAt\": \"2020-06-04T01:55:19.556297971+03:00\",\n            \"UpdatedAt\": \"2020-06-04T01:55:19.563764474+03:00\",\n            \"DeletedAt\": null,\n            \"Title\": \"Tag 3\"\n        }\n    ],\n    \"Text\": \"Tavşan ile kuşun macerası\",\n    \"IsActive\": true\n}\n```\n\n## Get Noise's File\n\n\u003e Returns noise's file as audio/mpeg format.\n\n**URL:** /user/noises/{id}/file\n\n**Request:**\n\n- Type: **GET**\n- Header: \n\t- Authorization: **Bearer** Token  \n    \u003e `must` \n- Path:\n\t- ID\n\n**Response:**\n\n- Type: **401**\n\t- That means the token is not valid.\n- Type: **403**\n\t- That means record was not found.\n- Type: **200**\n\t- That means the noise were listed.\n\t- Includes a noise array.\n\n**Example:**\n\nRequest:\n\n```bash\ncurl --location --request GET 'localhost:3000/user/noises/51/file' \\\n\t--header 'Authorization: Bearer 2ec69760-ef38-4a47-af5c-0ef1a7e6ecf1'\n```\n\nResponse:\n\n```json\nfile\n```\n\n## Update Noise\n\n\u003e Updates the noise.\n\u003e It works just like [creating](#create-noise)\n\n\u003e Recognition with the file will be work on a queue,  \nSo,  \nIt will be inactive firstly.  \nWhen recognition is done, the noise will be activated.\n\n**URL:** /user/noises/{id}\n\n**Request:**\n\n- Type: **PUT**\n- Header: \n    - Authorization: **Bearer** Token  \n    \u003e `must` \n- Path:\n    - ID\n- Body:\n    - Form Data :\n        - title  \n        \u003e `must` \n        - file  \n        \u003e `must`  \n        \u003e Audio format may be one of them;  \n        `audio/mpeg`, `audio/mp3`, `audio/ogg`, `audio/wav`, `audio/flac`, `audio/aac`\n        - tags\n        \u003e `not must`  \n        example: `Tag 1, Tag 2, Tag3`\n\n**Response:**\n\n- Type: **401**\n    - That means the token is not valid.\n- Type: **403**\n    - That means input are not valid.\n- Type: **202**\n    - That means the noisy note was updated.\n    - Includes the new noisy notes.\n\n**Example:**\n\nRequest:\n\n```bash\ncurl --location --request PUT 'localhost:3000/user/noises' \\\n    --header 'Authorization: Bearer 2ec69760-ef38-4a47-af5c-0ef1a7e6ecf1' \\\n    --form 'title=A new title' \\\n    --form 'tags=Tag 4' \\\n    --form 'file=@/path/to/audio_test.mp3'\n```\n\nResponse:\n\n```json\n{\n    \"ID\": 51,\n    \"CreatedAt\": \"2020-06-02T16:53:00.500487332+03:00\",\n    \"UpdatedAt\": \"2020-06-03T20:53:00.500487332+03:00\",\n    \"DeletedAt\": null,\n    \"Title\": \"A new title\",\n    \"Tags\": [\n        {\n            \"ID\": 4,\n            \"CreatedAt\": \"2020-06-03T20:53:0.556297971+03:00\",\n            \"UpdatedAt\": \"2020-06-03T20:53:0.563764474+03:00\",\n            \"DeletedAt\": null,\n            \"Title\": \"Tag 4\"\n        }\n    ],\n    \"Text\": \"Tavşan ile kuşun macerası\",\n    \"IsActive\": false\n}\n```\n\n## Delete Noise\n\n\u003e Deletes the noise. \n\n**URL:** /user/noises/{id}\n\n**Request:**\n\n- Type: **DELETE**\n- Header: \n    - Authorization: **Bearer** Token  \n    \u003e `must` \n- Path:\n    - ID\n\n**Response:**\n\n- Type: **401**\n    - That means the token is not valid.\n- Type: **403**\n    - That means record was not found.\n- Type: **200**\n    - That means the noise were deleted.\n\n**Example:**\n\nRequest:\n\n```bash\ncurl --location --request DELETE 'localhost:3000/user/noises/51' \\\n    --header 'Authorization: Bearer 2ec69760-ef38-4a47-af5c-0ef1a7e6ecf1'\n```\n\nResponse:\n\n```json\n{\n    \"Message\": \"The noise is deleted.\"\n}\n```\n\n## Logout\n\n\u003e Removes the current user's session.\n\n**URL:** /user/logout\n\n**Request:**\n\n- Type: **POST**\n- Header: \n\t- Authorization: **Bearer** Token  \n    \u003e `must` \n\n**Response:**\n\n- Type: **401**\n\t- That means the token is not valid.\n- Type: **202**\n\t- That means the session were removed.\n\n**Example:**\n\nRequest:\n\n```sh\ncurl --location --request POST 'localhost:3000/user/logout' \\\n    --header 'Authorization: Bearer 2ec69760-ef38-4a47-af5c-0ef1a7e6ecf1'\n```\n\nResponse:\n\n```json\n{\n    \"Message\": \"Sessions is removed.\"\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboratanrikulu%2Fnoisy-notes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fboratanrikulu%2Fnoisy-notes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboratanrikulu%2Fnoisy-notes/lists"}