This is a Next.js project template bootstrapped
with create-next-app
by Gian Luca Pecile.
The project is based on Next.js, a React framework for production. It uses TypeScript and Tailwind CSS.
Commits are linted using Husky and commitlint, therefore conventional commits are mandatory in order to use the template's default config.
The package manager is pnpm, so you need to install it first using the following command:
make depsThis command will try to install pnpm globally using the existing npm version and then proceed to
run pnpm install.
If you have pnpm installed globally already, you can run:
make installBehind the scenes, this will do a pnpm install of the package.json dependencies, creating a node_module folder
locally.
No environment variables are required to run the template. These should be added to a .env file in the root of the
project
and should be prefixed with NEXT_PUBLIC_ to be available in the client-side code.
NEXT_PUBLIC_YOUR_ENV_VARIABLEThe following table describes each environment variable:
| Variable | Description |
|---|---|
NEXT_PUBLIC_YOUR_ENV_VARIABLE |
Example env variable. |
Run the following command to create a .env file based on .env.example with the required environment variables:
make create_envThis will create a .env file with the required environment variables. Make sure to update the values of the variables
in the .env file to match your environment.
To start a development build of the webapp, run:
make devThis runs next dev, which starts the application in development mode with hot-code reloading, error reporting, and
more.
Then open http://localhost:3000 with your browser to view the application.
Make sure to update environment variables in .env to match your environment. See .env.example for an example of
which variables are required. For more information, see the Environment Variables section.
To lint the webapp, run:
make lintThis runs next lint, which runs ESLint on the pages and components in the webapp and reports any linting errors.
Make sure to fix all linting errors before submitting a pull request.
Dependencies are updated via renovate. The config setup allows for instant merge of miscellaneous minor dependencies and issues for major ones which should be done manually.
Additionally, you can run:
make up_next up_biomeTo update both the next and biome dependencies using their official helper scripts.
To run the production build of the webapp, run:
make buildThis runs next build, which generates an optimized version of your application for production. HTML, CSS, and
JavaScript files are created based on your pages. JavaScript is compiled and browser bundles are minified using the
Next.js Compiler to help achieve the best performance and support all modern
browsers1.
To start the production build of the webapp, run:
make startThis runs next start, which starts the Node.js server. This server supports all Next.js
features2.
Alternatively, you can run:
make deployThis runs next build && next start, which builds and starts the application in production mode.
Then open http://localhost:3000 with your browser to view the application.
To run the webapp in a different port, run:
make start PORT=3069or:
make deploy PORT=3069This starts the application in production mode in port 3069.
To make this template your own, you SHOULD:
- Update the
name,description,authorandrepositoryfields inpackage.json. - Edit the
site.tsfile in thesrc/configfolder to match your site's information.
The site.ts file contains the following options:
| Option | Description |
|---|---|
title |
The title of the site. |
description |
The description of the site. |
emoji |
The emoji to be displayed as the favicon of the site. |
backgroundColor |
The background color of the site. |
themeColor |
The theme color of the site. |
siteUrl |
The URL of the site. |
mainNav |
The values to be used in the main navigation bar of the site with the shape { title, href }. |
links |
Social media links to be used throughout the app, these include by default twitter, telegram, github and docs. Extend as needed. |
- Shadcn for ui, the beautifully designed components.
- Manu Arora for aceternity ui components.