Starter Next.js (14+) template for your React projects.
If you like the project, feel free to put a โญ ! If you need help, join the server support.
What's first :
- ๐ Production-ready with a starter file structure !
- ๐ Modern theme using shadcn/ui and with global css variables
- โ๏ธ Responsive navbar
- ๐ Custom UI components (dropdown menus, buttons, headings, toast notifications, ...)
- โณ Loading page and states for buttons
- ๐ Dark/Light/System mode (thanks to next-themes)
- ๐ฎ Private routing
- ๐ Beautiful sign up and sign (with credentials or google account) in pages
- โ Custom error pages (404 and others)
- ๐ก MySQL (or other) database integration
For a better developer experience :
- ๐ฅ Full-stack application with Next.js (minify, live reload, etc.)
- โก TypeScript for type checking
- ๐ฏ 95+ lighthouse score
- ๐จ Integrate with Tailwind CSS (processed by PostCSS)
- โ๏ธ Linter with ESLint and code formatter with Prettier (default configs)
- ๐ก Absolute Imports using
@
prefix - ๐ Authentication system using Prisma and next-auth
- ๐ VSCode settings configuration
- ๐บ๏ธ Sitemap.xml files and robots.txt with next-sitemap
Click on each arrow to see the screenshots :
git clone --depth=1 https://github.com/antoinemcx/React-Nextjs-Boilerplate.git <YOUR_PROJECT_NAME>
cd <YOUR_PROJECT_NAME>
Install the dependencies :
npm install
# or
yarn install
# or
pnpm install
This template uses a database for the authentication of next-auth.
Create the MySQL/MariaDB database and insert the database URL in the .env file.
After creating the database, run following command :
npx prisma migrate deploy
# or
yarn prisma migrate deploy
# or
pnpx prisma migrate deploy
Rename the .env.example file in the root directory into .env.
For more information on what to put in the file, please refer to the configuration guide.
npm run dev
# or
yarn dev
# or
pnpm dev
Now open http://localhost:3000 with your favorite browser to see the application.
Optional : Add a โญ to the repository, it helps a lot. Thanks !
- Configuration : Guide for getting the values for the .env file
- Cleaning : Files to remove to be ready to code
- Prisma migrations : How to create and manage migration files for your database using Prisma
In development, you will mainly use yarn dev
; however, here are all the scripts available :
yarn <script> , npm run <script> or pnpm <script> |
Description |
---|---|
dev |
Launch your app on localhost:300 |
build |
Builds the application for production and regenerate the sitemap |
start |
Serves your app for production or preview |
lint |
Lints the project to review errors before launching |
For any errors found, please contact me here or do a pull request.
This repository is licensed under the MIT License. See the LICENSE
file (here) for more information.