{"id":16969216,"url":"https://github.com/harundogdu/typescript-prisma-library-api","last_synced_at":"2025-04-14T17:06:59.741Z","repository":{"id":150748535,"uuid":"621590509","full_name":"harundogdu/typescript-prisma-library-API","owner":"harundogdu","description":"This is a simple API built with Typescript, Prisma, and Express. It is a library API that allows users to create, read, update, and delete books and authors. It also allows users to create, read, update, and delete book authors.","archived":false,"fork":false,"pushed_at":"2023-04-04T15:54:56.000Z","size":84,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-14T17:06:54.365Z","etag":null,"topics":["api","crud","es-build","express","express-validator","nodejs","nodemon","prisma","rest-api","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/harundogdu.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":"2023-03-31T01:19:49.000Z","updated_at":"2023-09-13T13:02:31.000Z","dependencies_parsed_at":"2023-05-20T20:45:40.083Z","dependency_job_id":null,"html_url":"https://github.com/harundogdu/typescript-prisma-library-API","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harundogdu%2Ftypescript-prisma-library-API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harundogdu%2Ftypescript-prisma-library-API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harundogdu%2Ftypescript-prisma-library-API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harundogdu%2Ftypescript-prisma-library-API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/harundogdu","download_url":"https://codeload.github.com/harundogdu/typescript-prisma-library-API/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248923766,"owners_count":21183953,"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","crud","es-build","express","express-validator","nodejs","nodemon","prisma","rest-api","typescript"],"created_at":"2024-10-14T00:24:26.730Z","updated_at":"2025-04-14T17:06:59.735Z","avatar_url":"https://github.com/harundogdu.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Typescript \u0026 Prisma \u0026 Express Library API\n\nThis is a simple API built with Typescript, Prisma, and Express. It is a library API that allows users to create, read, update, and delete books and authors. It also allows users to create, read, update, and delete book authors.\n\n## Getting Started\n\nThese instructions will get you a copy of the project up and running on your local machine for development and testing purposes.\n\n\u003ch3\u003eInstalling\u003c/h3\u003e\n\nA step by step series of examples that tell you how to get a development env running\n\nClone the repository\n\n```bash\ngit clone https://github.com/harundogdu/typescript-prisma-library-API.git\n```\n\n\u003cp\u003eInstall dependencies\u003c/p\u003e\n\n```bash\nnpm install\n```\n\n\u003cp\u003eRun the development server\u003c/p\u003e\n\n```bash\nnpm run dev\n```\n\n\u003ch3\u003eAvailable Scripts\u003c/h3\u003e\n\n\u003cul\u003e\n\u003cli\u003e\u003ccode\u003enpm run dev\u003c/code\u003e - Runs the app in the development mode.\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003enpm run start\u003c/code\u003e - Runs the app in the production mode.\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003enpm run fresh\u003c/code\u003e - Drops the database, creates a new one, and runs all migrations.\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003enpx prisma db seed\u003c/code\u003e - Runs the seed file.\u003c/li\u003e\n\u003c/ul\u003e\n\n## Prisma\n\nPrisma is an open-source database toolkit that makes it easy for developers to reason about their data and how they access it. It is used to query a database inside a Node.js or TypeScript application.\n\n## Prisma Schema\n\nThe Prisma schema is the single source of truth for your database schema. It describes your database tables, columns, and relations. It also defines which operations are available on your data.\n\n## Prisma Client\n\nPrisma Client is an auto-generated and type-safe query builder for Node.js \u0026 TypeScript. It's used as an alternative to writing plain SQL, or using another database access tool such as SQL query builders (e.g. SQLAlchemy) or ORMs (e.g. TypeORM).\n\n## Available Endpoints\n\n\u003cp\u003eThe following endpoints are available in this API. You can use Postman to test them.\u003c/p\u003e\n\n\u003ch3\u003eAPI Prefix\u003c/h3\u003e\n\n| Prefix  | Description |\n| ------- | ----------- |\n| /api/v1 | API         |\n\n\u003ch3\u003eBooks\u003c/h3\u003e\n\n| Method | Endpoint   | Description      |\n| ------ | ---------- | ---------------- |\n| GET    | /books     | Get all books    |\n| GET    | /books/:id | Get a book by id |\n| POST   | /books     | Create a book    |\n| PUT    | /books/:id | Update a book    |\n| DELETE | /books/:id | Delete a book    |\n\n\u003ch3\u003eAuthors\u003c/h3\u003e\n\n| Method | Endpoint     | Description         |\n| ------ | ------------ | ------------------- |\n| GET    | /authors     | Get all authors     |\n| GET    | /authors/:id | Get an author by id |\n| POST   | /authors     | Create an author    |\n| PUT    | /authors/:id | Update an author    |\n| DELETE | /authors/:id | Delete an author    |\n\n## Built With\n\n\u003cul\u003e\n\u003cli\u003e\u003ca href=\"https://www.typescriptlang.org/\"\u003eTypescript\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://www.prisma.io/\"\u003ePrisma\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://expressjs.com/\"\u003eExpress\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://www.npmjs.com/package/nodemon\"\u003eNodemon\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://www.npmjs.com/package/ts-node\"\u003eTs-Node\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://www.npmjs.com/package/ts-node-dev\"\u003eTs-Node-Dev\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://www.npmjs.com/package/tsconfig-paths\"\u003eTsconfig-Paths\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://www.npmjs.com/package/esbuild\"\u003eEsbuild\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://www.npmjs.com/package/esbuild-register\"\u003eEsbuild-Register\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://www.npmjs.com/package/dotenv\"\u003eDotenv\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://www.npmjs.com/package/cors\"\u003eCors\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://www.npmjs.com/package/express-validator\"\u003eExpress-Validator\u003c/a\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\n## TODO\n\n- [x] Prisma schema file with Book and Author models\n- [x] Book endpoints CRUD operations\n- [x] Author endpoints CRUD operations\n- [x] Error handling\n- [x] Prisma seed database script\n- [x] Prisma fresh script\n- [x] Swagger API documentation\n- [ ] Pagination \u0026 Sorting\n- [ ] JWT authentication\n- [ ] Rate limiting\n- [ ] Dockerize the API\n\n## Authors\n\n\u003cul\u003e\n\u003cli\u003e\u003ca href=\"https://github.com/harundogdu\"\u003eHarun Doğdu\u003c/a\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE.md file for details\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharundogdu%2Ftypescript-prisma-library-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fharundogdu%2Ftypescript-prisma-library-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharundogdu%2Ftypescript-prisma-library-api/lists"}