Git Product home page Git Product logo

next-starter's Introduction

next-starter

Next.js starter project with typescript, hooks, eslint, prettier, immer, emotion, jest, cypress and storybook

Features

  • Recommended defaults for typing and linting
  • Store without a library by using react hooks and context api
  • Immer integration for easy updates of immutable data
  • CSS-in-JS with native CSS syntax powered by Emotion
  • Unit tests with Jest and TypeScript
  • Integration tests with Cypress and TypeScript
  • Nice UI's for both test frameworks with real-time watchers via native Cypress and Majestic
  • Storybook with Typescript, React and Hook support
  • Git hooks to prevent committing and pushing bad code

Getting started

  • Clone this repository and cd into it
  • yarn install
  • yarn run dev

All commands

yarn run dev

Runs development server on http://localhost:3000. Page is hot reloading on code changes.

yarn run build

Build application for production use.

yarn run start

Start built application. You need to run build first.

yarn run test

Run all tests.

yarn run test:unit

Run all unit tests with jest.

yarn run test:unit:coverage

Run all unit tests with jest and generate coverage reports. This will fail if constraints coverageThreshold in jest.config.js are violated.

yarn run test:unit:update

Run all unit tests with jest and update all outdated snapshots.

yarn run test:unit:ui

Run majestic server to control jest via its UI.

yarn run test:e2e

Run all integration tests with headless cypress.

yarn run test:e2e:ui

Run all integration tests with cypress UI.

yarn run lint:staged

Run all linters and autofix issues on staged files.

yarn run typecheck

Perform type analysis on all source files.

yarn run storybook

Run Storybook server.

yarn run storybook:build

Build Storybook documentation for production use.

Built upon fabulous libraries and tools

This starter pack has solutions for Rendering, Styling, Routing, Server-Side-Rendering, Type checking, Linting, Testing, Documentation and Building

A great starting point that provides awesome features out-of-the-box. Hightlights are server-side-rendering, seo-readiness, code splitting, routing and prefetching support.

The addition of types to JavaScript allows code-completion and better static code analysis.

Rendering library that makes component-based development easy and fun. Functional components in combination with hooks and context API allow flexible adjustments to many application needs.

In this starter project, hooks and context are used to create a simple and versatile store.

Implicitly used by Next.js

Very easy to use immutable state. Used for custom store implementation.

Full fledged CSS-in-JS solution with native CSS syntax.

Testing framework with many built-in features like code coverage or snaptshot testing.

react-testing-library is included to provide a lightweight toolset for testing react components. It's a great alternative to enzyme.

Additionally, Majestic is used as a UI for Jest.

For Browser-based integration tests. Watches source code and automatically executes all tests on every change. With time-travel and real debugging, also records videos for failing tests.

cypress-testing-library is another lightweight toolset to query dom elements.

Visualize isolated components for development and testing. Also for creating style guides. Addons provide additional benefits like switching between mobile viewports or automatic a11y profiling.

Parse source code and find unwanted patterns. Great way to establish best practices and a common code style.

Complements ESLint to support a consistent and aesthetic code style. Most formatting issues can be automatically fixed.

Handy git hooks to prevent bad git commit or git push.

Foundation of every modern JavaScript application stack. Compiles next-generation code into natively supported code.

Implicitly used by Next.js

next-starter's People

Contributors

alp82 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.