All Projects → crazyfactory → Ts React Boilerplate

crazyfactory / Ts React Boilerplate

Licence: mit
Universal React App with Redux 4, Typescript 3, and Webpack 4

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Ts React Boilerplate

Reeakt
A modern React boilerplate to awesome web applications
Stars: ✭ 116 (+11.54%)
Mutual labels:  webpack, hmr, jest, ssr, redux-saga
Ssr Sample
A minimum sample of Server-Side-Rendering, Single-Page-Application and Progressive Web App
Stars: ✭ 285 (+174.04%)
Mutual labels:  webpack, ssr, redux-saga
Ifme
Free, open source mental health communication web app to share experiences with loved ones
Stars: ✭ 1,147 (+1002.88%)
Mutual labels:  webpack, hacktoberfest, jest
Rockpack
Rockpack is a simple solution for creating React Application with Server Side Rendering, bundling, linting, testing within 5 minutes
Stars: ✭ 265 (+154.81%)
Mutual labels:  webpack, jest, ssr
React Redux Boilerplate
Awesome React Redux Workflow Boilerplate with Webpack 4
Stars: ✭ 307 (+195.19%)
Mutual labels:  webpack, jest, redux-saga
Webpack Hot Server Middleware
🔥 Hot reload webpack bundles on the server
Stars: ✭ 319 (+206.73%)
Mutual labels:  webpack, hmr, ssr
Electron React Boilerplate
A Foundation for Scalable Cross-Platform Apps
Stars: ✭ 18,727 (+17906.73%)
Mutual labels:  webpack, hmr, jest
React Study
渐进式学习React生态圈
Stars: ✭ 548 (+426.92%)
Mutual labels:  webpack, hmr, redux-saga
Starter Lapis
Cutting edge starter kit
Stars: ✭ 72 (-30.77%)
Mutual labels:  webpack, jest, redux-saga
Dockest
Docker + Jest integration testing for Node.js
Stars: ✭ 81 (-22.12%)
Mutual labels:  hacktoberfest, jest
Fullstack Shopping Cart
MERN stack shopping cart, written in TypeScript
Stars: ✭ 82 (-21.15%)
Mutual labels:  jest, redux-saga
React Dashboard
🔥React Dashboard - isomorphic admin dashboard template (React.js, Bootstrap, Node.js, GraphQL, React Router, Babel, Webpack, Browsersync) 🔥
Stars: ✭ 1,268 (+1119.23%)
Mutual labels:  webpack, hmr
Alias Hq
The end-to-end solution for configuring, refactoring, maintaining and using path aliases
Stars: ✭ 77 (-25.96%)
Mutual labels:  webpack, jest
Vue Ssr
基于vue-ssr搭建的一套node服务端渲染工作流
Stars: ✭ 78 (-25%)
Mutual labels:  webpack, ssr
Tkframework
react + relay + redux + saga + graphql + webpack
Stars: ✭ 83 (-20.19%)
Mutual labels:  webpack, redux-saga
Babel Test
An opinionated library to make testing babel plugins easier.
Stars: ✭ 79 (-24.04%)
Mutual labels:  hacktoberfest, jest
Github User Search
Browse GitHub users with React
Stars: ✭ 87 (-16.35%)
Mutual labels:  webpack, redux-saga
React Boilerplate
This project is deprecated. Please use CRA instead.
Stars: ✭ 88 (-15.38%)
Mutual labels:  webpack, jest
Mostly
They mostly come at night; mostly.
Stars: ✭ 78 (-25%)
Mutual labels:  webpack, jest
Cookiecutter Webpack
Boilerplate for webpack 2, babel, react + redux + hmr, and karma. Can be inserted into existing django projects.
Stars: ✭ 87 (-16.35%)
Mutual labels:  webpack, hmr

ts-react-boilerplate

Greenkeeper badge Build Status Dependency Status devDependency Status GitHub issues


Based on Vortigern

TypeScript React Redux

Libraries

This boilerplate uses the following libraries and tools:

Core

Utilities

  • Reselect computes derived data, allowing Redux to store the minimal possible state.
  • Redux Saga makes side effects (i.e. asynchronous things like data fetching and impure things like accessing the browser cache) in React/Redux applications easier and better.
  • Isomorphic Fetch with ES6-Promise for using fetch api on both client & server side.
  • React Helmet
  • Sentry Browser captures exceptions during run time.
  • TypeStyle makes css typesafe.

Build System

Dev & Prod Server

Developer Experience

Testing

Doc

  • Storybook - UI component dev & test: React and more.

Directory Structure

.
├── build                       # Built, ready to serve app.
├── config                      # Root folder for configurations.
│   ├── types                   # Global type definitions, written by us.
│   ├── utils                   # Utils for config.
│   ├── webpack                 # Webpack configurations.
│   ├── index.js                # Combines main.js and main.local.js
│   ├── main.js                 # Default App configurations.
│   └── main.local.js           # Local App configurations.
├── node_modules                # Node Packages.
├── src                         # Source code.
│   ├── app                     # App folder.
│   │ ├── components            # Unconnected Components.
│   │ ├── constants             # Constants that are used throughout project like Color and FontSize
│   │ ├── containers            # Redux-Connected Components.
│   │ ├── helpers               # Helper Functions.
│   │ ├── images                # Images folder.
│   │ ├── models                # Models folder.
│   │ ├── pages                 # Page-like Components.
│   │ ├── redux                 # Redux related code aka data layer of the app.
│   │ │   ├── middlewares       # Redux middlewares.     
│   │ │   ├── modules           # Redux modules.     
│   │ │   ├── configureStore.ts # Redux store, contains global app state.
│   │ │   ├── IStore.ts         # Store shape.
│   │ │   └── rootReducer.ts    # Main reducers file to combine them.    
│   │ ├── routes                # Routes.
│   │ ├── sagas                 # Saga files.
│   │ └── selectors             # Redux selectors.
│   ├── vendor                  # Dealing with resources
│   ├── client.tsx              # Entry point for client side rendering.
│   ├── favicon.ico             # Favicon
│   ├── index.html              # html file for client side rendering
│   └── server.tsx              # Entry point for server side rendering.
├── translations                # For json translations.
├── .dockerignore               # Tells docker which files to ignore.
├── .editorconfig               # Configuration for editors.
├── .gitignore                  # Tells git which files to ignore.
├── .travis.yml                 # Travis file.
├── Dockerfile                  # Dockerfile.
├── LICENSE                     # License file
├── package.json                # Package configuration.
├── package-lock.json           # Package lock
├── README.md                   # This file
├── styleguide.config.js        # Config for doc
├── tsconfig.json               # TypeScript transpiler configuration.
└── tslint.json                 # Configures tslint.

Installation

You can clone from this repository and use master

$ git clone https://github.com/crazyfactory/ts-react-boilerplate
$ cd ts-react-boilerplate
$ npm install

Usage

All commands defaults to development environment. You can set NODE_ENV to production or use the shortcuts below.

# Running

$ npm start # This starts the app in development mode

# Starting it with the production build
$ NODE_ENV=production npm start # or
$ npm run start:prod

# Building 

$ npm build # This builds the app in development mode

# Commands below builds the production build
$ NODE_ENV=production npm build # or
$ npm run build:prod

# Testing
$ npm test

# Too see doc, run this command, and go to localhost:6060. Any component that has .md file with the same name will be
# doc-generated.
$ npm run doc

For Windows users, we recommend using the shortcuts instead of setting environment variables because they work a little different on Windows.

Sentry

Create main.local.js in config folder and export an object that has sentry key like so:

module.exports = {
  sentry: {
    dsn: YOUR_DSN,
    release: YOUR_RELEASE_VERSION
  }
  
  // other configs
  ...
}

Credits

This boilerplate is based on Vortigern and is heavily updated. This boilerplate is released under the MIT license.


Crazy Factory

Crazy factory is an online shop which manufactures piercings, jewellery, mobile covers, etc. All at factory prices!

You can contact us at [email protected]

Be sure to check out available jobs at Crazy.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].