You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
🚀 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&utm_medium=sponsorship&utm_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&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.
7
+
🚀 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&utm_medium=sponsorship&utm_campaign=nextjs-boilerplate), 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.
8
8
9
9
Clone 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/).
10
10
@@ -21,15 +21,6 @@ Clone this project and use it to create your own [Next.js](https://nextjs.org) p
@@ -111,8 +102,7 @@ Developer experience first, extremely flexible code structure and only keep what
111
102
- ✅ Strict Mode for TypeScript and React 18
112
103
- 🔒 Authentication with [Clerk](https://clerk.com?utm_source=github&utm_medium=sponsorship&utm_campaign=nextjs-boilerplate): Sign up, Sign in, Sign out, Forgot password, Reset password, and more.
113
104
- 👤 Passwordless Authentication with Magic Links, Multi-Factor Auth (MFA), Social Auth (Google, Facebook, Twitter, GitHub, Apple, and more), Passwordless login with Passkeys, User Impersonation
114
-
- 📦 Type-safe ORM with DrizzleORM, compatible with SQLite, PostgreSQL, and MySQL
115
-
- 💽 Global Database with [Turso](https://turso.tech/?utm_source=nextjsstarterbp)
105
+
- 📦 Type-safe ORM with DrizzleORM, compatible with PostgreSQL, SQLite, and MySQL
116
106
- 🌐 Multi-language (i18n) with [next-intl](https://next-intl-docs.vercel.app/) and [Crowdin](https://l.crowdin.com/next-js)
117
107
- ♻️ Type-safe environment variables with T3 Env
118
108
- ⌨️ Form handling with React Hook Form
@@ -151,6 +141,7 @@ Built-in feature from Next.js:
151
141
### Philosophy
152
142
153
143
- Nothing is hidden from you, so you have the freedom to make the necessary adjustments to fit your needs and preferences.
144
+
- Dependencies are updated every month
154
145
- Easy to customize
155
146
- Minimal code
156
147
- SEO-friendly
@@ -170,6 +161,8 @@ cd my-project-name
170
161
npm install
171
162
```
172
163
164
+
For your information, all dependencies are updated every month.
165
+
173
166
Then, you can run the project locally in development mode with live reload by executing:
174
167
175
168
```shell
@@ -191,38 +184,7 @@ Now, you have a fully working authentication system with Next.js: Sign up, Sign
191
184
192
185
### Set up remote database
193
186
194
-
The 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.
195
-
196
-
First, you need to create a Turso account at [Turso.tech](https://turso.tech/?utm_source=nextjsstarterbp) and install the Turso CLI:
197
-
198
-
```shell
199
-
brew install tursodatabase/tap/turso
200
-
turso auth signup # Sign up to Turso
201
-
```
202
-
203
-
Then, create a new database:
204
-
205
-
```shell
206
-
turso db create nextjs-boilerplate
207
-
```
208
-
209
-
Now, you need to update the `DATABASE_URL` in `.env` file with the database URL provided by Turso:
Finally, 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:
219
-
220
-
```shell
221
-
turso db tokens create nextjs-boilerplate
222
-
223
-
# .env.local
224
-
# DATABASE_AUTH_TOKEN=[your-auth-token]
225
-
```
187
+
The project uses DrizzleORM, a type-safe ORM compatible with PostgreSQL, SQLite, and MySQL databases. By default, the project is set up to work seamlessly with PostgreSQL and you can easily choose any PostgreSQL database provider.
226
188
227
189
### Translation (i18n) setup
228
190
@@ -303,18 +265,16 @@ npm run test:e2e
303
265
304
266
### Enable Edge runtime (optional)
305
267
306
-
The App Router folder is compatible with the Edge runtime. You can enable it by uncommenting the following lines `src/app/layouts.tsx`:
268
+
The App Router folder is compatible with the Edge runtime. You can enable it by adding the following lines `src/app/layouts.tsx`:
307
269
308
270
```tsx
309
-
//export const runtime = 'edge';
271
+
exportconst runtime ='edge';
310
272
```
311
273
312
274
For 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`:
After disabling it, you are required to run the migration manually with:
@@ -327,7 +287,7 @@ You also require to run the command each time you want to update the database sc
327
287
328
288
### Deploy to production
329
289
330
-
During 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.
290
+
During 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` need to be defined.
331
291
332
292
Then, you can generate a production build with:
333
293
@@ -426,15 +386,6 @@ See [LICENSE](LICENSE) for more information.
0 commit comments