{"id":16178127,"url":"https://github.com/charlypoly/nextjs-with-defer","last_synced_at":"2025-04-07T11:29:00.446Z","repository":{"id":222311716,"uuid":"756879594","full_name":"charlypoly/nextjs-with-defer","owner":"charlypoly","description":null,"archived":false,"fork":false,"pushed_at":"2024-02-13T14:05:35.000Z","size":2183,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-30T11:02:37.113Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://nextjs-with-defer.vercel.app","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/charlypoly.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,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-02-13T13:44:31.000Z","updated_at":"2024-02-13T13:45:50.000Z","dependencies_parsed_at":"2024-02-13T15:52:10.835Z","dependency_job_id":null,"html_url":"https://github.com/charlypoly/nextjs-with-defer","commit_stats":null,"previous_names":["charlypoly/nextjs-with-defer"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charlypoly%2Fnextjs-with-defer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charlypoly%2Fnextjs-with-defer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charlypoly%2Fnextjs-with-defer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charlypoly%2Fnextjs-with-defer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/charlypoly","download_url":"https://codeload.github.com/charlypoly/nextjs-with-defer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247643115,"owners_count":20972041,"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-10T05:12:24.364Z","updated_at":"2025-04-07T11:29:00.425Z","avatar_url":"https://github.com/charlypoly.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ca href=\"https://demo-nextjs-with-defer.vercel.app/\"\u003e\n  \u003cimg alt=\"Next.js and Defer Demo\" src=\"https://demo-nextjs-with-defer.vercel.app/og-image.png\"\u003e\n  \u003ch1 align=\"center\"\u003eNext.js and Defer Demo\u003c/h1\u003e\n\u003c/a\u003e\n\n\u003cp align=\"center\"\u003e\n Explore how to schedule background tasks with Next.js and Defer\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://docs.defer.run/\"\u003eDocumentation\u003c/a\u003e\n    \u003cspan\u003e\u0026nbsp;·\u0026nbsp;\u003c/span\u003e\n    \u003ca href=\"https://www.defer.run/blog\"\u003eBlog\u003c/a\u003e\n    \u003cspan\u003e\u0026nbsp;·\u0026nbsp;\u003c/span\u003e\n    \u003ca href=\"https://discord.gg/x2v84Vqsk6\"\u003eCommunity\u003c/a\u003e\n    \u003cspan\u003e\u0026nbsp;·\u0026nbsp;\u003c/span\u003e\n    \u003ca href=\"https://github.com/defer-run/defer.client/discussions/categories/roadmap\"\u003eRoadmap / RFCs\u003c/a\u003e\n\u003c/p\u003e\n\u003cbr/\u003e\n\n## Features\n\nDefer makes it easy to schedule and offload long-running tasks, without leaving your Next.js application with:\n\n- [Delayed Executions](https://www.defer.run/docs/features/delays)\n- [CRONs](https://www.defer.run/docs/features/cron)\n- [Workflows](https://www.defer.run/docs/guides/onboarding-workflow)\n- Advanced configuration: [Retries](https://www.defer.run/docs/features/retries), [Concurrency](https://www.defer.run/docs/features/concurrency) or, [Cancellation](https://www.defer.run/docs/features/cancellation)\n\n\u003cbr /\u003e\n\nThis Next.js Demo comes with a [CRON](./defer/dailyCron.ts) and 2 examples of Background Functions.\n\nSee how Defer fits perfectly with [Next.js Server Actions](./app/actions/actions.ts), enabling you to trigger Background Functions from [Client-Side Components](./app/page.tsx).\n\n\u003cbr /\u003e\n\n## Demo\n\nYou can view a fully working demo at [demo-nextjs-with-defer.vercel.app](https://demo-nextjs-with-defer.vercel.app/).\n\n\u003cbr /\u003e\n\n## Deploy to Vercel\n\n1. First, click on the following button will fork this demo repository and deploy it on your Vercel account: [![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fdefer-run%2Fdefer.demo%2Ftree%2Fmaster%2Fnextjs%2Fapp-template%2F\u0026project-name=nextjs-with-defer\u0026repository-name=nextjs-with-defer\u0026demo-title=nextjs-with-defer\u0026demo-description=Perform%20long-running%20tasks,%20workflows%20and%20CRONs%20within%20your%20Next.js%20application.\u0026demo-url=https%3A%2F%2Fdemo-nextjs-with-defer.vercel.app%2F\u0026external-id=https%3A%2F%2Fgithub.com%2Fdefer-run%2Fdefer.demo%2Ftree%2Fmaster%2Fnextjs%2Fapp-template%2F\u0026demo-image=https%3A%2F%2Fdemo-nextjs-with-defer.vercel.app%og-image.png\u0026integration-ids=)\n\n2. Once deployed on Vercel, go on the [Defer Console to create an account](https://console.defer.run/).\n\n3. Then, create a new Defer application by selecting your GitHub repository created from this template.\n\n4. Finally, go to the [Defer Vercel Integration page](https://vercel.com/integrations/defer) (_Click \"Add Integration\"_) to connect your Vercel application with your Defer ones.\n\n5. You are go to go! The tasks will now run on Defer, triggered from your Vercel demo application 🚀\n\n\u003cbr /\u003e\n\n## Clone and run locally\n\n1. Create a Next.js app using this template with the `npx command`:\n\n   ```bash\n   npx create-next-app -e https://github.com/defer-run/defer.demo/tree/master/nextjs/app-template\n   ```\n\n2. Use `cd` to change into the app's directory\n\n   ```bash\n   cd name-of-new-app\n   ```\n\n3. You can now run the Next.js local development server:\n\n   ```bash\n   npm run dev\n   ```\n\n   The demo application should now be running on [localhost:3000](http://localhost:3000/).\n\n\u003e Check out [the docs for Local Development](https://www.defer.run/docs/get-started/development-testing#local-development).\n\n\u003cbr /\u003e\n\n\u003e Follow our [Vercel Integration guide](https://www.defer.run/docs/integrations/vercel) to deploy your new repository to Defer and Vecerl without using the \"Deploy to Vercel\" button\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharlypoly%2Fnextjs-with-defer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcharlypoly%2Fnextjs-with-defer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharlypoly%2Fnextjs-with-defer/lists"}