Next Ts Storybook Boilerplate

screenshot of Next Ts Storybook Boilerplate
nextjs
react
scss

The cure for headaches in development projects on Next.js with TypeScript and Storybook

Overview:

This product is a Next.js boilerplate that comes with TypeScript and Storybook integration. It provides a set of features and configurations to help developers quickly set up their Next.js projects with a solid foundation.

Features:

  • Next.js 11: The boilerplate utilizes the latest version of Next.js, bringing new features and improvements to the development experience.
  • Storybook 6 integrated with Next.js: Storybook is seamlessly integrated into the Next.js project, allowing for easy component development and testing.
  • SCSS globally available variables and mixins: The boilerplate provides SCSS variables and mixins that can be accessed globally throughout the application.
  • SCSS variable imports from JSON files: It allows importing SCSS variables from JSON files, making it easier to manage and share variable values.
  • ESLint with predefined rules: ESLint is set up with predefined rules to ensure code consistency and catch common errors.
  • Stylelint with SCSS and Prettier integration: Stylelint is configured to lint SCSS files and has integration with Prettier to enforce consistent code formatting.
  • Prettier: The boilerplate includes Prettier for code formatting. It is configured to not conflict with ESLint and Stylelint rules.
  • Husky and lint-staged pre-commit hooks: Husky and lint-staged are used to run linters and formatting tools automatically before committing code.
  • Templateman for fast components creation: Templateman is included to provide a convenient way to generate components quickly.
  • Prepared GitHub Actions and Gitlab CI/CD configurations: The boilerplate comes with pre-configured workflows for GitHub Actions and Gitlab CI/CD, making it easier to set up continuous integration and deployment.
  • Prepared example components and directory structure: It provides a set of example components and a well-organized directory structure to give developers a starting point for their projects.

Summary:

This Next.js boilerplate with TypeScript and Storybook integration provides developers with a solid foundation for starting their Next.js projects. It includes various features such as SCSS variables, linting with ESLint and Stylelint, pre-commit hooks, and pre-configured CI/CD workflows. With the provided example components and directory structure, developers can rapidly build their applications using best practices.

nextjs
Next.js

Next.js is a React-based web framework that enables server-side rendering, static site generation, and other powerful features for building modern web applications.

react
React

React is a widely used JavaScript library for building user interfaces and single-page applications. It follows a component-based architecture and uses a virtual DOM to efficiently update and render UI components

scss
SCSS

SCSS is a preprocessor scripting language that extends the capabilities of CSS by adding features such as variables, nesting, and mixins. It allows developers to write more efficient and maintainable CSS code, and helps to streamline the development process by reducing repetition and increasing reusability.

template
Templates & Themes

A template or theme refers to a pre-designed layout or structure that provides a basic framework for building a specific type of application or website. It typically includes good design, placeholder content and functional features, allowing developers to customize and fill in the details according to their specific needs.

eslint
Eslint

ESLint is a linter for JavaScript that analyzes code to detect and report on potential problems and errors, as well as enforce consistent code style and best practices, helping developers to write cleaner, more maintainable code.

Storybook

Storybook is a tool for developing and testing UI components in isolation. It provides a sandbox environment where you can experiment with different props and states to see how your component responds.

Stylelint

Stylelint is a modern linter for CSS that helps you avoid errors and enforce consistent styling conventions. It provides rules for detecting errors and warnings, and can be configured to match your specific project's requirements.

typescript
Typescript

TypeScript is a superset of JavaScript, providing optional static typing, classes, interfaces, and other features that help developers write more maintainable and scalable code. TypeScript's static typing system can catch errors at compile-time, making it easier to build and maintain large applications.