Giter Site home page Giter Site logo

fossabot / react-starter-kit Goto Github PK

View Code? Open in Web Editor NEW

This project forked from huynhducduy/react-starter-kit

0.0 1.0 0.0 1.81 MB

Duy's React Starter Kit based on Create React App

Home Page: https://huynhducduy.github.io/react-starter-kit

License: MIT License

HTML 1.04% JavaScript 69.98% Shell 0.09% Dockerfile 0.57% TypeScript 25.12% SCSS 1.35% CSS 1.85%

react-starter-kit's Introduction

Duy's React Starter Kit

DeepSource LGTM Grade Codecov Package.json version GitHub Dependencies FOSSA Status

This project was based on Create React App. (4.0.1 (2020-11-23))

Vite-version / Unbundled Development available at vite branch

Features

Includes all features of CRA, with some opinionated tweaks but provide flexible configurations.

  • Webpack 4 with dynamic import(), react-refresh, modern JSX and build optimizations.
  • Tailwind 2
  • TypeScript 4
  • React 17 with react-router-dom, recoil as state management
  • i18next with locale splitting
  • SASS (with dart-sass), PostCSS with autoprefixer, CSS Module supported and optimizations.
  • Babel in Stage 1 with tree-shaking support for ramda, date-fns
  • ESlint configured to work well with Prettier, Typescript, EditorConfig in multiple environment: IDE (VSCode), compile (start & build)
  • Jest + Enzyme for testing
  • Lintstaged & Husky for automatically lint & formatting
  • VSCode specific settings, extensions & debug launch config
  • Docker, docker-compose with nginx config for development and deployment

Libraries

  • recoil
  • react-router-dom
  • axios
  • ramda
  • date-fns
  • react-helmet-async
  • classnames
  • immer
  • i18next + react-i18next
  • why-did-you-render (for development)
  • react-toastify (with toast util)

Usage

Installation

git clone https://github.com/huynhducduy/react-starter-kit react-app
cd react-app
yarn

or Create a new repository from react-starter-kit

Configure

cp .env.example .env && vi .env

Alias: in tsconfig.json - compilerOptions.paths. Automatically resolve in webpack, jest environment.

Development

With docker: docker-compose up --build -d

Without docker: yarn start

Configure in docker-compose.yml file, default running on port 3000

Running test: yarn test

Debugging tests: yarn test:debug

Lint code & style: yarn lint

Fix code & style: yarn fix

Reinstall entire project: yarn refresh

Production

Build image: sudo docker build -t react-starter-kit .

Run container: sudo docker run --init -dit -p 3000:80 --name react-starter-kit react-starter-kit:latest

Kill and remove: (sudo docker kill react-starter-kit || true) && (sudo docker rm react-starter-kit || true)

Without docker: yarn build, output is located at /build

Analyze output: yarn analyze

Todo

  • Stylelint
  • Upgrade to Webpack 5 (with terser-webpack-plugin 5, html-webpack-plugin 5, postcss-loader 5, sass-loader 11)
  • GraphQL - Relay/Apollo
  • Server-Side rendering
  • PWA - workbox/firebase
  • Storybook?

Issues

  • @typescript-eslint/typescript-estree is not yet compatible with Typescript ^4.2.0, can cause some bugs
  • React.lazy is not yet available for server-side rendering
  • @testing-library/[email protected]" has unmet peer dependency "@testing-library/dom@>=7.21.4".
  • [email protected]" has incorrect peer dependency "react@^16.6.0".
  • [email protected]" has incorrect peer dependency "react-dom@^16.6.0".
  • [email protected]" has incorrect peer dependency "react@^16.13.1".

License

FOSSA Status

react-starter-kit's People

Contributors

dependabot[bot] avatar fossabot avatar huynhducduy avatar

Watchers

 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.