{"id":24460867,"url":"https://github.com/thisismydesign/next-nest","last_synced_at":"2025-05-15T18:04:00.425Z","repository":{"id":37554256,"uuid":"336516014","full_name":"thisismydesign/next-nest","owner":"thisismydesign","description":"Next.js + NestJS MVC monolith for rapid development with battle-tested standards.","archived":false,"fork":false,"pushed_at":"2025-01-20T08:56:49.000Z","size":1888,"stargazers_count":500,"open_issues_count":12,"forks_count":79,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-05-15T18:03:55.928Z","etag":null,"topics":["javascript","monolith","nestjs","nextjs","template","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/thisismydesign.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":"CODE_OF_CONDUCT.md","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":"2021-02-06T10:55:54.000Z","updated_at":"2025-05-13T16:24:21.000Z","dependencies_parsed_at":"2023-02-19T08:46:12.012Z","dependency_job_id":"ab21527a-faa4-40f2-a4da-395cce2eda42","html_url":"https://github.com/thisismydesign/next-nest","commit_stats":null,"previous_names":["thisismydesign/next-nest","thisismydesign/nestjs-starter"],"tags_count":0,"template":true,"template_full_name":"nestjs/typescript-starter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thisismydesign%2Fnext-nest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thisismydesign%2Fnext-nest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thisismydesign%2Fnext-nest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thisismydesign%2Fnext-nest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thisismydesign","download_url":"https://codeload.github.com/thisismydesign/next-nest/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254394720,"owners_count":22063984,"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":["javascript","monolith","nestjs","nextjs","template","typescript"],"created_at":"2025-01-21T04:05:40.089Z","updated_at":"2025-05-15T18:04:00.403Z","avatar_url":"https://github.com/thisismydesign.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# next-nest\n[![CI](https://github.com/thisismydesign/next-nest/actions/workflows/ci.yml/badge.svg)](https://github.com/thisismydesign/next-nest/actions/workflows/ci.yml)\n\n#### Next.js + NestJS MVC monolith for rapid development with battle-tested standards.\n\n- Build a web app using the most popular JavaScript backend and frontend frameworks.\n- Get started in minutes with a unified codebase - no need to sync or deploy multiple services.\n- Use typed DB data directly in React via GraphQL and SSR.\n- End-to-end type safety from database to forms.\n- When the time is right, you can easily split the frontend and backend into separate services.\n\n[Use this template](https://github.com/thisismydesign/next-nest/generate)\n\n[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy)\n\nFeatured in:\n- [Geek Culture: NestJS + React (Next.js) in One MVC Repo for Rapid Prototyping](https://medium.com/geekculture/nestjs-react-next-js-in-one-mvc-repo-for-rapid-prototyping-faed42a194ca)\n- [Geek Culture: Automagically Typed GraphQL Queries and Results With Apollo](https://medium.com/geekculture/automagically-typed-graphql-queries-and-results-with-apollo-3731bad989aa)\n- [JavaScript in Plain English: OAuth2 in NestJS for Social Login (Google, Facebook, Twitter, etc)](https://javascript.plainenglish.io/oauth2-in-nestjs-for-social-login-google-facebook-twitter-etc-8b405d570fd2)\n- [JavaScript in Plain English: Cognito via OAuth2 in NestJS: Outsourcing Authentication Without Vendor Lock-in](https://javascript.plainenglish.io/cognito-via-oauth2-in-nestjs-outsourcing-authentication-without-vendor-lock-in-ce908518f547)\n\n## Stack\n\nIt has\n- Example REST and GraphQL modules, DB using TypeORM as seen on https://docs.nestjs.com/\n- [Next.js](https://nextjs.org/) integration for React on the frontend ([howto article](https://csaba-apagyi.medium.com/nestjs-react-next-js-in-one-mvc-repo-for-rapid-prototyping-faed42a194ca))\n- Typed queries \u0026 results with GraphQL out of the box ([howto article](https://csaba-apagyi.medium.com/automagically-typed-graphql-queries-and-results-with-apollo-3731bad989aa))\n- Authentication via [Passport.js](http://www.passportjs.org/) including Social providers ([howto article](https://medium.com/csaba.apagyi/oauth2-in-nestjs-for-social-login-google-facebook-twitter-etc-8b405d570fd2)), [AWS Cognito](https://aws.amazon.com/cognito/) ([howto article](https://medium.com/csaba.apagyi/cognito-via-oauth2-in-nestjs-outsourcing-authentication-without-vendor-lock-in-ce908518f547)), and JWT strategy for REST and GraphQL\n- Docker setup\n- Typescript, ESLint\n- CI via GitHub Actions\n- Running tasks (e.g. DB seeding) via [nestjs-console](https://github.com/Pop-Code/nestjs-console)\n- Unit and integration testing via Jest\n- Heroku deployment setup\n- Google Analytics 4\n\n## Usage\n\n### Dev\n\n```sh\ncp .env.example .env\n\ndocker compose up\n\ndocker compose exec web yarn lint\ndocker compose exec web yarn test\ndocker compose exec web yarn test:request\ndocker compose exec web yarn build\ndocker run -it -v $PWD:/e2e -w /e2e --network=\"host\" --entrypoint=cypress cypress/included:12.2.0 run\n```\n\n## Functionality\n\nREST endpoint via Nest\n- http://localhost:3000/\n\nJWT-protected REST endpoint via Nest\n- http://localhost:3000/private\n\nGraphQL playground (`query WhoAmI` is JWT-protected)\n- http://localhost:3000/graphql\n```qgl\nquery Public {\n  things {\n    id\n    name\n  }\n\n  users {\n    id\n    provider\n  }\n}\n\n# Add Header: { \"Authorization\": \"Bearer \u003ctoken\u003e\" }\nquery Private {\n  whoAmI {\n    id,\n    provider,\n    providerId,\n    username,\n    name\n  }\n\n  orders {\n    id\n\n    alias\n    thing {\n      name\n    }\n  }\n}\n\nmutation createOrder {\n  createOrder(alias: \"myname\", thingName: \"this is a thing you can order\") {\n    id\n    alias\n  }\n}\n```\n\nCognito auth (redirects to hosted Cognito UI)\n- http://localhost:3000/auth/cognito\n\nGoogle auth\n- http://localhost:3000/auth/google\n\nNext.js page\n- http://localhost:3000/home\n\nJWT-protected Next.js page\n- http://localhost:3000/profile\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthisismydesign%2Fnext-nest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthisismydesign%2Fnext-nest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthisismydesign%2Fnext-nest/lists"}