React Starter Kit is an opinionated boilerplate for web development built on top of Facebook's React library, Node.js / Express server and Flux architecture. Containing modern web development tools such as Webpack, Babel and BrowserSync. Helping you to stay productive following the best practices. A solid starting point for both professionals and newcomers to the industry.
Demo: http://demo.reactstarterkit.com | Join #react-starter-kit chatroom on Gitter to stay up to date.
- General
- Questions
- Recipes
.
├── /build/ # The folder for compiled output
├── /docs/ # Documentation files for the project
├── /node_modules/ # 3rd-party libraries and utilities
├── /src/ # The source code of the application
│ ├── /api/ # REST API / Relay endpoints
│ ├── /actions/ # Action creators that allow to trigger a dispatch to stores
│ ├── /components/ # React components
│ ├── /constants/ # Constants (action types etc.)
│ ├── /content/ # Static content (plain HTML or Markdown, Jade, you name it)
│ ├── /core/ # Core components (Flux dispatcher, base classes, utilities)
│ ├── /decorators/ # Higher-order React components
│ ├── /public/ # Static files which are copied into the /build/public folder
│ ├── /stores/ # Stores contain the application state and logic
│ ├── /templates/ # HTML templates for server-side rendering, emails etc.
│ ├── /utils/ # Utility classes and functions
│ ├── /app.js # Client-side startup script
│ └── /server.js # Server-side startup script
├── /tools/ # Build automation scripts and utilities
│── package.json # The list of 3rd party libraries and utilities
│── preprocessor.js # ES6 transpiler settings for Jest
└── webpack.config.js # Webpack configuration for bundling and optimization
Just clone or fork the repo and start hacking:
$ git clone -o react-starter-kit -b master --single-branch \
https://github.com/kriasoft/react-starter-kit.git MyApp
$ cd MyApp
$ npm install # Install Node.js components listed in ./package.json
$ npm start # Compile and launch
$ npm run build # or, `npm run build -- release`
By default, it builds in a debug mode. If you need to build in a release
mode, just add -- release
flag. This will optimize the output bundle for
production deployment.
$ npm start # or, `npm start -- release`
This will start a lightweight development server with "live reload" and synchronized browsing across multiple devices and browsers.
$ npm run deploy # or, `npm run deploy -- production`
For more information see tools/deploy.js
.
You can always fetch and merge the recent changes from this repo back into your own project:
$ git checkout master
$ git fetch react-starter-kit
$ git merge react-starter-kit/master
$ npm install
Run unit tests powered by Jest with the following npm command:
$ npm test
Test any javascript module by creating a __tests__/
directory where
the file is. Name the test by appending -test.js
to the js file.
Jest will do the rest.
- React Static Boilerplate — Generates a static website from React components
- Babel Starter Kit — A boilerplate for authoring JavaScript/React.js libraries
- React Decorators — A collection of higher-order React components
- Getting Started with React.js
- React.js Wiki on GitHub
- React.js Questions on StackOverflow
- React.js Discussion Board
- Flux Architecture for Building User Interfaces
- Jest - Painless Unit Testing
- Flow - A static type checker for JavaScript
- The Future of React
- Learn ES6, ES6 Features
- #react-starter-kit on Gitter
- Live help sessions on Thinkful
- @koistya on Codementor
Copyright © 2014-2015 Kriasoft, LLC. This source code is licensed under the MIT license found in the LICENSE.txt file. The documentation to the project is licensed under the CC BY-SA 4.0 license.
Made with ♥ by Konstantin Tarkus (@koistya) and contributors