From 48127423818b51b9e30605b05aab714b0a9c1b7b Mon Sep 17 00:00:00 2001 From: Marc Bernard <59966492+mbtools@users.noreply.github.com> Date: Tue, 10 Sep 2024 17:35:00 -0400 Subject: [PATCH 1/2] chore: update readme with links - Added links for several of the used components - Fixed some spelling and grammar PS: Thanks for this awesome repo! I plan to use it for a project requiring multi-tenancy and this is a great starting point. --- README.md | 60 +++++++++++++++++++++++++++---------------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/README.md b/README.md index 9eae451..2ff8357 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,9 @@
-π Boilerplate and Starter for building SaaS with Next.js using App Router, Tailwind CSS and TypeScript β‘οΈ Made with developer experience first: Next.js, TypeScript, ESLint, Prettier, Husky, Lint-Staged, Vitest (replacing Jest), Testing Library, Commitlint, VSCode, PostCSS, Tailwind CSS, Authentication with [Clerk](https://go.clerk.com/zGlzydF), Database with DrizzleORM (PostgreSQL, SQLite, and MySQL), Error Monitoring with [Sentry](https://sentry.io/for/nextjs/?utm_source=github&utm_medium=paid-community&utm_campaign=general-fy25q1-nextjs&utm_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. +π Boilerplate and Starter for building SaaS with Next.js using App Router, Tailwind CSS, and TypeScript β‘οΈ Made with developer experience first: Next.js, TypeScript, ESLint, Prettier, Husky, Lint-Staged, Vitest (replacing Jest), Testing Library, Commitlint, VSCode, PostCSS, Tailwind CSS, Authentication with [Clerk](https://go.clerk.com/zGlzydF), Database with DrizzleORM (PostgreSQL, SQLite, and MySQL), Error Monitoring with [Sentry](https://sentry.io/for/nextjs/?utm_source=github&utm_medium=paid-community&utm_campaign=general-fy25q1-nextjs&utm_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. -Clone this project and use it to create your own SaaS. You can check the live demo at [SaaS Boilerplate](https://react-saas.com), a demo with a working authentication and multi-tenancy system. +Clone this project and use it to create your own SaaS. You can check the live demo at [SaaS Boilerplate](https://react-saas.com), which is a demo with a working authentication and multi-tenancy system. ## Sponsors @@ -79,7 +79,7 @@ Developer experience first, extremely flexible code structure and only keep what - β‘ [Next.js](https://nextjs.org) with App Router support - π₯ Type checking [TypeScript](https://www.typescriptlang.org) - π Integrate with [Tailwind CSS](https://tailwindcss.com) and Shadcn UI -- β Strict Mode for TypeScript and React 18 +- β Strict Mode for TypeScript and [React 18](https://reactjs.org/) - π Authentication with [Clerk](https://go.clerk.com/zGlzydF): Sign up, Sign in, Sign out, Forgot password, Reset password, and more. - π€ Passwordless Authentication with Magic Links, Multi-Factor Auth (MFA), Social Auth (Google, Facebook, Twitter, GitHub, Apple, and more), Passwordless login with Passkeys, User Impersonation - π₯ Multi-tenancy & team support: create, switch, update organization and invite team members @@ -88,32 +88,32 @@ Developer experience first, extremely flexible code structure and only keep what - π¦ Type-safe ORM with DrizzleORM, compatible with PostgreSQL, SQLite, and MySQL - π Multi-language (i18n) with [next-intl](https://next-intl-docs.vercel.app/) and [Crowdin](https://l.crowdin.com/next-js) - β»οΈ Type-safe environment variables with T3 Env -- β¨οΈ Form with React Hook Form -- π΄ Validation library with Zod +- β¨οΈ Form with [React Hook Form](https://www.react-hook-form.com/) +- π΄ Validation library with [Zod](https://zod.dev/) - π Linter with [ESLint](https://eslint.org) (default NextJS, NextJS Core Web Vitals, Tailwind CSS and Airbnb configuration) - π Code Formatter with [Prettier](https://prettier.io) -- π¦ Husky for Git Hooks +- π¦ [Husky](https://typicode.github.io/husky/) for Git Hooks - π« Lint-staged for running linters on Git staged files -- π Lint git commit with Commitlint -- π Write standard compliant commit messages with Commitizen -- π¦Ί Unit Testing with Vitest and React Testing Library -- π§ͺ Integration and E2E Testing with Playwright -- π· Run tests on pull request with GitHub Actions -- π Storybook for UI development +- π Lint git commit with [Commitlint](https://commitlint.js.org/) +- π Write standard compliant commit messages with [Commitizen](https://github.com/commitizen/cz-cli) +- π¦Ί Unit Testing with [Vitest](https://vitest.dev/) and [React Testing Library](https://testing-library.com/react) +- π§ͺ Integration and E2E Testing with [Playwright](https://playwright.dev/) +- π· Run tests on pull requests with [GitHub Actions](https://github.com/features/actions) +- π [Storybook](https://storybook.js.org/) for UI development - π¨ Error Monitoring with [Sentry](https://sentry.io/for/nextjs/?utm_source=github&utm_medium=paid-community&utm_campaign=general-fy25q1-nextjs&utm_content=github-banner-nextjsboilerplate-logo) - βοΈ Code coverage with [Codecov](https://about.codecov.io/codecov-free-trial/?utm_source=github&utm_medium=paid-community&utm_campaign=general-fy25q1-nextjs&utm_content=github-banner-nextjsboilerplate-logo) -- π Logging with Pino.js and Log Management with [Better Stack](https://betterstack.com/?utm_source=github&utm_medium=sponsorship&utm_campaign=next-js-boilerplate) +- π Logging with [Pino.js](https://getpino.io/) and Log Management with [Better Stack](https://betterstack.com/?utm_source=github&utm_medium=sponsorship&utm_campaign=next-js-boilerplate) - π₯οΈ Monitoring as Code with [Checkly](https://www.checklyhq.com/?utm_source=github&utm_medium=sponsorship&utm_campaign=next-js-boilerplate) -- π Automatic changelog generation with Semantic Release -- π Visual testing with Percy (Optional) +- π Automatic changelog generation with [Semantic Release](https://semantic-release.gitbook.io/semantic-release) +- π Visual testing with [Percy](https://percy.io/) (Optional) - π‘ Absolute Imports using `@` prefix - π VSCode configuration: Debug, Settings, Tasks and Extensions - π€ SEO metadata, JSON-LD and Open Graph tags -- πΊοΈ Sitemap.xml and robots.txt -- β Database exploration with Drizzle Studio and CLI migration tool with Drizzle Kit +- πΊοΈ [Sitemap.xml](https://www.sitemaps.org/) and [robots.txt](https://en.wikipedia.org/wiki/Robots.txt) +- β Database exploration with [Drizzle Studio](https://orm.drizzle.team/drizzle-studio/overview) and CLI migration tool with [Drizzle Kit](https://orm.drizzle.team/) - βοΈ [Bundler Analyzer](https://www.npmjs.com/package/@next/bundle-analyzer) - π Include a FREE minimalist theme -- π― Maximize lighthouse score +- π― Maximize [lighthouse score](https://developer.chrome.com/docs/lighthouse) Built-in feature from Next.js: @@ -174,9 +174,9 @@ The project uses DrizzleORM, a type-safe ORM compatible with PostgreSQL, SQLite, For 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. -To 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 > API. Then, in your GitHub Actions, you need to define the following environment variables `CROWDIN_PROJECT_ID` and `CROWDIN_PERSONAL_TOKEN`. +To 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 be required to create new Personal Access Tokens by going to Account Settings > API. Then, in your GitHub Actions, you need to define the following environment variables `CROWDIN_PROJECT_ID` and `CROWDIN_PERSONAL_TOKEN`. -After 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. +After defining the environment variables in your GitHub Actions, your localization files will be synchronized with Crowdin every time you push a new commit to the `main` branch. ### Project structure @@ -209,7 +209,7 @@ After defining the environment variables in your GitHub Actions, your localizati ### Customization -You can easily configure Next.js SaaS 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: +You can easily configure Next.js SaaS Boilerplate by making a search in the whole project with `FIXME:` for quick customization. Here are some of the most important files to customize: - `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/ - `src/utils/AppConfig.ts`: configuration file @@ -217,7 +217,7 @@ You can easily configure Next.js SaaS Boilerplate by making a search in the whol - `next.config.mjs`: Next.js configuration - `.env`: default environment variables -You 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 π. +You have access to the whole code source if you need further customization. The provided code is only an example for you to start your project. The sky is the limit π. ### Commit Message Format @@ -292,21 +292,21 @@ The command starts a local server with the production build. Then, you can now o The project uses [Sentry](https://sentry.io/for/nextjs/?utm_source=github&utm_medium=paid-community&utm_campaign=general-fy25q1-nextjs&utm_content=github-banner-nextjsboilerplate-logo) to monitor errors. For development environment, you don't need to do anything: NextJS SaaS 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. -For 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`. +For 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` attributes 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`. ### Code coverage NextJS Boilerplate relies on [Codecov](https://about.codecov.io/codecov-free-trial/?utm_source=github&utm_medium=paid-community&utm_campaign=general-fy25q1-nextjs&utm_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. -Be sure to create the `CODECOV_TOKEN` as a Github Actions secret, do not paste it directly into your source code. +Be sure to create the `CODECOV_TOKEN` as a GitHub Actions secret, do not paste it directly into your source code. ### Logging The project uses Pino.js for logging. By default, for development environment, the logs are displayed in the console. -For production environment, the project is already integrated with [Better Stack](https://betterstack.com/?utm_source=github&utm_medium=sponsorship&utm_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&utm_medium=sponsorship&utm_campaign=next-js-boilerplate) account and create a new source: go to your Better Stack Logs Dashboard > Sources > Connect source. Then, you need to give a name to your source and select Node.js as the platform. +For the production environment, the project is already integrated with [Better Stack](https://betterstack.com/?utm_source=github&utm_medium=sponsorship&utm_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&utm_medium=sponsorship&utm_campaign=next-js-boilerplate) account and create a new source: go to your Better Stack Logs Dashboard > Sources > Connect source. Then, you need to give a name to your source and select Node.js as the platform. -After 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. +After creating the source, you able to see your source token and copy it. Then, in your environment variables, you can paste the token in `LOGTAIL_SOURCE_TOKEN` variable. Now, all your logs will be automatically sent and ingested by Better Stack. ### Checkly monitoring @@ -340,15 +340,15 @@ Then, you can open https://local.drizzle.studio with your favorite browser to ex ### VSCode information (optional) -If 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. +If you are VSCode user, 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. -With 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. +With the plugins installed on your VSCode, ESLint, and Prettier can automatically fix the code and show you the errors. The same goes for testing, you can install the VSCode Vitest extension to automatically run your tests and it also shows the code coverage in context. -Pro tips: if you need a project wide type checking with TypeScript, you can run a build with Cmd + Shift + B on Mac. +Pro tips: if you need a project-wide type checking with TypeScript, you can run a build with Cmd + Shift + B on Mac. ### Contributions -Everyone 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. +Everyone is welcome to contribute to this project. Feel free to open an issue if you have a question or find a bug. Totally open to any suggestions and improvements. ### License From 73c1988de5456f007eebc8610b02bae8c4806862 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Weng?=