AlessioDeMarino / next-enterprise

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

License:MIT License


Languages

Language:TypeScript 58.7%Language:JavaScript 28.1%Language:Shell 5.8%Language:Dockerfile 4.9%Language:CSS 1.4%Language:HTML 1.0%Language:MDX 0.0%