{"id":30185922,"url":"https://github.com/claeusdev/raptur","last_synced_at":"2025-08-12T14:09:50.817Z","repository":{"id":270093334,"uuid":"909285851","full_name":"claeusdev/raptur","owner":"claeusdev","description":"Simple express inspired router","archived":false,"fork":false,"pushed_at":"2024-12-28T10:57:00.000Z","size":78,"stargazers_count":10,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-02T16:27:19.609Z","etag":null,"topics":[],"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/claeusdev.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-12-28T08:41:18.000Z","updated_at":"2025-02-01T19:03:31.000Z","dependencies_parsed_at":"2024-12-28T11:27:24.452Z","dependency_job_id":"bc8203d5-fef3-4490-8dee-cb17be58fde7","html_url":"https://github.com/claeusdev/raptur","commit_stats":null,"previous_names":["claeusdev/raptur"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/claeusdev/raptur","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/claeusdev%2Fraptur","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/claeusdev%2Fraptur/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/claeusdev%2Fraptur/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/claeusdev%2Fraptur/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/claeusdev","download_url":"https://codeload.github.com/claeusdev/raptur/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/claeusdev%2Fraptur/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270073663,"owners_count":24522389,"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","status":"online","status_checked_at":"2025-08-12T02:00:09.011Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2025-08-12T14:09:46.850Z","updated_at":"2025-08-12T14:09:50.808Z","avatar_url":"https://github.com/claeusdev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🦖 Raptur\n\n\u003c!--[![npm version](https://img.shields.io/npm/v/raptor-router.svg)](https://www.npmjs.com/package/raptor-router)--\u003e\n\u003c!--[![TypeScript](https://img.shields.io/badge/TypeScript-Ready-blue.svg)](https://www.typescriptlang.org/)--\u003e\n\u003c!--[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)--\u003e\n\u003c!--[![Build Status](https://img.shields.io/github/workflow/status/yourusername/raptor-router/CI)](https://github.com/yourusername/raptor-router/actions)--\u003e\n\n```ascii\n     __    _                   \n    / _)  / \\        /\\  /\\    \n   /(_)(  \\_/       /  \\/  \\   \n  (____)\\  _    ___/   /\\   \\  \n       U  (_)  (___/   \\/   /  \n           _    _  \\_      /   \n          (____(__  \\_____/    \n```\n\nRaptur Router is a simple, TypeScript-first HTTP router for Node.js. Built with developer experience in mind, it provides a clean, chainable API for building web applications.\n\n## Features\n\n- 🚀 Simple routing\n- 💪 Built with TypeScript\n- 🎯 Type safety\n- ⚡️ Async/await support\n- 🔍 URL parameter parsing\n- 📦 Zero dependencies\n- 🛠 Chainable API\n- 🦕 Prehistoric power!\n\n## Installation\nStill WIP so not on npm yet.\n\n```bash\nnpm install raptur\n```\n\n## Quick Start\n\n```typescript\nimport { Raptur } from 'raptur';\n\nconst app = new Raptur(); // can pass optional port, default is :3000\n\napp\n  .get('/api/hello', (req, res) =\u003e {\n    res.json({ message: 'Hello from Raptur! 🦖' });\n  })\n  .get('/api/users/:id', async (req, res) =\u003e {\n    const { id } = req.params;\n    res.json({ userId: id });\n  })\n  .post('/api/users', async (req, res) =\u003e {\n    const body = await req.json();\n    res.status(201).json({ message: 'User created', data: body });\n  });\n\napp.start(() =\u003e {\n  console.log('🦖 Raptur is hunting on port 3000');\n});\n```\n\n## API Reference\n\n### Creating a Router\n\n```typescript\nimport { Raptur } from 'raptur';\nconst app = new Raptur();\n```\n\n### Route Methods\n\n```typescript\napp.get(path: string, handler: RouteHandler);\napp.post(path: string, handler: RouteHandler);\napp.put(path: string, handler: RouteHandler);\napp.delete(path: string, handler: RouteHandler);\n```\n\n### Request Object\n\n```typescript\ninterface RapturRequest {\n  params: Record\u003cstring, string\u003e;    // URL parameters\n  query: Record\u003cstring, string\u003e;     // Query string parameters\n  headers: http.IncomingHttpHeaders; // Request headers\n  json(): Promise\u003cany\u003e;              // Parse JSON body\n}\n```\n\n### Response Object\n\n```typescript\ninterface RapturResponse {\n  status(code: number): RapturResponse;\n  json(data: any): void;\n  send(data: string): void;\n  setHeader(name: string, value: string): RapturResponse;\n}\n```\n\n## URL Parameters\n\nRaptur supports dynamic URL parameters with the `:param` syntax:\n\n```typescript\napp.get('/api/users/:id/posts/:postId', (req, res) =\u003e {\n  const { id, postId } = req.params;\n  res.json({ userId: id, postId });\n});\n```\n\n## Query Parameters\n\nAccess query parameters through the `query` object:\n\n```typescript\n// GET /api/search?q=raptor\u0026sort=desc\napp.get('/api/search', (req, res) =\u003e {\n  const { q, sort } = req.query;\n  res.json({ searchTerm: q, sortOrder: sort });\n});\n```\n\n## Body Parsing\n\nParse JSON request bodies with the `json()` method:\n\n```typescript\napp.post('/api/data', async (req, res) =\u003e {\n  const body = await req.json();\n  res.json({ received: body });\n});\n```\n\n## Error Handling\n\nRaptur automatically handles route errors:\n\n```typescript\napp.get('/api/error', async (req, res) =\u003e {\n  throw new Error('Something went wrong');\n  // Automatically returns 500 Internal Server Error\n});\n```\n\n## Examples\n\n### Basic REST API\n\n```typescript\napp\n  .get('/api/items', async (req, res) =\u003e {\n    const items = await getItems();\n    res.json(items);\n  })\n  .post('/api/items', async (req, res) =\u003e {\n    const body = await req.json();\n    const newItem = await createItem(body);\n    res.status(201).json(newItem);\n  })\n  .get('/api/items/:id', async (req, res) =\u003e {\n    const item = await getItem(req.params.id);\n    if (!item) {\n      return res.status(404).json({ error: 'Item not found' });\n    }\n    res.json(item);\n  })\n  .delete('/api/items/:id', async (req, res) =\u003e {\n    await deleteItem(req.params.id);\n    res.status(204).send('');\n  });\n```\n\n## Contributing\n\nWe welcome contributions! Please feel free to submit a Pull Request. Check out our contributing guidelines for more information.\n\n## License\n\nMIT © [Nana Adjei Manu]\n\n## Credits\n\nASCII art logo generated with love and prehistoric power! 🦖\n\n---\n\nHappy routing with Raptur! 🦕\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclaeusdev%2Fraptur","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclaeusdev%2Fraptur","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclaeusdev%2Fraptur/lists"}