{"id":22466372,"url":"https://github.com/nexamerchant/docs","last_synced_at":"2025-03-27T15:18:42.047Z","repository":{"id":245076778,"uuid":"817378223","full_name":"NexaMerchant/docs","owner":"NexaMerchant","description":"NexaMerchant Docs","archived":false,"fork":false,"pushed_at":"2024-06-19T15:45:09.000Z","size":8569,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-02-01T19:12:40.701Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://nexamerchant.github.io/docs/","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/NexaMerchant.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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-06-19T15:19:53.000Z","updated_at":"2024-06-19T15:45:11.000Z","dependencies_parsed_at":"2024-06-19T16:19:56.498Z","dependency_job_id":"f1fbb063-0c7a-4799-86b3-48ef2d5268dc","html_url":"https://github.com/NexaMerchant/docs","commit_stats":null,"previous_names":["nexamerchant/docs"],"tags_count":0,"template":false,"template_full_name":"ixartz/Next-js-Boilerplate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NexaMerchant%2Fdocs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NexaMerchant%2Fdocs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NexaMerchant%2Fdocs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NexaMerchant%2Fdocs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NexaMerchant","download_url":"https://codeload.github.com/NexaMerchant/docs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245868325,"owners_count":20685608,"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-12-06T10:11:49.470Z","updated_at":"2025-03-27T15:18:42.011Z","avatar_url":"https://github.com/NexaMerchant.png","language":"TypeScript","funding_links":["https://github.com/sponsors/ixartz"],"categories":[],"sub_categories":[],"readme":"# Boilerplate and Starter for Next.js 14+, Tailwind CSS 3.4, and TypeScript.\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://creativedesignsguru.com/demo/Nextjs-Boilerplate/\"\u003e\u003cimg height=\"300\" src=\"public/assets/images/nextjs-starter-banner.png?raw=true\" alt=\"Next js starter banner\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n🚀 Boilerplate and Starter for Next.js with App Router support, Tailwind CSS, and TypeScript ⚡️ Prioritizing developer experience first: Next.js, TypeScript, ESLint, Prettier, Husky, Lint-Staged, Jest (replaced by Vitest), Testing Library, Commitlint, VSCode, PostCSS, Tailwind CSS, Authentication with [Clerk](https://clerk.com?utm_source=github\u0026utm_medium=sponsorship\u0026utm_campaign=nextjs-boilerplate), Database with DrizzleORM (SQLite, PostgreSQL, and MySQL) and [Turso](https://turso.tech/?utm_source=nextjsstarterbp), Error Monitoring with [Sentry](https://sentry.io/for/nextjs/?utm_source=github\u0026utm_medium=paid-community\u0026utm_campaign=general-fy25q1-nextjs\u0026utm_content=github-banner-nextjsboilerplate-logo), Logging with Pino.js and Log Management, Monitoring as Code, Storybook, Multi-language (i18n), and more. Ready for Next.js 15.\n\nClone this project and use it to create your own [Next.js](https://nextjs.org) project. You can check a [Next js templates demo](https://creativedesignsguru.com/demo/Nextjs-Boilerplate/).\n\n## Sponsors\n\n\u003ctable width=\"100%\"\u003e\n  \u003ctr height=\"187px\"\u003e\n    \u003ctd align=\"center\" width=\"33%\"\u003e\n      \u003ca href=\"https://clerk.com?utm_source=github\u0026utm_medium=sponsorship\u0026utm_campaign=nextjs-boilerplate\"\u003e\n        \u003cpicture\u003e\n          \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://github.com/ixartz/SaaS-Boilerplate/assets/1328388/6fb61971-3bf1-4580-98a0-10bd3f1040a2\"\u003e\n          \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://github.com/ixartz/SaaS-Boilerplate/assets/1328388/f80a8bb5-66da-4772-ad36-5fabc5b02c60\"\u003e\n          \u003cimg alt=\"Clerk – Authentication \u0026 User Management for Next.js\" src=\"https://github.com/ixartz/SaaS-Boilerplate/assets/1328388/f80a8bb5-66da-4772-ad36-5fabc5b02c60\"\u003e\n        \u003c/picture\u003e\n      \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd align=\"center\" width=\"33%\"\u003e\n      \u003ca href=\"https://turso.tech/?utm_source=nextjsstarterbp\"\u003e\n        \u003cpicture\u003e\n          \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"public/assets/images/turso-light.png?raw=true\"\u003e\n          \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"public/assets/images/turso-dark.png?raw=true\"\u003e\n          \u003cimg alt=\"Turso - SQLite for Production\" src=\"public/assets/images/turso-dark.png?raw=true\"\u003e\n        \u003c/picture\u003e\n      \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd align=\"center\" width=\"33%\"\u003e\n      \u003ca href=\"https://l.crowdin.com/next-js\"\u003e\n        \u003cpicture\u003e\n          \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"public/assets/images/crowdin-white.png?raw=true\"\u003e\n          \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"public/assets/images/crowdin-dark.png?raw=true\"\u003e\n          \u003cimg alt=\"Crowdin\" src=\"public/assets/images/crowdin-dark.png?raw=true\"\u003e\n        \u003c/picture\u003e\n      \u003c/a\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr height=\"187px\"\u003e\n    \u003ctd align=\"center\" width=\"33%\"\u003e\n      \u003ca href=\"https://sentry.io/for/nextjs/?utm_source=github\u0026utm_medium=paid-community\u0026utm_campaign=general-fy25q1-nextjs\u0026utm_content=github-banner-nextjsboilerplate-logo\"\u003e\n        \u003cpicture\u003e\n          \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"public/assets/images/sentry-white.png?raw=true\"\u003e\n          \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"public/assets/images/sentry-dark.png?raw=true\"\u003e\n          \u003cimg alt=\"Sentry\" src=\"public/assets/images/sentry-dark.png?raw=true\"\u003e\n        \u003c/picture\u003e\n      \u003c/a\u003e\n      \u003ca href=\"https://about.codecov.io/codecov-free-trial/?utm_source=github\u0026utm_medium=paid-community\u0026utm_campaign=general-fy25q1-nextjs\u0026utm_content=github-banner-nextjsboilerplate-logo\"\u003e\n        \u003cpicture\u003e\n          \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"public/assets/images/codecov-white.svg?raw=true\"\u003e\n          \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"public/assets/images/codecov-dark.svg?raw=true\"\u003e\n          \u003cimg alt=\"Codecov\" src=\"public/assets/images/codecov-dark.svg?raw=true\"\u003e\n        \u003c/picture\u003e\n      \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd align=\"center\" width=\"33%\"\u003e\n      \u003ca href=\"https://posthog.com/?utm_source=github\u0026utm_medium=sponsorship\u0026utm_campaign=next-js-boilerplate\"\u003e\n        \u003cpicture\u003e\n          \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://posthog.com/brand/posthog-logo-white.svg\"\u003e\n          \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://posthog.com/brand/posthog-logo.svg\"\u003e\n          \u003cimg alt=\"PostHog\" src=\"https://posthog.com/brand/posthog-logo.svg\"\u003e\n        \u003c/picture\u003e\n      \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd align=\"center\" width=\"33%\"\u003e\n      \u003ca href=\"https://betterstack.com/?utm_source=github\u0026utm_medium=sponsorship\u0026utm_campaign=next-js-boilerplate\"\u003e\n        \u003cpicture\u003e\n          \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"public/assets/images/better-stack-white.png?raw=true\"\u003e\n          \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"public/assets/images/better-stack-dark.png?raw=true\"\u003e\n          \u003cimg alt=\"Better Stack\" src=\"public/assets/images/better-stack-dark.png?raw=true\"\u003e\n        \u003c/picture\u003e\n      \u003c/a\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr height=\"187px\"\u003e\n    \u003ctd align=\"center\" width=\"33%\"\u003e\n      \u003ca href=\"https://www.checklyhq.com/?utm_source=github\u0026utm_medium=sponsorship\u0026utm_campaign=next-js-boilerplate\"\u003e\n        \u003cpicture\u003e\n          \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"public/assets/images/checkly-logo-dark.png?raw=true\"\u003e\n          \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"public/assets/images/checkly-logo-light.png?raw=true\"\u003e\n          \u003cimg alt=\"Checkly\" src=\"public/assets/images/checkly-logo-light.png?raw=true\"\u003e\n        \u003c/picture\u003e\n      \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd align=\"center\" style=width=\"33%\"\u003e\n      \u003ca href=\"https://nextlessjs.com\"\u003e\n        \u003cimg src=\"public/assets/images/nextlessjs.png?raw=true\" alt=\"React SaaS Boilerplate Next.js\" /\u003e\n      \u003c/a\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr height=\"187px\"\u003e\n    \u003ctd align=\"center\" width=\"33%\"\u003e\n      \u003ca href=\"mailto:contact@creativedesignsguru.com\"\u003e\n        Add your logo here\n      \u003c/a\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n### Features\n\nDeveloper experience first, extremely flexible code structure and only keep what you need:\n\n- ⚡ [Next.js](https://nextjs.org) with App Router support\n- 🔥 Type checking [TypeScript](https://www.typescriptlang.org)\n- 💎 Integrate with [Tailwind CSS](https://tailwindcss.com)\n- ✅ Strict Mode for TypeScript and React 18\n- 🔒 Authentication with [Clerk](https://clerk.com?utm_source=github\u0026utm_medium=sponsorship\u0026utm_campaign=nextjs-boilerplate): Sign up, Sign in, Sign out, Forgot password, Reset password, and more.\n- 👤 Passwordless Authentication with Magic Links, Multi-Factor Auth (MFA), Social Auth (Google, Facebook, Twitter, GitHub, Apple, and more), Passwordless login with Passkeys, User Impersonation\n- 📦 Type-safe ORM with DrizzleORM, compatible with SQLite, PostgreSQL, and MySQL\n- 💽 Global Database with [Turso](https://turso.tech/?utm_source=nextjsstarterbp)\n- 🌐 Multi-language (i18n) with [next-intl](https://next-intl-docs.vercel.app/) and [Crowdin](https://l.crowdin.com/next-js)\n- ♻️ Type-safe environment variables with T3 Env\n- ⌨️ Form handling with React Hook Form\n- 🔴 Validation library with Zod\n- 📏 Linter with [ESLint](https://eslint.org) (default Next.js, Next.js Core Web Vitals, Tailwind CSS and Airbnb configuration)\n- 💖 Code Formatter with [Prettier](https://prettier.io)\n- 🦊 Husky for Git Hooks\n- 🚫 Lint-staged for running linters on Git staged files\n- 🚓 Lint git commit with Commitlint\n- 📓 Write standard compliant commit messages with Commitizen\n- 🦺 Unit Testing with Vitest and React Testing Library\n- 🧪 Integration and E2E Testing with Playwright\n- 👷 Run tests on pull request with GitHub Actions\n- 🎉 Storybook for UI development\n- 🚨 Error Monitoring with [Sentry](https://sentry.io/for/nextjs/?utm_source=github\u0026utm_medium=paid-community\u0026utm_campaign=general-fy25q1-nextjs\u0026utm_content=github-banner-nextjsboilerplate-logo)\n- ☂️ Code coverage with [Codecov](https://about.codecov.io/codecov-free-trial/?utm_source=github\u0026utm_medium=paid-community\u0026utm_campaign=general-fy25q1-nextjs\u0026utm_content=github-banner-nextjsboilerplate-logo)\n- 📝 Logging with Pino.js and Log Management with [Better Stack](https://betterstack.com/?utm_source=github\u0026utm_medium=sponsorship\u0026utm_campaign=next-js-boilerplate)\n- 🖥️ Monitoring as Code with [Checkly](https://www.checklyhq.com/?utm_source=github\u0026utm_medium=sponsorship\u0026utm_campaign=next-js-boilerplate)\n- 🎁 Automatic changelog generation with Semantic Release\n- 🔍 Visual testing with Percy (Optional)\n- 💡 Absolute Imports using `@` prefix\n- 🗂 VSCode configuration: Debug, Settings, Tasks and Extensions\n- 🤖 SEO metadata, JSON-LD and Open Graph tags\n- 🗺️ Sitemap.xml and robots.txt\n- ⌘ Database exploration with Drizzle Studio and CLI migration tool with Drizzle Kit\n- ⚙️ [Bundler Analyzer](https://www.npmjs.com/package/@next/bundle-analyzer)\n- 🌈 Include a FREE minimalist theme\n- 💯 Maximize lighthouse score\n\nBuilt-in feature from Next.js:\n\n- ☕ Minify HTML \u0026 CSS\n- 💨 Live reload\n- ✅ Cache busting\n\n### Philosophy\n\n- Nothing is hidden from you, so you have the freedom to make the necessary adjustments to fit your needs and preferences.\n- Easy to customize\n- Minimal code\n- SEO-friendly\n- 🚀 Production-ready\n\n### Requirements\n\n- Node.js 20+ and npm\n\n### Getting started\n\nRun the following command on your local environment:\n\n```shell\ngit clone --depth=1 https://github.com/ixartz/Next-js-Boilerplate.git my-project-name\ncd my-project-name\nnpm install\n```\n\nThen, you can run the project locally in development mode with live reload by executing:\n\n```shell\nnpm run dev\n```\n\nOpen http://localhost:3000 with your favorite browser to see your project.\n\n### Set up authentication\n\nCreate a Clerk account at [Clerk.com](https://clerk.com?utm_source=github\u0026utm_medium=sponsorship\u0026utm_campaign=nextjs-boilerplate) and create a new application in Clerk Dashboard. Then, copy `NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY` and `CLERK_SECRET_KEY` into `.env.local` file (not tracked by Git):\n\n```shell\nNEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your_clerk_pub_key\nCLERK_SECRET_KEY=your_clerk_secret_key\n```\n\nNow, you have a fully working authentication system with Next.js: Sign up, Sign in, Sign out, Forgot password, Reset password, Update profile, Update password, Update email, Delete account, and more.\n\n### Set up remote database\n\nThe project uses DrizzleORM, a type-safe ORM compatible with SQLite, PostgreSQL, and MySQL databases. By default, the project is set up to work seamlessly with libSQL, and for production purposes, it's integrated with [Turso](https://turso.tech/?utm_source=nextjsstarterbp). The Next.js Boilerplate also enables a smooth transition to an alternative database provider if your project requires it.\n\nFirst, you need to create a Turso account at [Turso.tech](https://turso.tech/?utm_source=nextjsstarterbp) and install the Turso CLI:\n\n```shell\nbrew install tursodatabase/tap/turso\nturso auth signup # Sign up to Turso\n```\n\nThen, create a new database:\n\n```shell\nturso db create nextjs-boilerplate\n```\n\nNow, you need to update the `DATABASE_URL` in `.env` file with the database URL provided by Turso:\n\n```shell\nturso db show nextjs-boilerplate --url\n\n# .env\n# DATABASE_URL=libsql://[RANDOM-CHARS]-[DB-NAME]-[ORG-NAME].turso.io\n```\n\nFinally, you also need to create a new environment variable `DATABASE_AUTH_TOKEN` in `.env.local` (not tracked by Git) with the auth token provided by Turso:\n\n```shell\nturso db tokens create nextjs-boilerplate\n\n# .env.local\n# DATABASE_AUTH_TOKEN=[your-auth-token]\n```\n\n### Translation (i18n) setup\n\nFor translation, the project uses `next-intl` combined with [Crowdin](https://l.crowdin.com/next-js). As a developer, you only need to take care of the English (or another default language) version. Other languages are automatically generated and handled by Crowdin. You can use Crowdin to collaborate with your translation team or translate the messages yourself with the help of machine translation.\n\nTo set up translation (i18n), create an account at [Crowdin.com](https://l.crowdin.com/next-js) and create a new project. In the newly created project, you will able to find the project ID. You'll also require to create a new Personal Access Tokens by going to Account Settings \u003e API. Then, in your GitHub Actions, you need to define the following environment variables `CROWDIN_PROJECT_ID` and `CROWDIN_PERSONAL_TOKEN`.\n\nAfter defining the environment variables in your GitHub Actions, your localization files will be synchronized with Crowdin everytime you push a new commit to the `main` branch.\n\n### Project structure\n\n```shell\n.\n├── README.md                       # README file\n├── .github                         # GitHub folder\n├── .husky                          # Husky configuration\n├── .storybook                      # Storybook folder\n├── .vscode                         # VSCode configuration\n├── migrations                      # Database migrations\n├── public                          # Public assets folder\n├── scripts                         # Scripts folder\n├── src\n│   ├── app                         # Next JS App (App Router)\n│   ├── components                  # React components\n│   ├── libs                        # 3rd party libraries configuration\n│   ├── locales                     # Locales folder (i18n messages)\n│   ├── models                      # Database models\n│   ├── styles                      # Styles folder\n│   ├── templates                   # Templates folder\n│   ├── types                       # Type definitions\n│   ├── utils                       # Utilities folder\n│   └── validations                 # Validation schemas\n├── tests\n│   ├── e2e                         # E2E tests, also includes Monitoring as Code\n│   └── integration                 # Integration tests\n├── tailwind.config.js              # Tailwind CSS configuration\n└── tsconfig.json                   # TypeScript configuration\n```\n\n### Customization\n\nYou can easily configure Next js Boilerplate by making a search in the whole project with `FIXME:` for making quick customization. Here is some of the most important files to customize:\n\n- `public/apple-touch-icon.png`, `public/favicon.ico`, `public/favicon-16x16.png` and `public/favicon-32x32.png`: your website favicon, you can generate from https://favicon.io/favicon-converter/\n- `src/utils/AppConfig.ts`: configuration file\n- `src/templates/BaseTemplate.tsx`: default theme\n- `next.config.mjs`: Next.js configuration\n- `.env`: default environment variables\n\nYou have access to the whole code source if you need further customization. The provided code is only example for you to start your project. The sky is the limit 🚀.\n\n### Commit Message Format\n\nThe project enforces [Conventional Commits](https://www.conventionalcommits.org/) specification. This means that all your commit messages must be formatted according to the specification. To help you write commit messages, the project uses [Commitizen](https://github.com/commitizen/cz-cli), an interactive CLI that guides you through the commit process. To use it, run the following command:\n\n```shell\nnpm run commit\n```\n\nOne of the benefits of using Conventional Commits is that it allows us to automatically generate a `CHANGELOG` file. It also allows us to automatically determine the next version number based on the types of commits that are included in a release.\n\n### Testing\n\nAll unit tests are located with the source code inside the same directory. So, it makes it easier to find them. The project uses Vitest and React Testing Library for unit testing. You can run the tests with:\n\n```shell\nnpm run test\n```\n\n### Integration \u0026 E2E Testing\n\nThe project uses Playwright for Integration and E2E testing. You can run the tests with:\n\n```shell\nnpx playwright install # Only for the first time in a new environment\nnpm run test:e2e\n```\n\n### Enable Edge runtime (optional)\n\nThe App Router folder is compatible with the Edge runtime. You can enable it by uncommenting the following lines `src/app/layouts.tsx`:\n\n```tsx\n// export const runtime = 'edge';\n```\n\nFor your information, the database migration is not compatible with the Edge runtime. So, you need to disable the automatic migration in `src/libs/DB.ts`:\n\n```tsx\nif (process.env.NODE_ENV === 'development') {\n  await migrate(db, { migrationsFolder: './migrations' });\n}\n```\n\nAfter disabling it, you are required to run the migration manually with:\n\n```shell\nnpm run db:migrate\n```\n\nYou also require to run the command each time you want to update the database schema.\n\n### Deploy to production\n\nDuring the build process, the database migration is automatically executed. So, you don't need to run the migration manually. But, in your environment variable, `DATABASE_URL` and `DATABASE_AUTH_TOKEN` need to be defined.\n\nThen, you can generate a production build with:\n\n```shell\n$ npm run build\n```\n\nIt generates an optimized production build of the boilerplate. For testing the generated build, you can run:\n\n```shell\n$ npm run start\n```\n\nYou also need to defined the environment variables `CLERK_SECRET_KEY` using your own key.\n\nThe command starts a local server with the production build. Then, you can now open http://localhost:3000 with your favorite browser to see the project.\n\n### Error Monitoring\n\nThe project uses [Sentry](https://sentry.io/for/nextjs/?utm_source=github\u0026utm_medium=paid-community\u0026utm_campaign=general-fy25q1-nextjs\u0026utm_content=github-banner-nextjsboilerplate-logo) to monitor errors. For development environment, you don't need to do anything: Next.js Boilerplate is already configured to use Sentry and Spotlight (Sentry for Development). All errors will be automatically sent to your local Spotlight instance. So, you can try the Sentry experience locally.\n\nFor production environment, you need to create a Sentry account and create a new project. Then, in `next.config.mjs`, you need to update the `org` and `project` attribute in `withSentryConfig` function. You also need to add your Sentry DSN in `sentry.client.config.ts`, `sentry.edge.config.ts` and `sentry.server.config.ts`.\n\n### Code coverage\n\nNext.js Boilerplate relies on [Codecov](https://about.codecov.io/codecov-free-trial/?utm_source=github\u0026utm_medium=paid-community\u0026utm_campaign=general-fy25q1-nextjs\u0026utm_content=github-banner-nextjsboilerplate-logo) for code coverage reporting solution. To use Codecov, create a Codecov account and connect it to your GitHub account. On your Codecov dashboard, it should display a list of your repositories. Select the repository you want to enable Codecov for and copy the token. Then, in your GitHub Actions, you need to define the `CODECOV_TOKEN` environment variable and paste the token you copied.\n\nBe sure to create the `CODECOV_TOKEN` as a Github Actions secret, do not paste it directly into your source code.\n\n### Logging\n\nThe project uses Pino.js for logging. By default, for development environment, the logs are displayed in the console.\n\nFor production environment, the project is already integrated with [Better Stack](https://betterstack.com/?utm_source=github\u0026utm_medium=sponsorship\u0026utm_campaign=next-js-boilerplate) to manage and query your logs using SQL. To use Better Stack, you need to create a [Better Stack](https://betterstack.com/?utm_source=github\u0026utm_medium=sponsorship\u0026utm_campaign=next-js-boilerplate) account and create a new source: go to your Better Stack Logs Dashboard \u003e Sources \u003e Connect source. Then, you need to give a name to your source and select Node.js as the platform.\n\nAfter creating the source, you able to see your source token and copy it. Then, in your environment variabless, you can paste the token in `LOGTAIL_SOURCE_TOKEN` variable. Now, all your logs will be automatically sent and ingested by Better Stack.\n\n### Checkly monitoring\n\nThe project uses [Checkly](https://www.checklyhq.com/?utm_source=github\u0026utm_medium=sponsorship\u0026utm_campaign=next-js-boilerplate) to ensure that your production environment is always up and running. At regular intervals, Checkly runs the tests ending with `*.check.spec.ts` extension and notifies you if any of the tests fail. Additionally, you have the flexibility to execute tests across multiple locations to ensure that your application is available worldwide.\n\nTo use Checkly, you must first create an account on [their website](https://www.checklyhq.com/?utm_source=github\u0026utm_medium=sponsorship\u0026utm_campaign=next-js-boilerplate). Once you have an account, you can set the `CHECKLY_API_KEY` environment variable in GitHub Actions by generating a new API key in the Checkly Dashboard. Additionally, you will need to define the `CHECKLY_ACCOUNT_ID`, which can also be found in your Checkly Dashboard under User Settings \u003e General.\n\nTo complete the setup, make sure to update the `checkly.config.ts` file with your own email address and production URL.\n\n### Useful commands\n\n#### Bundle Analyzer\n\nNext.js Boilerplate comes with a built-in bundle analyzer. It can be used to analyze the size of your JavaScript bundles. To begin, run the following command:\n\n```shell\nnpm run build-stats\n```\n\nBy running the command, it'll automatically open a new browser window with the results.\n\n#### Database Studio\n\nThe project is already configured with Drizzle Studio to explore the database. You can run the following command to open the database studio:\n\n```shell\nnpm run db:studio\n```\n\nThen, you can open https://local.drizzle.studio with your favorite browser to explore your database.\n\n### VSCode information (optional)\n\nIf you are VSCode users, you can have a better integration with VSCode by installing the suggested extension in `.vscode/extension.json`. The starter code comes up with Settings for a seamless integration with VSCode. The Debug configuration is also provided for frontend and backend debugging experience.\n\nWith the plugins installed on your VSCode, ESLint and Prettier can automatically fix the code and show you the errors. Same goes for testing, you can install VSCode Vitest extension to automatically run your tests and it also show the code coverage in context.\n\nPro tips: if you need a project wide type checking with TypeScript, you can run a build with \u003ckbd\u003eCmd\u003c/kbd\u003e + \u003ckbd\u003eShift\u003c/kbd\u003e + \u003ckbd\u003eB\u003c/kbd\u003e on Mac.\n\n### Contributions\n\nEveryone is welcome to contribute to this project. Feel free to open an issue if you have question or found a bug. Totally open to any suggestions and improvements.\n\n### License\n\nLicensed under the MIT License, Copyright © 2024\n\nSee [LICENSE](LICENSE) for more information.\n\n## Sponsors\n\n\u003ctable width=\"100%\"\u003e\n  \u003ctr height=\"187px\"\u003e\n    \u003ctd align=\"center\" width=\"33%\"\u003e\n      \u003ca href=\"https://clerk.com?utm_source=github\u0026utm_medium=sponsorship\u0026utm_campaign=nextjs-boilerplate\"\u003e\n        \u003cpicture\u003e\n          \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://github.com/ixartz/SaaS-Boilerplate/assets/1328388/6fb61971-3bf1-4580-98a0-10bd3f1040a2\"\u003e\n          \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://github.com/ixartz/SaaS-Boilerplate/assets/1328388/f80a8bb5-66da-4772-ad36-5fabc5b02c60\"\u003e\n          \u003cimg alt=\"Clerk – Authentication \u0026 User Management for Next.js\" src=\"https://github.com/ixartz/SaaS-Boilerplate/assets/1328388/f80a8bb5-66da-4772-ad36-5fabc5b02c60\"\u003e\n        \u003c/picture\u003e\n      \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd align=\"center\" width=\"33%\"\u003e\n      \u003ca href=\"https://turso.tech/?utm_source=nextjsstarterbp\"\u003e\n        \u003cpicture\u003e\n          \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"public/assets/images/turso-light.png?raw=true\"\u003e\n          \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"public/assets/images/turso-dark.png?raw=true\"\u003e\n          \u003cimg alt=\"Turso - SQLite for Production\" src=\"public/assets/images/turso-dark.png?raw=true\"\u003e\n        \u003c/picture\u003e\n      \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd align=\"center\" width=\"33%\"\u003e\n      \u003ca href=\"https://l.crowdin.com/next-js\"\u003e\n        \u003cpicture\u003e\n          \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"public/assets/images/crowdin-white.png?raw=true\"\u003e\n          \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"public/assets/images/crowdin-dark.png?raw=true\"\u003e\n          \u003cimg alt=\"Crowdin\" src=\"public/assets/images/crowdin-dark.png?raw=true\"\u003e\n        \u003c/picture\u003e\n      \u003c/a\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr height=\"187px\"\u003e\n    \u003ctd align=\"center\" width=\"33%\"\u003e\n      \u003ca href=\"https://sentry.io/for/nextjs/?utm_source=github\u0026utm_medium=paid-community\u0026utm_campaign=general-fy25q1-nextjs\u0026utm_content=github-banner-nextjsboilerplate-logo\"\u003e\n        \u003cpicture\u003e\n          \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"public/assets/images/sentry-white.png?raw=true\"\u003e\n          \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"public/assets/images/sentry-dark.png?raw=true\"\u003e\n          \u003cimg alt=\"Sentry\" src=\"public/assets/images/sentry-dark.png?raw=true\"\u003e\n        \u003c/picture\u003e\n      \u003c/a\u003e\n      \u003ca href=\"https://about.codecov.io/codecov-free-trial/?utm_source=github\u0026utm_medium=paid-community\u0026utm_campaign=general-fy25q1-nextjs\u0026utm_content=github-banner-nextjsboilerplate-logo\"\u003e\n        \u003cpicture\u003e\n          \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"public/assets/images/codecov-white.svg?raw=true\"\u003e\n          \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"public/assets/images/codecov-dark.svg?raw=true\"\u003e\n          \u003cimg alt=\"Codecov\" src=\"public/assets/images/codecov-dark.svg?raw=true\"\u003e\n        \u003c/picture\u003e\n      \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd align=\"center\" width=\"33%\"\u003e\n      \u003ca href=\"https://posthog.com/?utm_source=github\u0026utm_medium=sponsorship\u0026utm_campaign=next-js-boilerplate\"\u003e\n        \u003cpicture\u003e\n          \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://posthog.com/brand/posthog-logo-white.svg\"\u003e\n          \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://posthog.com/brand/posthog-logo.svg\"\u003e\n          \u003cimg alt=\"PostHog\" src=\"https://posthog.com/brand/posthog-logo.svg\"\u003e\n        \u003c/picture\u003e\n      \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd align=\"center\" width=\"33%\"\u003e\n      \u003ca href=\"https://betterstack.com/?utm_source=github\u0026utm_medium=sponsorship\u0026utm_campaign=next-js-boilerplate\"\u003e\n        \u003cpicture\u003e\n          \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"public/assets/images/better-stack-white.png?raw=true\"\u003e\n          \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"public/assets/images/better-stack-dark.png?raw=true\"\u003e\n          \u003cimg alt=\"Better Stack\" src=\"public/assets/images/better-stack-dark.png?raw=true\"\u003e\n        \u003c/picture\u003e\n      \u003c/a\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr height=\"187px\"\u003e\n    \u003ctd align=\"center\" width=\"33%\"\u003e\n      \u003ca href=\"https://www.checklyhq.com/?utm_source=github\u0026utm_medium=sponsorship\u0026utm_campaign=next-js-boilerplate\"\u003e\n        \u003cpicture\u003e\n          \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"public/assets/images/checkly-logo-dark.png?raw=true\"\u003e\n          \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"public/assets/images/checkly-logo-light.png?raw=true\"\u003e\n          \u003cimg alt=\"Checkly\" src=\"public/assets/images/checkly-logo-light.png?raw=true\"\u003e\n        \u003c/picture\u003e\n      \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd align=\"center\" style=width=\"33%\"\u003e\n      \u003ca href=\"https://nextlessjs.com\"\u003e\n        \u003cimg src=\"public/assets/images/nextlessjs.png?raw=true\" alt=\"React SaaS Boilerplate Next.js\" /\u003e\n      \u003c/a\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr height=\"187px\"\u003e\n    \u003ctd align=\"center\" width=\"33%\"\u003e\n      \u003ca href=\"mailto:contact@creativedesignsguru.com\"\u003e\n        Add your logo here\n      \u003c/a\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n---\n\nMade with ♥ by [CreativeDesignsGuru](https://creativedesignsguru.com) [![Twitter](https://img.shields.io/twitter/url/https/twitter.com/cloudposse.svg?style=social\u0026label=Follow%20%40Ixartz)](https://twitter.com/ixartz)\n\n[![Sponsor Next JS Boilerplate](https://cdn.buymeacoffee.com/buttons/default-red.png)](https://github.com/sponsors/ixartz)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnexamerchant%2Fdocs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnexamerchant%2Fdocs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnexamerchant%2Fdocs/lists"}