{"id":22813166,"url":"https://github.com/morewings/ts-global-state-next","last_synced_at":"2025-10-15T03:26:17.503Z","repository":{"id":249574504,"uuid":"803442382","full_name":"morewings/ts-global-state-next","owner":"morewings","description":"This template is for Next based web applications using global state and remote data source. The template uses App Router Next.js configuration. This template has tests for React components, reducers, hooks.","archived":false,"fork":false,"pushed_at":"2025-10-01T20:42:05.000Z","size":13826,"stargazers_count":2,"open_issues_count":7,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-01T22:24:41.929Z","etag":null,"topics":["global-state","jest","nextjs","react-context","react-query","reducer","stylelint","template"],"latest_commit_sha":null,"homepage":"https://ts-global-state-next.vercel.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/morewings.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-05-20T18:23:31.000Z","updated_at":"2025-09-10T09:07:36.000Z","dependencies_parsed_at":"2024-07-24T13:03:27.905Z","dependency_job_id":"02bda223-bff5-4e32-b9c9-cf1a78580be3","html_url":"https://github.com/morewings/ts-global-state-next","commit_stats":null,"previous_names":["morewings/ts-no-redux-next"],"tags_count":0,"template":true,"template_full_name":"morewings/ts-redux-next","purl":"pkg:github/morewings/ts-global-state-next","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morewings%2Fts-global-state-next","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morewings%2Fts-global-state-next/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morewings%2Fts-global-state-next/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morewings%2Fts-global-state-next/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/morewings","download_url":"https://codeload.github.com/morewings/ts-global-state-next/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morewings%2Fts-global-state-next/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279042590,"owners_count":26091283,"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","status":"online","status_checked_at":"2025-10-15T02:00:07.814Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["global-state","jest","nextjs","react-context","react-query","reducer","stylelint","template"],"created_at":"2024-12-12T12:15:50.414Z","updated_at":"2025-10-15T03:26:17.436Z","avatar_url":"https://github.com/morewings.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Deploy to GitHub Pages](https://github.com/morewings/ts-global-state-next/actions/workflows/pages.yml/badge.svg)](https://github.com/morewings/ts-global-state-next/actions/workflows/pages.yml)\n[![Post-merge tasks](https://github.com/morewings/ts-global-state-next/actions/workflows/merge-jobs.yml/badge.svg)](https://github.com/morewings/ts-global-state-next/actions/workflows/merge-jobs.yml)\n[![Vercel](https://vercelbadge.vercel.app/api/morewings/ts-global-state-next)](https://vercel.com/dima-vyshniakovs-projects/ts-global-state-next)\n\n# Global state capable Next template\n\n[![TS Redux Next](./design/github.jpg)](#)\n\nGlobal state Next template (GSN) is designed for Next.js-based web applications utilizing global state and remote data sources. It includes the App Router configuration of Next.js and tests for React components, reducers, and hooks.\n\n\nStatic html deployment: [Github pages](https://morewings.github.io/ts-global-state-next/)\n\nFull-featured deployment: [Vercel](https://ts-global-state-next.vercel.app/)\n\n## Features\n\n- Written in **Typescript**.\n- Powered by **Nextjs**. Configured to use **App router**.\n- Global state support using **React.Context** with devtools support.\n- Remote data sources support with **TanStack Query** with devtools support.\n- **Generate** components and features from CLI.\n- **pnpm** for fast package management.\n- **Husky** for git hooks.\n- **Eslint** and **stylelint**.\n- **Jest** and **react-testing-library** for testing.\n- Supports **CSS Modules** and **Styled components**.\n\n## Quickstart\n\n### Prerequisites\n\n1. Install **Node** \u003e= 20.x.\n2. Install **pnpm**. E.g. `corepack prepare pnpm@latest --activate`.\n\n\n### Installation\n\nManually clone repo or use `degit`.\n\n```shell script\n# With CSS Modules config\nnpx degit github:morewings/ts-global-state-next my-app\n# With Styled Components config\nnpx degit github:morewings/ts-global-state-next#styled-components my-app\ncd ./my-app\npnpm i\n```\n\n## Generate components and features\n\nTemplate uses [generate-react-cli](https://www.npmjs.com/package/generate-react-cli). Templates are located at `./templates` directory.\n\n```shell script\npnpm run generate:component Foo\n```\n\nCreates all necessary React component files in `./src/components/Foo`. \n\n```shell script\npnpm run generate:component-loading Foo\n```\n\nCreates React component files for component with dynamically loading content in `./src/components/Foo`. \n\n```shell script\npnpm run generate:feature-local Foo\n```\n\nCreates `React.Context` based feature with reducer, Context.Provider, hooks and selectors in `./src/features/Foo`. \n\n```shell script\npnpm run generate:feature-connected Foo\n```\n\nCreates `@tanstack/react-query` based feature with global storage, queries, hooks and selectors in `./src/features/Foo`.\n\n```shell script\npnpm run generate:page Foo\n```\n\nCreates Next App router compatible page in `./app/Foo` directory.\n\n## Enable Styled components\n\nRefer to this [PR](https://github.com/morewings/ts-global-state-next/pull/40) and [styled-components](https://github.com/morewings/ts-global-state-next/tree/styled-components) branch for all necessary changes.\n\n## Previous implementations\n\n[cra-template-no-redux](https://github.com/morewings/cra-template-no-redux)\n\n[react-template](https://github.com/morewings/react-template)\n\n## Acknowledgements\n\nCover frame image by [GDJ](https://pixabay.com/users/gdj-1086657/).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmorewings%2Fts-global-state-next","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmorewings%2Fts-global-state-next","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmorewings%2Fts-global-state-next/lists"}