{"id":21822017,"url":"https://github.com/mooudmohammady/endrun","last_synced_at":"2025-06-17T12:35:27.188Z","repository":{"id":222802938,"uuid":"758103412","full_name":"MooudMohammady/endrun","owner":"MooudMohammady","description":"Endrun is a simple and powerful web API framework that dynamically generates endpoints and Swagger documentation based on database models using Prisma ORM. ⚡🔥","archived":false,"fork":false,"pushed_at":"2024-02-22T07:10:34.000Z","size":289,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-23T11:48:09.924Z","etag":null,"topics":["api","backend","express","nodejs","restful-api","web-framework"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/MooudMohammady.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":"2024-02-15T16:22:55.000Z","updated_at":"2025-02-20T14:27:31.000Z","dependencies_parsed_at":"2024-11-27T16:00:38.334Z","dependency_job_id":null,"html_url":"https://github.com/MooudMohammady/endrun","commit_stats":null,"previous_names":["mooudmohammady/endrun"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MooudMohammady%2Fendrun","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MooudMohammady%2Fendrun/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MooudMohammady%2Fendrun/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MooudMohammady%2Fendrun/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MooudMohammady","download_url":"https://codeload.github.com/MooudMohammady/endrun/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248819353,"owners_count":21166474,"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","backend","express","nodejs","restful-api","web-framework"],"created_at":"2024-11-27T17:12:21.350Z","updated_at":"2025-04-14T03:51:52.887Z","avatar_url":"https://github.com/MooudMohammady.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/MooudMohammady/endrun/master/images/logo.png\" width=\"500\" height=\"auto\" alt=\"Hono\"/\u003e\n\u003c/div\u003e\n\u003chr /\u003e\n\n[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/honojs/hono/ci.yml?branch=main)](https://github.com/MooudMohammady/endrun/actions)\n[![GitHub](https://img.shields.io/badge/License-MIT-g)](https://github.com/MooudMohammady/endrun/blob/main/LICENSE)\n[![Bundle Size](https://img.shields.io/badge/minifide_size-29_kB-blue)](https://)\n[![Bundle Size](https://img.shields.io/badge/minzipped_size-8.5_kB-blue)](https://)\n[![Bundle Size](https://img.shields.io/bundlephobia/minzip/hono)](https://bundlephobia.com/result?p=hono)\n[![npm type definitions](https://img.shields.io/badge/types-TypeScript-blue)](https://github.com/MooudMohammady/endrun/commits/main)\n[![GitHub last commit](https://img.shields.io/badge/last_commit-today-g)](https://github.com/MooudMohammady/endrun/commits/main)\n\n# Endrun\n\nEndrun is a simple and powerful web API framework that dynamically generates endpoints and Swagger documentation based on database models using Prisma ORM.\n\n## Features\n\n- **Dynamic Endpoint Generation**: Automatically create endpoints for CRUD operations (GET, POST, PUT, DELETE) for each database model defined in Prisma, without the need for manual code writing.\n  \n- **Automatic Swagger Documentation**: Generate Swagger documentation automatically for your APIs, specifying the operations available in each endpoint and the parameters required.\n  \n- **Prisma ORM Compatibility**: Endrun works seamlessly with Prisma ORM for database management, providing a modern and efficient way to interact with your data.\n\n- **Simplicity and Ease of Use**: With its simple and user-friendly design, Endrun allows developers to quickly and confidently create powerful and stable APIs, without the need for repetitive code or unnecessary complexities.\n## Usage\n\nTo get started with Endrun, follow these simple steps:\n\n1. Install Endrun using npm:\n\n`\nnpm install endrun dotenv prisma\n`\n\nvbnet\nCopy code\n\n2. Define your database models using Prisma.\n\n3. Import Endrun into your project and configure your endpoints.\n\n4. Start your server and enjoy the power and simplicity of Endrun!\n\n## Example\n\nHere's a simple example of how to use Endrun to create an API endpoint:\n\n```typescript\n// index.ts\n\nimport {Endrun} from 'endrun';\nimport dotenv from 'dotenv';\n\ndotenv.config();\n\nconst PORT = process.env.PORT || 3030;\n\nnew Endrun().startServer(PORT);\n```\n\nand add the database address in the .env file :\n```env\n# .env\n\nDATABASE_URL=postgres://postgres:postgres@localhost:5432/endrun\n```\n\nyou can add custom routes to Endrun class : \n```ts\nnew Endrun((router, db) =\u003e [\n  // base url /api\n  // If /products exists, it overrides it; otherwise, it creates a new endpoint.\n  router.get(\"/products\", async (req, res) =\u003e {\n    const result = await db.product.findMany();\n    res.json(result);\n  }),\n  router.post(\"/products\", async (req, res) =\u003e {\n    const result = await db.product.create({\n      data: await req.body, // An error is returned because we added that path to the withoutBodyParser !\n    });\n    res.json(result);\n  }),\n],{\n  searchableModels : [\"Product\"],\n  withoutBodyParser: [\"/products\"]\n}).startServer(PORT);\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmooudmohammady%2Fendrun","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmooudmohammady%2Fendrun","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmooudmohammady%2Fendrun/lists"}