0xjoaovpsantos / next-ts-boilerplate

Boilerplate mande with NextJS, TypeScripts, Unit Tests and E2E Tests.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Next Project Boilerplate

This project is open-source, you can contribute too :D

💡 About the project:

A boilerplate created by NextJS, TypeScript, unit tests, end to end tests and much more.

🔥 Project patterns

  • Use images webp instead images png because it improve the site optimization in render images.
  • To name the interfaces, it should follow the pattern: I + (component or function name) + Props, for example: IProductProps.

Example Interface

  • Organize imports into assets, components, hooks, styles, etc.

Example Import

  • At each commit, the unit tests and e2e tests run, and for the e2e test to run, the project must be running locally.
  • Do not export components as default, but as a property, but whenever imported, it is not possible to change its name.

Example Export

  • Always check that dependencies not needed for production are as development dependencies.
  • Comment unit tests with //ARRANGE, //ACT and //ASSERT, for better understanding.

Example Unit Test

  • Always use relative REM measurement.

  • Versioning:

    • Use commitlint
    Example CommitLint
  • Code Validation:

    • Husky
    • Lint-staged
  • Code formatting and standardization:

    • Prettier
    • ESLint
    • .editorconfig

💻 Example e2e test with Cypress running

Example e2e test

⚙️ Techs:

  • NextJS
  • TypeScript
  • JavaScript

🎈 Run the project locally

  • Clone the project:
git clone git@github.com:joaovictorpsantos/next-ts-boilerplate.git
  • Download dependencies:
yarn
  • Run app:
yarn dev

Let's share knowledge and grow together!!!



About

Boilerplate mande with NextJS, TypeScripts, Unit Tests and E2E Tests.


Languages

Language:TypeScript 72.1%Language:JavaScript 22.8%Language:Shell 2.8%Language:CSS 2.2%