Skip to content
/ next-enterprise Public template

The Next.js Enterprise Boilerplate is a feature-rich and open-source template designed specifically for enterprise projects

License

Notifications You must be signed in to change notification settings

HigorAlves/next-enterprise

Repository files navigation

Next.js Enterprise Boilerplate

Welcome to the Next.js Enterprise Boilerplate, an open-source template for enterprise projects! It's loaded with features that'll help you build a high-performance, maintainable, and enjoyable app. We've done all the heavy lifting for you, so sit back, relax, and get ready to conquer the world with your incredible app! 🌍

📚 Features

With this template, you get all the awesomeness you need:

  • 🏎️ Next.js - Fast by default, with config optimized for performance
  • 💅 Mantine - A fully featured React components library with dark mode support
  • ESlint and Prettier - For clean, consistent, and error-free code
  • 🛠️ Extremely strict TypeScript - With ts-reset library for ultimate type safety
  • 📊 Bundle analyzer plugin - Keep an eye on your bundle size
  • 🧪 Jest and React Testing Library - For rock-solid unit and integration tests
  • 🎭 Cypress - Write end-to-end tests like a pro
  • 📕 Storybook - Create, test, and showcase your components
  • 🌬️ Smoke Testing and Acceptance Tests - For confidence in your deployments
  • 📝 Conventional commits git hook - Keep your commit history neat and tidy
  • 🔍 Observability - Open Telemetry integration for seamless monitoring
  • 🎯 Absolute imports - No more spaghetti imports
  • 🐛 Sentry - Sentry is a developer-first error tracking and performance monitoring platform.
  • ❤️️ * *Health checks ** - Kubernetes-compatible for robust deployments
  • 🤖 Dependa BOT - Auto-updating dependencies, so you can focus on coding
  • 🩹 Patch-package - Fix external dependencies without losing your mind
  • 📈 Components coupling and cohesion graph - A tool for managing component relationships
  • 🚀 GitHub Actions - Pre-configured actions for smooth workflows, including Bundle Size and performance stats
  • 💯 Perfect Lighthouse score - Because performance matters
  • 🚢 Semantic Release - for automatic changelog
  • 💻 T3 Env - Manage your environment variables with ease

Project Setup Guide

This guide provides step-by-step instructions on how to set up your local environment for this project.

Prerequisites

Before you begin, ensure you have the following installed:

Installation

  1. Clone the Repository: Clone the project repository to your local machine using Git.

    git clone [repository URL]
    cd [project directory]
  2. Install Dependencies: Use yarn to install the necessary dependencies.

    yarn install

Running the Project

  1. Development Environment: To start the development server, run:

    yarn dev

    This will start the Next.js development server. You can view your application at http://localhost:3000.

  2. Building for Production: To create a production build, use:

    yarn build

    After building, you can start the production server with:

    yarn start

Testing

  • Run Unit Tests: To execute unit tests, use:

    yarn test
  • End-to-End Testing with Cypress: Open Cypress for interactive testing:

    yarn cypress:open

    Or run Cypress tests headlessly:

    yarn cypress:run

Linting and Code Quality

  • Linting: Check for linting errors with:

    yarn lint
  • Code Quality Audits: Perform security and environment audits:

    yarn audit
    yarn audit:env

Additional Scripts

  • Generate GraphQL Code: To generate GraphQL types and queries, use:

    yarn generate
  • Analyze Bundle Size: Analyze the bundle size with:

    yarn analyze
  • Prepare Environment: Set up your environment variables and hooks:

    yarn prepare:env
  • Release: For semantic versioning and release, run:

    yarn release
  • Check & configure your enviroment

    ## Check your environment
    yarn audit:env
    
    ## Set husky and our code quality tools
    yarn prepare:env
  • This project uses a git hook to enforce conventional commits. To install the git hook, run the following command in the root directory of the project:

    brew install pre-commit
    pre-commit install -t commit-msg

About

The Next.js Enterprise Boilerplate is a feature-rich and open-source template designed specifically for enterprise projects

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published