{"id":21121504,"url":"https://github.com/beerush-id/honor","last_synced_at":"2026-01-28T01:35:03.233Z","repository":{"id":237044830,"uuid":"793691359","full_name":"beerush-id/honor","owner":"beerush-id","description":"Your REST API Copilot, Live in the Edge","archived":false,"fork":false,"pushed_at":"2024-06-17T06:42:47.000Z","size":82,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-15T01:49:01.303Z","etag":null,"topics":["copilot","hono","javascript","rest-api","serverless-framework","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/beerush-id.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-04-29T17:29:46.000Z","updated_at":"2024-06-17T06:42:50.000Z","dependencies_parsed_at":"2024-04-29T18:52:43.844Z","dependency_job_id":"9b80bf2d-32be-4e6c-bf9a-cdd8509a67a6","html_url":"https://github.com/beerush-id/honor","commit_stats":null,"previous_names":["beerush-id/honor"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/beerush-id/honor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beerush-id%2Fhonor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beerush-id%2Fhonor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beerush-id%2Fhonor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beerush-id%2Fhonor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/beerush-id","download_url":"https://codeload.github.com/beerush-id/honor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beerush-id%2Fhonor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28831755,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T23:29:49.665Z","status":"ssl_error","status_checked_at":"2026-01-27T23:25:58.379Z","response_time":168,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["copilot","hono","javascript","rest-api","serverless-framework","typescript"],"created_at":"2024-11-20T03:50:56.572Z","updated_at":"2026-01-28T01:35:03.217Z","avatar_url":"https://github.com/beerush-id.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @beerush/honor\n\nHonor is a REST API framework built on top of Hono.\n\n\u003e This project is still in early development.\n\n## 🏠 Getting Started\n\nTo start using Honor quickly, you can clone the starter package:\n\n```bash\ngit clone git@github.com:beerush-id/honor-starter.git\n```\n\nInstall dependencies:\n\n```bash\nbun install\n```\n\nor\n\n```bass\nnpm install\n```\n\nor\n\n```bash\nyarn install\n```\n\nTo run:\n\n```bash\nbun dev\n```\n\n## ⛩️ Features\n\n- File based routing inspired by SvelteKit.\n- Handle REST routing by exporting config.\n- Handle routing by exporting a function.\n- REST API, Documentation, and Client routing.\n- Middleware support.\n\n## 📚 Documentation\n\n### CRUD Routing\n\nCreating a REST API is easy with Honor. You can create a REST API by exporting a config object.\n\n```typescript\n// src/routes/posts/+server.ts\nimport type { Endpoint } from '@beerush/honor/supabase';\nimport { z } from '@beerush/honor';\n\nconst schema = z.object({\n  id: z.string().uuid(),\n  title: z.string(),\n  content: z.string(),\n});\n\nexport default ({\n  name: 'post',\n  table: 'Posts',\n  schema,\n}) satisfies Endpoint;\n```\n\nAfter creating the config object, you can access the REST API at:\n\n- `GET /api/posts`\n- `POST /api/posts`\n- `GET /api/posts/:id`\n- `PUT /api/posts/:id`\n- `PATCH /api/posts/:id`\n- `DELETE /api/posts/:id`\n\n### Single Routing.\n\nYou can also create a custom routing by exporting a function as default.\n\n```typescript\n// src/routes/+server.ts\nimport type { ReadHandler } from '@beerush/honor';\n\nexport default (async () =\u003e {\n  return {\n    status: 'Ok',\n  };\n}) satisfies ReadHandler;\n\n```\n\nTo handle non GET request, you can use the `method` property.\n\n```typescript\n// src/routes/+server.ts\nimport type { WriteHandler } from '@beerush/honor';\n\nexport const POST = (async (c) =\u003e {\n  return {\n    id: crypto.randomUUID(),\n    ...c.body,\n  };\n}) satisfies WriteHandler;\n\n```\n\nAfter creating the above functions, you can access the custom API at:\n\n- `GET /api`\n- `POST /api`\n\n### Documentations.\n\nBy default, Honor will generate a documentation for your API. You can access the documentation at `/docs`.\n\nTo add documentation details for your API, you can add `+server.mdx` file.\n\n```mdx\n// src/routes/+server.mdx\n# My API Documentation\n```\n\n### Client Routing\n\nYou can also create a client routing by exporting a function as default using JSX, or simply MDX.\n\n```tsx\n// src/routes/+page.tsx\nexport default () =\u003e (\n  \u003cdiv\u003e\n    \u003ch1\u003eHello, World! \u003c /h1\u003e\n  \u003c /div\u003e\n);\n```\n\n```mdx\n// src/routes/+page.mdx\n# Hello, World!\n```\n\n### Client Layout\n\nYou can also create a client layout by exporting a function as default using JSX.\n\n```tsx\n// src/routes/+layout.tsx\nexport default ({ children }) =\u003e (\n  \u003cdiv\u003e\n    \u003cheader\u003e\n      \u003ch1\u003eMy Blog\u003c/h1\u003e\n    \u003c/header\u003e\n    \u003cmain\u003e\n      { children }\n    \u003c/main\u003e\n  \u003c/div\u003e\n);\n```\n\nVisit the page at `/`, you will see the content of the page.\n\n## 👏 Credits\n\n- This project was created using `bun init` in bun v1.1.4. [Bun](https://bun.sh) is a fast all-in-one JavaScript\n  runtime.\n- This project is built on top of [Hono](https://hono.dev).\n- Inspired by [SvelteKit](https://kit.svelte.dev).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeerush-id%2Fhonor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeerush-id%2Fhonor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeerush-id%2Fhonor/lists"}