{"id":22951840,"url":"https://github.com/fueled/nodejs-graphql-template","last_synced_at":"2025-10-27T10:11:27.482Z","repository":{"id":38682900,"uuid":"493308993","full_name":"Fueled/nodejs-graphql-template","owner":"Fueled","description":"Opinionated starter template for NodeJS based GraphQL Server with prisma used at Fueled.","archived":false,"fork":false,"pushed_at":"2022-11-23T14:58:49.000Z","size":286,"stargazers_count":10,"open_issues_count":8,"forks_count":3,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-07-25T04:35:49.745Z","etag":null,"topics":["apollo-server","eslint","jest","nodejs","prisma","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/Fueled.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}},"created_at":"2022-05-17T15:26:24.000Z","updated_at":"2024-05-20T19:16:46.000Z","dependencies_parsed_at":"2023-01-22T02:51:55.903Z","dependency_job_id":null,"html_url":"https://github.com/Fueled/nodejs-graphql-template","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fueled%2Fnodejs-graphql-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fueled%2Fnodejs-graphql-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fueled%2Fnodejs-graphql-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fueled%2Fnodejs-graphql-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Fueled","download_url":"https://codeload.github.com/Fueled/nodejs-graphql-template/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229718618,"owners_count":18113544,"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":["apollo-server","eslint","jest","nodejs","prisma","typescript"],"created_at":"2024-12-14T15:19:00.577Z","updated_at":"2025-10-27T10:11:22.435Z","avatar_url":"https://github.com/Fueled.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"!!! warning\n\u003e This is deprecated as it's out-dated and we have moved on to using NestJS as our goto framework for all NodeJS based projects. \n\n# Fueled NodeJS GraphQL starter template\n\nThis repo contains the starter template for a NodeJS + TypeScript based GraphQL project.\n\n## Requirements\n\n- NodeJS v16+\n- NPM 7+\n\n## Features\n\n- [TypeScript](https://www.typescriptlang.org/)\n- [ExpressJS](https://github.com/expressjs/express)\n- [Apollo Server](https://github.com/apollographql/apollo-server) with [apollo-server-express](https://github.com/apollographql/apollo-server/tree/main/packages/apollo-server-express) integration\n- [Prisma ORM](https://github.com/prisma/prisma) for database integration\n- [Jest](https://github.com/facebook/jest) for testing\n- Code formating \u0026 linting\n  - [ESLint](https://github.com/eslint/eslint) for code quality standards\n  - [Prettier](https://github.com/prettier/prettier) with [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) for auto-formatting\n  - [EditorConfig](https://editorconfig.org/)\n- [Husky](https://github.com/typicode/husky) for pre-commit hooks\n\nHusky is used for pre-commit hooks. It gets installed automatically via `npm i` as we have `prepare` lifecycle hook set.\nTo avoid executing pre-commit scripts - append `--no-verify` flag to `git commit`.\n\n## Get Started\n\nThe following will install all necessary packages and run the app under development mode which uses `nodemon` for reloading the build when changes are made.\n\n```\nnpm install\nnpm run start:dev\n```\n\n## Docker Setup\n\nA Dockerfile is available to run the backend services in a container exposed through ports. The Docker container\nincludes the hot reloading Node application, PostgresSQL database, and Redis for caching.\n\nThe following services are available currently:\n\n```\napp        // Node application\nredis      // Redis server\npostgres   // PostgreSQL database\n```\n\nTo build and run the Docker container, ensure you have the Docker CLI available, and optionally Docker Desktop.\n\nTo build the Docker container:\n\n```\ndocker-compose build\n```\n\nTo start the Docker container:\n\n```\ndocker-compose up [-d]\n```\n\nTo stop the Docker container:\n\n```\ndocker-compose down\n```\n\nTo run a specific container only:\n\n```\ndocker-compose up [-d] \u003ccontainer_name\u003e\n```\n\n## Authentication\n\nThis repository provides basic interfaces \u0026 services to allow for a JWT based authentication mechanism to be used.\n\n`JwtService` - provides methods for signing \u0026 verifying a JWT token, along with others.\n\n`Authenticable` interface - to be implemented by the auth subject (e.g. user model). Current properties (`username`) are placeholders and are to be replaced with actual properties. When using the `Authenticable`, please replace the generic type in `graphql-context.ts` with the actualy implementation for better type hinting.\n\n## Testing\n\nThis repository has npm commands \u0026 examples ready for:\n- Unit tests\n- E2E tests\n\n### Unit tests\n\nUnit tests should be used to test smaller fragments of code, for example, services. Database calls \u0026 HTTP calls are expcted to be mocked within unit tests. Any file within `test/` directory with a suffix of `.spec.ts` will be treated as a unit test file.\n\n### E2E tests\n\nE2E tests should be used to test API endpoints. It is expected to use actual database functionality instead of mocks. External 3rd party HTTP requests should be mocked. Any file within `test/` directory with a suffix of `.e2e-spec.ts` will be treated as an E2E test file.\n\n## Code formatting \u0026 quality\n\nThis starter template uses ESLint along side Prettier, with separated responsibilities:\n- ESLint for code quality standards.\n- Prettier for code formatting standards.\n\n## ESLint\n\nESLint is a code linter which mainly helps catch quickly minor code quality and style issues.\n\nLike most linters, ESLint has a wide set of configurable rules as well as support for custom rule sets. All rules are configured through `.eslintrc` configuration file.\nIn this starter template ESLint rules are definied specifically around code quality, rather than formatting.\n\n### Running ESLint\n\n```\nnpm run lint      // ESLint checks\nnpm run lint:fix  // ESLint checks + attemt to fix errors\nnpm run lint:all  // ESLint checks + attempt to fix errors \u0026 warnings\n```\n\n### VS Code extensions\n\nIf you are interested in seeing ESLint feedback as soon as possible, I strongly recommend the [VS Code ESLint extension](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint).\n\n\n## Prettier\n\nPrettier is a code formatting tool which helps enforce a set of standardized formatting rules across all of our NodeJS projects.\nIt's not able to enforce specific rules for code quality (especially with TypeScript), hence that responsibility is left to ESLint.\n\n### Running Prettier\n\n```\nnpm run prettier      // Code formatting checks only\nnpm run prettier:fix  // Code formatting fixes\n```\n\n### VS Code extensions\n\nThe following plugin allows you to set Prettier as default code formatter as well as apply Prettier code formating upon file save - [VS Code Prettier extension](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode).\n\n## Helpful VS Code extensions\n\n- [Format Code Action](https://marketplace.visualstudio.com/items?itemName=rohit-gohri.format-code-action\u0026ssr=false#overview) - lets you run ESLint \u0026 Prettier in a particular order of your preference.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffueled%2Fnodejs-graphql-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffueled%2Fnodejs-graphql-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffueled%2Fnodejs-graphql-template/lists"}