{"id":14957429,"url":"https://github.com/sambacha/nextjs-web3-template","last_synced_at":"2025-10-01T16:31:57.119Z","repository":{"id":40485402,"uuid":"353588244","full_name":"sambacha/nextjs-web3-template","owner":"sambacha","description":"NextJS Web3 Template","archived":false,"fork":false,"pushed_at":"2022-05-05T09:28:27.000Z","size":1120,"stargazers_count":18,"open_issues_count":1,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-15T21:11:11.545Z","etag":null,"topics":["next-js","nextjs","ssr","web3","web3js"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/sambacha.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}},"created_at":"2021-04-01T05:45:51.000Z","updated_at":"2024-06-12T01:11:04.000Z","dependencies_parsed_at":"2022-08-09T21:51:09.883Z","dependency_job_id":null,"html_url":"https://github.com/sambacha/nextjs-web3-template","commit_stats":null,"previous_names":[],"tags_count":1,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sambacha%2Fnextjs-web3-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sambacha%2Fnextjs-web3-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sambacha%2Fnextjs-web3-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sambacha%2Fnextjs-web3-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sambacha","download_url":"https://codeload.github.com/sambacha/nextjs-web3-template/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234883315,"owners_count":18901365,"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":["next-js","nextjs","ssr","web3","web3js"],"created_at":"2024-09-24T13:14:53.441Z","updated_at":"2025-10-01T16:31:51.822Z","avatar_url":"https://github.com/sambacha.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NextJS + Web3 + Zustand\n\n\nThe trick here for supporting universal Zustand is to separate the cases for the client and the server. When we are on the server we want to create a new store every time, otherwise different users data will be mixed up. If we are in the client we want to use always the same store. That's what we accomplish on `store.js`.\n\nAll components have access to the Zustand store using `useStore()` returned from zustand's `createContext()` function.\n\nOn the server side every request initializes a new store, because otherwise different user data can be mixed up. On the client side the same store is used, even between page changes.\n\n## Preview\n\nPreview the example live on [StackBlitz](http://stackblitz.com/):\n\n[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/vercel/next.js/tree/canary/examples/with-zustand)\n\n## Deploy your own\n\nDeploy the example using [Vercel](https://vercel.com?utm_source=github\u0026utm_medium=readme\u0026utm_campaign=next-example):\n\n[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/git/external?repository-url=https://github.com/vercel/next.js/tree/canary/examples/with-zustand\u0026project-name=with-zustand\u0026repository-name=with-zustand)\n\n## How to use\n\nExecute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init) or [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/) to bootstrap the example:\n\n```bash\nnpx create-next-app --example with-zustand with-zustand-app\n# or\nyarn create next-app --example with-zustand with-zustand-app\n```\n\nDeploy it to the cloud with [Vercel](https://vercel.com/new) ([Documentation](https://nextjs.org/docs/deployment)).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsambacha%2Fnextjs-web3-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsambacha%2Fnextjs-web3-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsambacha%2Fnextjs-web3-template/lists"}