This is a starter project for Next.js projects with TypeScript, Styled Components, ESlint, Jest, Playwright, commitlint, husky and Docker.
Install the project on your desired environment:
npm install
# or
pnpm install
# or
yarn
To run a development server on your machine do:
npm run dev
# or
pnpm run dev
# or
yarn dev
Go to: Check out the app running in dev mode
To run the development server inside a Docker container do:
docker build -f Dockerfile.dev -t RubenSibon/next-starter:dev .
docker run -p 3000:3000 --name next-starter-dev RubenSibon/next-starter:dev
Or use Docker Compose to run the dev
server and the jest
test suite:
docker compose -f dockerp-compose.dev.yml build
docker compose -f dockerp-compose.dev.yml up
Go to: Check out the app running in dev mode
Open http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying pages/index.js
. The page auto-updates as you edit the file.
To build and start the production server:
npm run build && npm run start
# or
pnpm run build && pnpm run start
# or
yarn build && yarn start
To run the production build inside a Docker container do:
docker build -t RubenSibon/next-starter:latest .
docker run -p 3000:3000 --name next-starter RubenSibon/next-starter:latest
Or use Docker Compose:
docker compose build
docker compose up
In order to ensure this application is up to the highest quality standards some automated system checks are in place:
- Code linting with ESlint (rules);
- Unit testing with Jest (config & directory);
- Integration (end-to-end) testing with Playwright (config & directory);
- Commit linting according to Conventional Commits with commitlint and husky's
commit-msg
hook; - Automatic linting and testing on the
pre-commit
hook;
- Node 16.x
This is a Next.js project bootstrapped with create-next-app
.