accepted
on 2023-11-27 Adopt best practices from Next.js Enterprise Boilerplate
Context and Problem Statement
Due to the flexibility of react and Next.js, a lot of decisions are left to the developer. As a mature framework, other developers have found best practices for working with Next.js that I can use.
Decision Drivers
- I am new to the Next.js ecosystem
Considered Options
- Use Next.js Enterprise Boilerplate
- Adapt Next.js Enterprise Boilerplate
Decision Outcome
Chosen option: “Adapt Next.js Enterprise Boilerplate”, because I do not need all of their features.
Pros and Cons of the Options
Use Next.js Enterprise Boilerplate
Next.js Enterprise Boilerplate is an open-source template for Next.js.
- Good, because it is complete
- Bad, because it contains features I will not use
Adapt Next.js Enterprise Boilerplate
- Good, because I can use exactly what I need
- Bad, because adapting the project takes time
More Information
The following are the features offered by the template, those with a check mark (✅) I will be using.
- ✅ Next.js with App Router
- ✅ CSS framework
- ✅ Linting and formatting
- ✅
ts-reset
for improved type safety - ✅ Bundle analyzer plugin
- ✅ Unit, integration, and e2e tests
- ✅ Storybook components
- ✅ Conventional commits git hook
- Open Telemetry integration
- ✅ Absolute imports
- Health checks for k8s
- ✅ Radix UI components
- ✅ CVA
- ✅ Auto-updating dependencies
- Patch-package
- Components coupling and cohesion graph
- ✅ GitHub Actions
- Automated ChatGPT Code Reviews
- Semantic Release
- ✅ Environment variable management