{"id":18742179,"url":"https://github.com/donuts-are-good/noteserver","last_synced_at":"2025-11-20T22:30:16.842Z","repository":{"id":189450493,"uuid":"680692202","full_name":"donuts-are-good/noteserver","owner":"donuts-are-good","description":"backend api for note.rest","archived":false,"fork":false,"pushed_at":"2023-08-20T05:56:14.000Z","size":6,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-14T20:56:36.392Z","etag":null,"topics":["api","go","golang","notes","rest","rest-api"],"latest_commit_sha":null,"homepage":"https://notes.rest","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/donuts-are-good.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-08-20T04:48:45.000Z","updated_at":"2023-10-20T02:34:14.000Z","dependencies_parsed_at":"2023-08-20T06:54:17.652Z","dependency_job_id":"8a5de815-4990-44b1-9da7-c52f36b45459","html_url":"https://github.com/donuts-are-good/noteserver","commit_stats":null,"previous_names":["donuts-are-good/noteserver"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/donuts-are-good%2Fnoteserver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/donuts-are-good%2Fnoteserver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/donuts-are-good%2Fnoteserver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/donuts-are-good%2Fnoteserver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/donuts-are-good","download_url":"https://codeload.github.com/donuts-are-good/noteserver/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239620955,"owners_count":19669795,"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","go","golang","notes","rest","rest-api"],"created_at":"2024-11-07T16:06:49.856Z","updated_at":"2025-11-20T22:30:16.794Z","avatar_url":"https://github.com/donuts-are-good.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"![appserve](https://github.com/donuts-are-good/noteserver/assets/96031819/697ca17c-9e59-4f43-9049-b30d1fe6020a)\n![donuts-are-good's followers](https://img.shields.io/github/followers/donuts-are-good?\u0026color=555\u0026style=for-the-badge\u0026label=followers) ![donuts-are-good's stars](https://img.shields.io/github/stars/donuts-are-good?affiliations=OWNER%2CCOLLABORATOR\u0026color=555\u0026style=for-the-badge) ![donuts-are-good's visitors](https://komarev.com/ghpvc/?username=donuts-are-good\u0026color=555555\u0026style=for-the-badge\u0026label=visitors)\n\n# noteserver\nan http api serving notes. uses sqlite for storage.\n\n## setup\n- acquire dependencies: `go get`\n- compile: `go build`\n## usage\n\nrun the server \n\n```shell\n./noteserver\n```\n\nlistens on :4096.\n\n\n\n## logs\n\nlogging for noteserver is managed through the system's syslog service. each log entry associated with noteserver is tagged with \"notes-app\".\n\n## signals\n\nnoteserver listens for the sigint (interrupt) signal. when this signal is detected, the server begins its shutdown sequence, ensuring any pending operations are completed and the database connections are closed safely.\n## notes\n\nwhen interfacing with the api, particularly the `/sync` endpoint, authentication is managed via a bearer token provided in the request headers. it's expecting a 64 character string, hopefully a sha256 hash. if there's any issue with your request, such as authentication failures or malformed data, refer to the returned http status codes for insight.\n## api\n### /sync\n\n**get**\n- fetch notes.\n- authorization: bearer token header.\n- response: array of note objects.\n```shell\ncurl -H \"Authorization: Bearer YOURTOKEN\" https://note.rest/sync\n```\n**post**\n- add notes.\n- authorization: bearer token header.\n- payload: note objects in json array.\n```shell\ncurl -X POST -H \"Authorization: Bearer YOURTOKEN\" -H \"Content-Type: application/json\" -d '[{\"date\": \"2023-08-18\", \"title\": \"Title\", \"body\": \"Note body\"}]' https://note.rest/sync\n```\n### /health\n\n**get**\n- server status.\n- response: 200 ok if operational.\n```shell\ncurl https://note.rest/health\n```\n## data\n\nsqlite (notes.db) schema:\n\n```sql\n\nCREATE TABLE notes (\n    token TEXT,\n    id INTEGER PRIMARY KEY,\n    date TEXT,\n    title TEXT,\n    body TEXT\n);\n```\n\n\n## license\n\nmit license 2023 donuts-are-good, for more info see license.md\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdonuts-are-good%2Fnoteserver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdonuts-are-good%2Fnoteserver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdonuts-are-good%2Fnoteserver/lists"}