{"id":28546259,"url":"https://github.com/egeuysall/notes-api","last_synced_at":"2026-03-08T06:33:12.968Z","repository":{"id":296920538,"uuid":"994986773","full_name":"egeuysall/notes-api","owner":"egeuysall","description":"Create. Organize. Share.","archived":false,"fork":false,"pushed_at":"2025-06-20T16:57:24.000Z","size":41403,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-07-07T05:39:08.718Z","etag":null,"topics":["api","dev","full-stack","golang","nextjs","notes","project","typescript"],"latest_commit_sha":null,"homepage":"https://notes.egeuysal.com","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/egeuysall.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-02T19:42:32.000Z","updated_at":"2025-07-04T09:24:32.000Z","dependencies_parsed_at":"2025-06-08T01:15:37.012Z","dependency_job_id":null,"html_url":"https://github.com/egeuysall/notes-api","commit_stats":null,"previous_names":["egeuysall/notes-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/egeuysall/notes-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egeuysall%2Fnotes-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egeuysall%2Fnotes-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egeuysall%2Fnotes-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egeuysall%2Fnotes-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/egeuysall","download_url":"https://codeload.github.com/egeuysall/notes-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egeuysall%2Fnotes-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30247378,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-08T05:41:50.788Z","status":"ssl_error","status_checked_at":"2026-03-08T05:41:39.075Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","dev","full-stack","golang","nextjs","notes","project","typescript"],"created_at":"2025-06-09T23:09:21.583Z","updated_at":"2026-03-08T06:33:12.950Z","avatar_url":"https://github.com/egeuysall.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🧠 Go Backend Practice – Day 1\n\n**Goal:** Build a minimal REST API with chi to lock in routing, JSON decoding, and error handling — all from memory.\n\n**To install, use:**\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/egeuysall/notes-api/master/install.sh | sh\n```\n\n---\n\n## ✅ Mini Project: Notes API (In-Memory)\n\n| Method | Route        | Description                             |\n| ------ | ------------ | --------------------------------------- |\n| GET    | `/ping`      | Returns `{ \"message\": \"pong\" }`         |\n| POST   | `/note`      | Accepts `{ \"text\": \"...\" }`, returns ID |\n| GET    | `/note/{id}` | Returns note by ID or 404               |\n\n- Use: `chi`, `json.NewDecoder`, `json.NewEncoder`, `http.Error`, `chi.URLParam`\n- Store data in: `map[string]string`\n- Generate random ID (e.g. `6-char` string)\n\n---\n\n## ⏱️ Schedule (3 Hours)\n\n### 🕒 Hour 1: Recall Drill – No Copying\n\n- [x] Write `main.go` with `chi.NewRouter`\n- [x] Create `GET /ping` route\n- [x] Respond with JSON manually: `json.NewEncoder(w).Encode(...)`\n- [x] Set correct headers/status codes\n\n### 🕒 Hour 2: Build Note API\n\n- [x] Add `POST /note`\n  - [x] Decode JSON body into struct\n  - [x] Generate random ID\n  - [x] Store in map\n  - [x] Respond with ID in JSON\n- [x] Add `GET /note/{id}`\n  - [x] Get param with `chi.URLParam`\n  - [x] Lookup in map, return value or 404\n- [x] Add `DELETE /note/{id}`\n  - [x] Get param with `chi.URLParam`\n  - [x] Check if note exists\n  - [x] Delete from map\n  - [x] Return 204 No Content\n\n### 🕒 Hour 3: Review \u0026 Refactor\n\n- [x] Build the Notes CLI\n  - [x] Flags package\n  - [x] error handling\n- [x] Publish via Goreleaser\n  - [x] Configure Goreleaser\n\n### 🕒 Hour 3: Review \u0026 Refactor\n\n- [x] Clean up code structure (handlers, error messages)\n- [x] Write a reflection note in Obsidian:\n  - What did I remember easily?\n  - What did I forget?\n  - Any confusing areas?\n- [x] Save code to `~/go-snippets/notes-api`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fegeuysall%2Fnotes-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fegeuysall%2Fnotes-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fegeuysall%2Fnotes-api/lists"}