Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/desmondhiew00/react-typescript-boilerplate


https://github.com/desmondhiew00/react-typescript-boilerplate

antd formik i18next react redux resolver tailwind-css typescript

Last synced: 13 days ago
JSON representation

Awesome Lists containing this project

README

        

React Boilerplate Meets CRA

Crafted for highly scalable & performant and easily maintainable React.js applications

with a focus on
best DX and best practices.




Build Status


Tests Status


Release Status


Coverage



Dependency Status


Backers


Sponsors


---

The official [Create React App](https://github.com/facebook/create-react-app) template of [React Boilerplate](https://github.com/react-boilerplate/react-boilerplate)
![](https://img.shields.io/github/stars/react-boilerplate/react-boilerplate?style=flat)
![](https://img.shields.io/github/contributors/react-boilerplate/react-boilerplate)

Start your `create-react-app` projects in seconds with the best, industry-standard tools and practices made ready for you.

**πŸ“šDocumentation:** [Gitbook](https://cansahin.gitbook.io/react-boilerplate-cra-template/)

**🎨 Check the example app:** [Boilerplate Example Application](https://react-boilerplate.github.io/react-boilerplate-cra-template/)

**πŸš‘ Collection of `'HOW TO'`s:** [Examples & Tutorials for common patterns](https://github.com/react-boilerplate/cra-template-examples)

**πŸ“¦ Package:** [npm](https://www.npmjs.com/package/cra-template-rb)

![version](https://img.shields.io/npm/v/cra-template-rb)
![version](https://img.shields.io/npm/dm/cra-template-rb)

---

## Install & Start

Create React App with the template

```shell
yarn
```

Start

```shell
yarn start
```

## Structure

```
.
β”œβ”€β”€ config # Webpack and env Configurations
β”œβ”€β”€ src # App source code
β”‚ β”œβ”€β”€ api # All of restful API
β”‚ β”œβ”€β”€ assets # Assets (e.g. images, etc.)
β”‚ β”œβ”€β”€ components # Reusable components
β”‚ β”‚ β”œβ”€β”€ form # Reusable formik input components
β”‚ β”‚ β”‚ β”œβ”€β”€ component #
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ style #
β”‚ β”‚ β”‚ β”‚ β”‚ └── index.scss # Component's main styling
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ index.tsx # Main component
β”‚ β”‚ β”‚ β”‚ └── Loadable.tsx # Lazy load component
β”‚ β”‚ β”œβ”€β”€ component #
β”‚ β”‚ β”‚ β”œβ”€β”€ style #
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ index.scss #
β”‚ β”‚ β”‚ β”œβ”€β”€ index.tsx #
β”‚ β”‚ β”‚ └── Loadable.tsx #
β”‚ β”œβ”€β”€ constants # App's static variables
β”‚ β”œβ”€β”€ locales # I18next configuration, languages
β”‚ β”œβ”€β”€ modules # App modules
β”‚ β”‚ └── module # App modules
β”‚ β”‚ β”‚ β”œβ”€β”€ components #
β”‚ β”‚ β”‚ β”‚ └── component #
β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ style #
β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ └── index.scss #
β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ index.tsx #
β”‚ β”‚ β”‚ β”‚ β”‚ └── Loadable.tsx #
β”‚ β”‚ β”‚ β”œβ”€β”€ containers #
β”‚ β”‚ β”‚ β”‚ └── container #
β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ style #
β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ └── index.scss #
β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ index.tsx #
β”‚ β”‚ β”‚ β”‚ β”‚ └── Loadable.tsx #
β”‚ β”‚ β”‚ └── index.ts #
β”‚ β”œβ”€β”€ store # Redux store configuration
β”‚ β”‚ β”œβ”€β”€ actions # All store actions
β”‚ β”‚ β”œβ”€β”€ reducers # All store reducers
β”‚ β”‚ β”œβ”€β”€ types # Reducer types (for typescript)
β”‚ β”‚ └── reducer.ts # Main reducer (combine reducers)
β”‚ β”œβ”€β”€ styles #
β”‚ β”‚ └── main.scss # App main styling
β”‚ β”œβ”€β”€ utils #
β”‚ β”‚ └── utils.ts # Common utilities function (helper)
β”œβ”€β”€ .eslintrc.js # Eslint configuration
β”œβ”€β”€ .tsconfig.json # Typescript configuration
β”œβ”€β”€ .tailwind.config.js # Tailwind CSS configuration
β”œβ”€β”€ .env # Env for development
β”œβ”€β”€ .env.local # Env for local development
└── .env.production # Env for production
```

## Features
```
- React
- Redux
- Typescript
- i18n
- Tailwind CSS
- Path Resolver
- Formik
- Antd 4.0
```


Predictable state management

Unidirectional data flow allows for change logging and time travel debugging.

Instant feedback

Enjoy the best DX (Developer eXperience) and code your app at the speed of thought! Your saved changes to the CSS and JS are reflected instantaneously without refreshing the page. Preserve application state even when you update something in the underlying code!

Next generation CSS

Write composable CSS that's co-located with your components for complete modularity. Unique generated class names keep the specificity low while eliminating style clashes. Ship only the styles that are on the page for the best performance.

Industry-standard routing

It's natural to want to add pages (e.g. `/about`) to your application, and routing makes this possible.

Industry-standard i18n internationalization support

Scalable apps need to support multiple languages, easily add and support multiple languages.

Typescript

Typescript is the key to scalability. Build self-documented code, easy-to-debug code and create maintainable large applications and codebases with a highly productive development experience.

Quick scaffolding

Create components, containers, routes, selectors and sagas - and their tests - right from the CLI!

Static code analysis

Focus on writing new features without worrying about formatting or code quality. With the right editor setup, your code will automatically be formatted and linted as you work.

SEO

We support SEO (document head tags management) for search engines that support indexing of JavaScript content. (eg. Google)

But wait... there's more!

- _The best test setup:_ Automatically guarantee code quality and non-breaking
changes. (Seen a react app with 100% test coverage before?)
- _The fastest fonts:_ Say goodbye to vacant text.
- _Stay fast_: Profile your app's performance from the comfort of your command
line!

Keywords: Create React App, React Boilerplate, Custom Template, Typescript, React.js, Redux, Hot Reloading, ESNext, Babel, react-router, Offline First, ServiceWorker, `styled-components`, redux-saga, FontFaceObserver, Tailwind CSS, Formik, Path resolver