{"id":17651077,"url":"https://github.com/tilap/next-typescript-apollo","last_synced_at":"2026-02-09T11:35:24.280Z","repository":{"id":40261651,"uuid":"434902490","full_name":"tilap/next-typescript-apollo","owner":"tilap","description":null,"archived":false,"fork":false,"pushed_at":"2023-03-06T20:46:52.000Z","size":850,"stargazers_count":0,"open_issues_count":6,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-13T08:26:30.407Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/tilap.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":"2021-12-04T13:02:02.000Z","updated_at":"2021-12-07T12:12:20.000Z","dependencies_parsed_at":"2023-02-07T13:00:57.781Z","dependency_job_id":null,"html_url":"https://github.com/tilap/next-typescript-apollo","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/tilap%2Fnext-typescript-apollo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tilap%2Fnext-typescript-apollo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tilap%2Fnext-typescript-apollo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tilap%2Fnext-typescript-apollo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tilap","download_url":"https://codeload.github.com/tilap/next-typescript-apollo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247589835,"owners_count":20963022,"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":[],"created_at":"2024-10-23T11:40:12.322Z","updated_at":"2026-02-09T11:35:24.254Z","avatar_url":"https://github.com/tilap.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\nnext-advanced-apollo-starter\n\u003c/h1\u003e\n\n\u003ch4 align=\"center\"\u003e\n  Advanced, but minimalistic Next.js and Apollo starter\n\u003c/h4\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"#whats-included\"\u003eWhat's included\u003c/a\u003e •\n  \u003ca href=\"#getting-started\"\u003eGetting Started\u003c/a\u003e •\n  \u003ca href=\"#apollo-usage\"\u003eApollo usage\u003c/a\u003e •\n  \u003ca href=\"#writing-tests\"\u003eWriting tests\u003c/a\u003e •\n  \u003ca href=\"#docker-usage\"\u003eDocker usage\u003c/a\u003e\n\u003c/p\u003e\n\n## What's included\n\n### Features\n\n- Latest [Next.js](https://nextjs.org/) version.\n- Latest packages updates.\n- GraphQL [Apollo](https://www.apollographql.com/docs/react/essentials/get-started/) client with built-in\n  cookie-based [JWT](https://jwt.io/) token authentication.\n- Localization via [react-i18next](https://react.i18next.com/).\n- [TypeScript](https://www.typescriptlang.org/) environment.\n- Code linting:\n  - [eslint](https://eslint.org/) with awesome plugins: [nextjs](https://www.npmjs.com/package/eslint-config-nextjs), [import](https://www.npmjs.com/package/eslint-plugin-import), [unicorn](https://www.npmjs.com/package/eslint-plugin-unicorn).\n  - [prettier](https://prettier.io/)\n  - [lint-staged](https://www.npmjs.com/package/lint-staged) to process when commiting\n  - [husky](https://www.npmjs.com/package/husky) with hooks configured\n  - [commitlint](https://www.npmjs.com/package/commitlint)\n- _No custom server_.\n\n### Developer experience\n\n- Testing environment via [Jest](https://jestjs.io/) and [@testing-library/react](https://testing-library.com/docs/react-testing-library/intro).\n- Git hooks for pre-commit, pre-push and commit message.\n- Debug configuration for [VSCode](https://code.visualstudio.com/).\n- [Docker](https://www.docker.com/) configuration to serve **production-ready** build with Nginx.\n\n## Getting started\n\n### Install\n\nInstall dependancies\n\n```bash\nyarn install\n```\n\n### Start development server\n\n```bash\nyarn run dev\n```\n\n## Apollo usage\n\n### Client-side rendering (CSR)\n\n```jsx\nimport { gql, useQuery } from '@apollo/client';\n\nconst GET_CATS = gql`\n  query GetCats {\n    cats {\n      id\n      breed\n    }\n  }\n`;\n\nconst MyPage = () =\u003e {\n  const { loading, data } = useQuery(GET_CATS);\n\n  if (loading) {\n    return \u003cdiv\u003eLoading...\u003c/div\u003e;\n  }\n\n  return \u003cdiv\u003e{JSON.stringify(data)}\u003c/div\u003e;\n};\n\nexport default MyPage;\n```\n\n### Server-side rendering (SSR)\n\n```jsx\nimport { gql } from '@apollo/client';\nimport { initializeApollo, addApolloState } from '../lib/apollo';\n\nconst GET_CATS = gql`\n  query GetCats {\n    cats {\n      id\n      breed\n    }\n  }\n`;\n\nconst MyPage = (props) =\u003e {\n  return \u003cdiv\u003e{JSON.stringify(props.data)}\u003c/div\u003e;\n};\n\nexport async function getServerSideProps() {\n  const apolloClient = initializeApollo();\n\n  const { data } = await apolloClient.query({\n    query: GET_CATS,\n  });\n\n  return addApolloState(apolloClient, {\n    props: {\n      data,\n    },\n  });\n}\n\nexport default MyPage;\n```\n\n## Writing tests\n\n[Jest](https://jestjs.io/) is a great tool for testing. To run tests located in `/tests` directory, use `test` script\nfrom `package.json`:\n\n```bash\nyarn test\n```\n\n---\n\nPretty much everything you need to know about project structure, SSR, etc., you can find in\nthe [official Next.js documentation](https://nextjs.org/docs).\n\n## Docker usage\n\nTo build and run Dockerized **production-ready** container, run:\n\n```bash\ndocker-compose up --build\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftilap%2Fnext-typescript-apollo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftilap%2Fnext-typescript-apollo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftilap%2Fnext-typescript-apollo/lists"}