This is an opinionated Next.js boilerplate project with the following dependencies:
- redux-toolkit (state management)
- tailwindcss (css framework)
- daisyui (css components)
- react-daisyui (react components)
- eslint/prettier (code style)
- release-please-action (automated versioning and changelog)
First, run the development server:
yarn dev
Open http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying pages/index.tsx
. The page auto-updates as you edit the file.
API routes can be accessed on http://localhost:3000/api/hello. This endpoint can be edited in pages/api/hello.ts
.
The pages/api
directory is mapped to /api/*
. Files in this directory are treated as API routes instead of React pages.
This project uses next/font
to automatically optimize and load Inter, a custom Google Font.
Eslint and prettier are used to standardize code style. Other ancillary packages used include:
To lint the project:
yarn lint
To fix most linting issues:
yarn format
Workflows have been included to lint the project on pull request and push to main/develop branches. Git hooks have also been added via husky to ensure direct pushes to main/develop branches are linted.
Git messages conform to the conventional commits specification.
The repository is intended to have a linear develop/main git history. Pull requests are squashed and committed to develop and the commit message is defaulted from the pull request title and description.
Releases are handled via release-please-action.