/nextjs-template

Project template for creating front-end web applications with NextJs and Typescript.

Primary LanguageTypeScriptMIT LicenseMIT

Next.js template

This project template serves as a starting point for building web applications with Next.js, TypeScript, and best practices in place. It comes pre-configured with essential tools to ensure code quality, maintainability, and a streamlined development workflow.

Package License

Features

  • Next.js: A powerful React framework for building server-rendered and statically generated web applications.
  • TypeScript: Static typing with TypeScript, enhancing code quality and developer productivity.
  • Prettier & ESLint: Automatic code formatting and linting for consistent code style and adherence to best practices.
  • Jest: Unit testing framework for ensuring code quality and functionality.
  • Playwright: End-to-end testing framework for comprehensive testing of user interactions and browser behavior.
  • SASS/SCSS: Powerful styling capabilities with variables, mixins, nesting, and more.
  • Husky: Git hooks for running linting and tests before commits, ensuring code quality standards are met.
  • TypeDoc: Automatic generation of TypeScript documentation for improved code clarity and collaboration.

Installation

npm ci

Running

# development
npm run dev

# production mode
npm run build && npm run start

http://localhost:3000/

Testing

Unit tests

Unit tests are written and executed in Jest.

Run unit tests
npm run test

End-to-end tests

End-to-end tests are executed with Playwright and runs in headless mode by default.

Run e2e tests
npm run test:e2e

Developer Notes

  • Prettier will automatically format any staged files when running git commit
    To avoid the pre-commit hook from running you can specify -n when running git commit.

Licensing

This project is licensed under the MIT License. Feel free to customize and use it for your own projects.