{"id":20757161,"url":"https://github.com/dehsilvadeveloper/nestjs-graphql-orders","last_synced_at":"2026-04-11T12:01:22.694Z","repository":{"id":184709837,"uuid":"672345471","full_name":"dehsilvadeveloper/nestjs-graphql-orders","owner":"dehsilvadeveloper","description":"Uma aplicação NestJS + Prisma para visualizar / efetuar consultas de dados de pedidos de um e-commerce utilizando graphQL.","archived":false,"fork":false,"pushed_at":"2023-09-14T14:02:27.000Z","size":582,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-18T04:43:30.750Z","etag":null,"topics":["graphql","javascript","nestjs","nestjs9","nodejs","prisma","sqlite","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/dehsilvadeveloper.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-07-29T18:54:25.000Z","updated_at":"2024-01-08T23:58:13.000Z","dependencies_parsed_at":"2024-11-17T09:40:15.431Z","dependency_job_id":"0bbc9df7-0c5a-403a-ba8b-142ad1e51071","html_url":"https://github.com/dehsilvadeveloper/nestjs-graphql-orders","commit_stats":null,"previous_names":["dehsilvadeveloper/nestjs-graphql-orders"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dehsilvadeveloper%2Fnestjs-graphql-orders","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dehsilvadeveloper%2Fnestjs-graphql-orders/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dehsilvadeveloper%2Fnestjs-graphql-orders/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dehsilvadeveloper%2Fnestjs-graphql-orders/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dehsilvadeveloper","download_url":"https://codeload.github.com/dehsilvadeveloper/nestjs-graphql-orders/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243066842,"owners_count":20230814,"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":["graphql","javascript","nestjs","nestjs9","nodejs","prisma","sqlite","typescript"],"created_at":"2024-11-17T09:40:05.173Z","updated_at":"2026-04-11T12:01:17.634Z","avatar_url":"https://github.com/dehsilvadeveloper.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![NestJs][nestjs-shield]][ref-nestjs]\n[![NodeJs][nodejs-shield]][ref-nodejs]\n[![Typescript][typescript-shield]][ref-typescript]\n[![SQLite][sqlite-shield]][ref-sqlite]\n[![Prisma][prisma-shield]][ref-prisma]\n[![JWT][jwt-shield]][ref-jwt]\n[![Jest][jest-shield]][ref-jest]\n[![Npm][npm-shield]][ref-npm]\n[![Git][git-shield]][ref-git]\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"http://nestjs.com/\" target=\"blank\"\u003e\u003cimg src=\"https://nestjs.com/img/logo_text.svg\" width=\"320\" alt=\"Nest Logo\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n# NestJS Graphql Orders\n\nThis is a NestJS v9.x application built to interact with data of orders of an e-commerce with full CRUD functionality.\n\nThe project was created for refinement of NestJS and GraphQL knowledge. It also work as a skills showcase.\n\n**THIS IS A WORK IN PROGRESS**\n\n## Build with\n\n| Name       | Version  |\n| ---------- | -------- |\n| NestJs | v9.x |\n| NodeJs | v19.8.x + |\n| Typescript | v4.9.x + |\n| NPM | v9.5.x + |\n| Prisma | v5.x + |\n| GraphQL | v12.0.x |\n\n## Objectives\n\n* Use separeted config files to define options of some parts of the application, avoiding direct access to environment variables\n* Use GraphQL with **code-first** approach using decorators\n* Enable or disable **GraphQL Playground** based on option of config file\n* Use SQLite for database type\n* Use Prisma for database modelling and migration\n* Seed initial data on the database after migration\n* Use modular approach to organize logic\n* Use Data Transfer Objects (DTOs) to transport groups of data between the application layers and to validate input data\n* Reuse DTO for create order on the DTO for update order using PartialType and/or OmitType\n* Use **transform** decorator to format dates of entity classes only when they are serialized to JSON\n* Use **interceptors** to convert errors to exceptions\n* Use concepts of service pattern, with short service classes\n* Throw custom errors based on the Prisma exceptions types\n* Only allow cancel action on pending orders\n* Only allow refund action on paid orders\n* Only allow remove action on pending orders\n* List orders with filter, pagination and sort\n* Use soft delete approach on the remove actions\n* Create a module for health check (using GraphQL and **Terminus**)\n* Create tests for the application using JEST\n* Use fixture classes as mocked data for tests\n\n## Docs\n\n* [Getting Started](./docs/getting_started.md)\n* [Database Structure](./docs/database_structure.md)\n* [CORS](./docs/cors.md)\n* [Prisma](./docs/prisma.md)\n* [Prisma Studio](./docs/prisma_studio.md)\n* [GraphQL](./docs/graphql.md)\n* [Running Tests](./docs/running_tests.md)\n* [Available NPM Scripts](./docs/available_npm_scripts.md)\n\n\u003c!-- Badge Shields --\u003e\n[nestjs-shield]: https://img.shields.io/badge/nestjs-%23E0234E.svg?style=for-the-badge\u0026logo=nestjs\u0026logoColor=white\n[nodejs-shield]: https://img.shields.io/badge/node.js-6DA55F?style=for-the-badge\u0026logo=node.js\u0026logoColor=white\n[typescript-shield]: https://img.shields.io/badge/typescript-%23007ACC.svg?style=for-the-badge\u0026logo=typescript\u0026logoColor=white\n[sqlite-shield]: https://img.shields.io/badge/sqlite-%2307405e.svg?style=for-the-badge\u0026logo=sqlite\u0026logoColor=white\n[prisma-shield]: https://img.shields.io/badge/Prisma-3982CE?style=for-the-badge\u0026logo=Prisma\u0026logoColor=white\n[jwt-shield]: https://img.shields.io/badge/JWT-black?style=for-the-badge\u0026logo=JSON%20web%20tokens\n[jest-shield]: https://img.shields.io/badge/-jest-%23C21325?style=for-the-badge\u0026logo=jest\u0026logoColor=white\n[npm-shield]: https://img.shields.io/badge/NPM-%23CB3837.svg?style=for-the-badge\u0026logo=npm\u0026logoColor=white\n[git-shield]: https://img.shields.io/badge/git-%23F05033.svg?style=for-the-badge\u0026logo=git\u0026logoColor=white\n\n\u003c!-- References --\u003e\n[ref-nestjs]: http://nestjs.com\n[ref-nodejs]: https://nodejs.org\n[ref-typescript]: https://www.typescriptlang.org\n[ref-sqlite]: https://www.sqlite.org/index.html\n[ref-prisma]: https://www.prisma.io/\n[ref-npm]: https://yarnpkg.com\n[ref-jwt]: https://jwt.io\n[ref-jest]: https://jestjs.io/docs/getting-started\n[ref-git]: https://git-scm.com","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdehsilvadeveloper%2Fnestjs-graphql-orders","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdehsilvadeveloper%2Fnestjs-graphql-orders","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdehsilvadeveloper%2Fnestjs-graphql-orders/lists"}