{"id":24685196,"url":"https://github.com/guillim/nextjs-boilerplate","last_synced_at":"2025-10-08T14:30:46.020Z","repository":{"id":258358789,"uuid":"862507141","full_name":"guillim/nextjs-boilerplate","owner":"guillim","description":"⭐ NextJS BoilerPlate is a Starter Kit to build ideas in a one hour","archived":false,"fork":false,"pushed_at":"2024-10-24T06:31:50.000Z","size":4210,"stargazers_count":35,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-25T17:01:03.260Z","etag":null,"topics":["boilerplate","nextjs","shipfast-template","solopreneur","starter-kit","starter-template","starterkit","template"],"latest_commit_sha":null,"homepage":"https://nextjsboilerplate-blue.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/guillim.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-24T18:02:45.000Z","updated_at":"2024-10-25T00:49:53.000Z","dependencies_parsed_at":"2024-11-04T17:28:46.745Z","dependency_job_id":null,"html_url":"https://github.com/guillim/nextjs-boilerplate","commit_stats":null,"previous_names":["guillim/nextjs-boilerplate"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guillim%2Fnextjs-boilerplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guillim%2Fnextjs-boilerplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guillim%2Fnextjs-boilerplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guillim%2Fnextjs-boilerplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/guillim","download_url":"https://codeload.github.com/guillim/nextjs-boilerplate/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235718814,"owners_count":19034670,"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":["boilerplate","nextjs","shipfast-template","solopreneur","starter-kit","starter-template","starterkit","template"],"created_at":"2025-01-26T15:18:16.722Z","updated_at":"2025-10-08T14:30:46.014Z","avatar_url":"https://github.com/guillim.png","language":"TypeScript","funding_links":["https://buymeacoffee.com/guillim"],"categories":[],"sub_categories":[],"readme":"# Next.js Boilerplate for SoloPreneurs\n\nA Next.js Starter Kit to build your idea with all you need to `earn $ in 1 hour`.\n\n![Landing Page](public/landingFeatures.png)\n\n### Main Features\n\n- ☀️ Free\n- 👁️ [Landing page](https://nextjsboilerplate-blue.vercel.app/)\n- 🔑 [Google SSO](https://nextjsboilerplate-blue.vercel.app/login) (NextAuth)\n- 💰 Stripe for payments\n- 📂 Postgres with Prisma \n- 📈 Google Analytics\n- 📱 Responsive\n- 📧 Mailgun\n- 📦 SEO ⏳\n- 📝 Blog ⏳\n- 📚 Documentation ⏳\n- 🔑 Customer support : impersonation\n- 🫂 Customer support (chatwoot or chaty) ⏳\n- 🍾 Referral program ⏳\n- 🛠️ Customizable\n\n⏳: Coming soon\n\n### Why Choose This Next.js Boilerplate\n\nAs a solo founder, you need to focus on your product, not the tedious integrations with Stripe, Database, Auth, etc. This Next.js starter kit is designed to help you bypass these tasks and build and publish your product in a day.\n\nAs calculated by Marc Lou, the great inspiration for this project, the time saved is huge: **22 hours**\n\n- 4 hrs to set up emails\n- 6 hrs designing a landing page\n- 4 hrs to handle Stripe webhooks\n- 2 hrs for SEO tags\n- 1 hr applying for Google Oauth\n- 3 hrs for DNS records\n- 2 hrs for protected API routes\n- ∞ hrs researching...\n\n### Pricing\n\nThis boilerplate is forever **Free**\n\nBut if you want to support the project, you can [buy me a coffee ☕️](https://buymeacoffee.com/guillim).\n\n**Costs of Providers**\n\nRunning this project should costs `0 $`. The idea is you can test 10 products without ruining yourself !\n\nThat's why I only selected providers (see [tech stack](#tech-stack) below) with a good free tier (at the time I selected them of course).\n\n\n## Star History\n\n[![Star History Chart](https://api.star-history.com/svg?repos=guillim/nextjs-boilerplate\u0026type=Date)](https://www.star-history.com/#guillim/nextjs-boilerplate\u0026Date)\n\n\n## Get Started\nSetup your environment : \n_Copy the file [.env.example](./.env.example) to [.env](.env) and fill in the variables_\n\n#### Development\nInstall dependencies and run the project :\n```bash\npnpm install\nnpx prisma migrate dev --name init\npnpm run dev\n```\n\nopen [http://localhost:3000/](http://localhost:3000/) to see the result\n\n#### Production\nFor production, we recommend using vercel (see below)\n```bash\npnpm run build\npnpm run start\n```\n## Tech Stack\n\nIt's all Typescript\nIt's the App Router type of Next.js project\nIt uses Postgres, hosted on [Neon](https://neon.tech/) for the database, but you can change it if you want.\nIt's documented to guide you through the process of customizing it.\nIt's React for the frontend, with TailwindCSS for the design.\nIt's easy to be host on [Vercel](https://vercel.com/), but you can change it.\nIt will be automatically deployed on git push, no worries about that, focus on code.\n\n\n- Hosting : Vercel\n\nVisit [vercel](https://vercel.com/signup) to create an account. Choose the free \"hobby\" plan. Select Continue with GitHub to connect your GitHub and Vercel accounts. Read [this page](https://nextjs.org/learn/dashboard-app/setting-up-your-database) if you are stuck\n\n- 📂 Database : Neon\n\nWe do not chose Vercel Postgresql because it's not free. Neon is a great alternative, and it's free. Visit [Neon](https://neon.tech/) to create an account. Choose the free plan. Read [this page](https://neon.tech/docs/guides/nextjs)\n\nWe user [Prisma](https://www.prisma.io/docs/getting-started/setup-prisma/start-from-scratch/relational-databases-typescript-postgresql) to connect to the database. Very useful to be error-proof.\n\nMore info in our [prisma/README.md file](prisma/README.md)\n\n- Landing Page\n\nOnce you run the project, you can access the landing page at [localhost:3000](http://localhost:3000/).\nFeel free to customize it as you want in the folder `(landing-page)`.\n\n![Landing Page](public/landing.png)\n\n- 🔑 Auth\n\nGoogle Auth is already set up. To use it. please follow this [guide](https://authjs.dev/getting-started/authentication/oauth) TLDR, it begins with creating a project on the [Google Cloud Platform](https://console.cloud.google.com/apis/credentials).  \n\nWe recommend reading [NextAuth](https://next-auth.js.org/getting-started/introduction) for other easy ways to authenticate users (google, twitter, github...)\n\n![Landing Page](public/sso.png)\n\n\nImpersonation: For better support, you can log in as any user. Simply add your own user ID to **.env** `NEXT_PUBLIC_ADMIN_USER_ID=` and visit [/login/impersonate](/login/impersonate)\n\n- 💰 Payment : Stripe\n\nWe use Stripe for payments. Please create an account here [Stripe](https://stripe.com/).\nTo make things simpler, Stripe is related to a company, not a user here. So, for every user, a company is automatically created. \n\nFor setup, read this [Stripe Tutorial](https://medium.com/@rakeshdhariwal61/integrating-stripe-payment-gateway-in-next-js-14-a-step-by-step-guide-1bd17d164c2c). Use [the Stripe test card](https://docs.stripe.com/testing) for testing.\n\n\n![billing section](public/billing-screenshot.png)\n\n\u003cdetails\u003e\n\u003csummary\u003eOne click button\u003c/summary\u003e\n\nHow to integrate Stripe button ? You simply need to add this to make the payment work (just change for the correct priceId):\n```react\n\u003cSubscribeComponent \n        priceId=\"price_1Q6U4ZP9VWutz4pQA1UC2ilX\" \n        price=\"10\" \n        description=\"Basic Plan\" /\u003e\n```\nThis is already included in the [billing](/billing) page\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eCustomer Portal\u003c/summary\u003e\n\nDon't worry about handling invoices and managing subscriptions. Stripe has a [customer portal](https://stripe.com/docs/billing/subscriptions/customer-portal) doing that for you. \n\nYou users can connect directly with their email, it looks like this: [https://billing.stripe.com](https://billing.stripe.com/p/session/test_YWNjdF8xR3kxaUZBbHF2S3B4SkN1LF9SOEN5QTN0aGVrNFpWTHExWWNMaW1EWnE5Y29tOE1o0100dW7QNfxX)\n\nThis is already included in the [billing](/billing) page\n\n\u003c/details\u003e\n\u003cbr/\u003e\n\n- 📈 Google Analytics\n\nWe use Google Analytics to track the users. Please create an account here [Google Analytics](https://analytics.google.com/). Then add your id in the [.env](./.env) file\n```markdown\n# Google Analytics\nNEXT_PUBLIC_GOOGLE_ANALYTICS_ID=G-xxxxxxx\n```\n\n- ✉️ Email : Mailgun\nMailgun offers 100 free emails per day which is the biggest free plan we found during our research. Create an account [here](https://signup.mailgun.com/new/signup?plan_name=dev_free\u0026currency=USD). \n    - Create an API key in the [API key section](https://app.mailgun.com/settings/api_security)\n    - Then add it to the [.env](./.env) file\n    - then adapt this piece of code to your needs, but make sure you change 'mail.mydomain.com' to your mail domain as setup in mailgun:\n```ts\n// On your pages/api routes:\nimport { mailgunClientGlobal } from '@/infra/mailgun';\nconst mg = await mailgunClientGlobal\nawait mg.mailgun?.messages.create(\n  'mail.mydomain.com',\n  {...mg.getDefaultValues(), \n    from: 'Excited User \u003cmailgun@mail.mydomain.com\u003e',\n    to: ['contact@mydomain.uk'] }\n);\n```\nNote : If your mail server in not in europe, you may comment out one line here : [mailgun.ts](./infra/mailgun.ts) \n`url: 'https://api.eu.mailgun.net'` since it's specific for EU servers.\n\n- IDE : VScode\n\nWe recommend using VScode for the project, as it's the most popular editor for web development.\nESlint is automatic on save to get a better developer experience.\n\n- Code hosting : Github Repository\n\nTo host your code on Github, please follow this [guide](https://help.github.com/en/github/getting-started-with-github/create-a-repo).\n\n\n### Thanks\n\nIt's based on the Next.js (App Router) starter template.\nFor customisation, see the [course](https://nextjs.org/learn) on the Next.js Website.\n\n### License\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguillim%2Fnextjs-boilerplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fguillim%2Fnextjs-boilerplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguillim%2Fnextjs-boilerplate/lists"}