{"id":26221448,"url":"https://github.com/workos/next-b2b-starter-kit","last_synced_at":"2025-04-17T03:50:38.356Z","repository":{"id":264025178,"uuid":"856382911","full_name":"workos/next-b2b-starter-kit","owner":"workos","description":"An enterprise-ready starter kit for B2B SaaS applications.","archived":false,"fork":false,"pushed_at":"2025-03-23T05:37:53.000Z","size":6074,"stargazers_count":43,"open_issues_count":2,"forks_count":1,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-11T15:12:19.291Z","etag":null,"topics":["b2b","convex","nextjs","starter-kit","stripe","workos"],"latest_commit_sha":null,"homepage":"https://next-b2b-starter-kit.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/workos.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}},"created_at":"2024-09-12T13:43:27.000Z","updated_at":"2025-04-07T23:47:25.000Z","dependencies_parsed_at":"2024-11-21T16:19:04.158Z","dependency_job_id":"2a4a76ed-e027-42b7-ac8f-84a2e16ed9f7","html_url":"https://github.com/workos/next-b2b-starter-kit","commit_stats":null,"previous_names":["workos/next-b2b-starter-kit"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/workos%2Fnext-b2b-starter-kit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/workos%2Fnext-b2b-starter-kit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/workos%2Fnext-b2b-starter-kit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/workos%2Fnext-b2b-starter-kit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/workos","download_url":"https://codeload.github.com/workos/next-b2b-starter-kit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249311792,"owners_count":21249314,"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":["b2b","convex","nextjs","starter-kit","stripe","workos"],"created_at":"2025-03-12T16:20:23.941Z","updated_at":"2025-04-17T03:50:38.314Z","avatar_url":"https://github.com/workos.png","language":"TypeScript","funding_links":[],"categories":["Templates"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./public/splash_page.jpeg\" alt=\"Screenshot of splash page\"/\u003e\n  \u003ch1 align=\"center\"\u003eNext.js B2B Starter Kit\u003c/h1\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  A fully functional B2B SaaS template built with Next.js, Stripe, Convex, and WorkOS.\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://opensource.org/licenses/MIT\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/License-MIT-blue.svg\" alt=\"License: MIT\"/\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://next-b2b-starter-kit.vercel.app/\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Demo-Website-blue\" alt=\"Demo: Website\"/\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  Demo: \u003ca href=\"https://next-b2b-starter-kit.vercel.app/\"\u003ehttps://next-b2b-starter-kit.vercel.app/\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  Read about the \u003ca href=\"https://workos.com/blog/nextjs-b2b-starter-kit\"\u003eNext.js B2B Starter Kit\u003c/a\u003e on the WorkOS blog.\n\u003c/p\u003e\n\n## Features\n\n- Marketing splash page (`/`)\n- Pricing page (`/pricing`) which allows signed in users to subscribe via Stripe Checkout\n- Dashboard page (`/dashboard`) which is only accessible to admin users. Includes CRUD for users, audit logs and configuring SSO and billing\n- Product page (`/product`) which is only accessible to signed in users\n- Role-based access control\n- Audit logs\n- Billing\n- Webhook syncing to Convex\n\n## Getting started\n\n### Prerequisites\n\nYou'll need a [Convex](https://www.convex.dev/) account, a [Stripe](https://stripe.com/) account and a [WorkOS](https://workos.com/) account.\n\n### Clone the repo\n\n```bash\ngit clone https://github.com/workos/next-b2b-starter-kit.git\n```\n\n### Navigate to the project directory\n\n```bash\ncd next-b2b-starter-kit\n```\n\n### Install dependencies\n\n```bash\npnpm install\n```\n\n### Run the setup script\n\n```bash\npnpm run setup\n```\n\n### Start the development server\n\n```bash\npnpm run dev\n```\n\n## Tech stack\n\n- Framework: Next.js\n- Database: Convex\n- Authentication: AuthKit by WorkOS\n- Payments: Stripe\n\n## App flow\n\nAfter viewing your marketing splash page (`/`) and pricing page (`/pricing`), users sign up before choosing a plan. This is so we can create an organization and link it to a Stripe customer.\n\nOnce signed up, users with the \"admin\" role can access the dashboard (`/dashboard`) where they can manage users, configure SSO and billing, and view audit logs. Note that in the default example, audit logs are only accessible when subscribed to the \"Enterprise\" plan.\n\nUsers without the \"admin\" role are instead redirected to the product page (`/product`) where they can interact with your product.\n\n## Testing\n\nWhen running locally or using the deployed [demo app](https://b2b-starter-kit.vercel.app/), use the following test card numbers for the Stripe Checkout flow:\n\n- Card number: 4242 4242 4242 4242\n- CVC: Any 3 digits\n- Expiration Date: Any future date\n- ZIP: Any 5 digits\n\n## Deploying\n\nOnce you're ready to deploy your app, refer to the [Convex documentation](https://docs.convex.dev/production) for instructions on deploying to hosted solutions like Vercel.\n\nRemember to use your production API keys for both Stripe and WorkOS before deploying to production.\n\n## Need to Sync more data?\n\nLearn more about the syncing system that connects [AuthKit](https://www.authkit.com/) and [Convex](https://www.convex.dev/).\n\nWe made a short video series that covers the full integration.\nCheck it out on [YouTube](https://youtu.be/GGwBSu0XmP0?feature=shared).\n\n[![Sync Data with Webhooks](https://github.com/user-attachments/assets/7a2f2098-fc57-42d1-89dc-f0f00777857a)](https://youtu.be/GGwBSu0XmP0?feature=shared)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fworkos%2Fnext-b2b-starter-kit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fworkos%2Fnext-b2b-starter-kit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fworkos%2Fnext-b2b-starter-kit/lists"}