Skip to content

smspillaz/react-boilerplate-serverless

Β 
Β 

Repository files navigation

react boilerplate banner


Start your next react project in seconds
A highly scalable, offline-first foundation with the best DX and a focus on performance and best practices


Created by Max Stoiber and maintained with ❀️ by an amazing team of developers.

Features

Quick scaffolding
Create components, containers, routes, selectors and sagas - and their tests - right from the CLI!
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!
Predictable state management
Unidirectional data flow allows for change logging and time travel debugging.
Next generation JavaScript
Use template strings, object destructuring, arrow functions, JSX syntax and more.
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 with `react-intl`.
Offline-first
The next frontier in performant web apps: availability without a network connection from the instant your users load the app.
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)
Server Rendering
This fork supports server rendering, and does all the setup required to make styled-components and react-loadable work with server-rendering
Analytics
This fork also has in-built analytics, though the use of (react-metrics)[https://github.com/nfl/react-metrics]. Configure a Segment.io API key in `app/analytics.js` and page views will be automatically recorded.

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?)
  • Native web app: Your app's new home? The home screen of your users' phones.
  • The fastest fonts: Say goodbye to vacant text.
  • Stay fast: Profile your app's performance from the comfort of your command line!
  • Catch problems: AppVeyor and TravisCI setups included by default, so your tests get run automatically on Windows and Unix.

There’s also a fantastic video on how to structure your React apps with scalability in mind. It provides rationale for the majority of boilerplate's design decisions.

Keywords: React.js, Redux, Hot Reloading, ESNext, Babel, react-router, Offline First, ServiceWorker, styled-components, redux-saga, FontFaceObserver

Serverless support

This fork contains support for serverless deployments using serverless on services like AWS lambda. To make use of a serverless deployment, specify AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY and use npm run serverless-deploy -- --stage stagename. An S3 bucket and cloudformation infrastructure will be created for you automatically. Note that you will need to manually add binary content-types to the created API Gateway and compression is disabled.

Static site deployment

This fork also contains support for static site deployment to S3.

First, pre-render the site using npm run snapshot. Then, edit s3.config.json with your bucket name, AWS Access Key ID, Region and Secret Access Key and run npm run s3:deploy to deploy the rendered site to an S3 bucket. Accessing it directly should work.

Quick start

  1. Make sure that you have Node.js v8.15.1 and npm v5 or above installed.
  2. Clone this repo using git clone --depth=1 https://github.com/react-boilerplate/react-boilerplate.git <YOUR_PROJECT_NAME>
  3. Move to the appropriate directory: cd <YOUR_PROJECT_NAME>.
  4. Run npm run setup in order to install dependencies and clean the git repo.
    At this point you can run npm start to see the example app at http://localhost:3000.
  5. Run npm run clean to delete the example app.

Now you're ready to rumble!

Please note that this boilerplate is production-ready and not meant for beginners! If you're just starting out with react or redux, please refer to https://github.com/petehunt/react-howto instead. If you want a solid, battle-tested base to build your next product upon and have some experience with react, this is the perfect start for you.

Documentation

Ongoing Work

In between releases, we work on the dev branch and rarely ever update master. For that reason, it sometimes look like the repo isn't actively maintained. This isn't the case, React Boilerplate is alive and kicking.

Please feel free to check out:

  • our dev branch for the latest updates. You are always welcome to use it as the basis for your project. We only merge to dev projects which are fully ready.
  • our open issues and pull requests to see what we are currently working on. Suggestions and contributions are always welcome!

Contributors

Thanks go to these wonderful people (emoji key):

Max Stoiber
Max Stoiber

πŸ’» πŸ“– πŸ€” πŸ‘€ ⚠️
Julien Benchetrit
Julien Benchetrit

πŸ’» πŸ’¬ πŸ“– πŸ‘€ 🚧
Sara Federico
Sara Federico

πŸ’» πŸ‘€ πŸ’¬ πŸ“– 🚧
Justin Greenberg
Justin Greenberg

πŸ’» πŸ‘€
Jon Winn
Jon Winn

πŸ’» πŸ‘€
Johan Meester
Johan Meester

πŸ’» ⚠️ πŸ“–
Yaroslav Kiliba
Yaroslav Kiliba

πŸ’»
Glen Ihrig
Glen Ihrig

πŸ’»
Somasundaram Ayyappan
Somasundaram Ayyappan

πŸ’»
Oliver Turner
Oliver Turner

πŸ’»
Samuel Sharpe
Samuel Sharpe

πŸ’»
Mihir Karandikar
Mihir Karandikar

πŸ’»
Vaibhav Verma
Vaibhav Verma

πŸ’»
SΓ©bastien Dubois
SΓ©bastien Dubois

πŸ’»
Chainarong Tangsurakit
Chainarong Tangsurakit

πŸ’»
Amila Welihinda
Amila Welihinda

πŸ’»

This project follows the all-contributors specification. Contributions of any kind welcome!

Supporters

This project would not be possible without the support of these amazing folks. Become a sponsor to get your company in front of thousands of engaged react developers and help us out!


License

This project is licensed under the MIT license, Copyright (c) 2019 Maximilian Stoiber. For more information see LICENSE.md.

About

πŸ”₯ A highly scalable, offline-first foundation with the best developer experience and a focus on performance and best practices.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 93.7%
  • HTML 6.3%