All Projects → ModusCreateOrg → Budgeting

ModusCreateOrg / Budgeting

Licence: mit
Budgeting - React + Redux + Webpack (tree shaking) Sample App

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Budgeting

React Redux Universal Boilerplate
An Universal ReactJS/Redux Boilerplate
Stars: ✭ 165 (-83.01%)
Mutual labels:  webpack, eslint, babel, sass, react-router
React Ssr Setup
React Starter Project with Webpack 4, Babel 7, TypeScript, CSS Modules, Server Side Rendering, i18n and some more niceties
Stars: ✭ 678 (-30.18%)
Mutual labels:  webpack, eslint, prettier, babel, react-router
Starter React Flux
Generate your React PWA project with TypeScript or JavaScript
Stars: ✭ 65 (-93.31%)
Mutual labels:  webpack, eslint, prettier, babel, react-router
Iceberg
Front-End Boilerplate built with React + Babel + Webpack + SASS
Stars: ✭ 144 (-85.17%)
Mutual labels:  webpack, webpack2, eslint, babel, sass
React Dynamic Route Loading Es6
Auto chunking and dynamic loading of routes with React Router and Webpack 2
Stars: ✭ 297 (-69.41%)
Mutual labels:  webpack, webpack2, tree-shaking, react-router, service-worker
Webpack Core Usage
webpack2完整系列课程,欢迎阅读。同时欢迎移步我的react全家桶文章全集: https://github.com/liangklfangl/react-article-bucket
Stars: ✭ 94 (-90.32%)
Mutual labels:  webpack, webpack2, tree-shaking, babel, react-router
Express React Boilerplate
🚀🚀🚀 This is a tool that helps programmers create Express & React projects easily base on react-cool-starter.
Stars: ✭ 32 (-96.7%)
Mutual labels:  webpack, eslint, prettier, babel, react-router
Project Webcube
Continuously updated JS infrastructure for modern web dev
Stars: ✭ 141 (-85.48%)
Mutual labels:  webpack, eslint, babel, react-router
Js Stack Boilerplate
Final boilerplate code of the JavaScript Stack from Scratch tutorial –
Stars: ✭ 145 (-85.07%)
Mutual labels:  webpack, eslint, babel, react-router
Express Webpack React Redux Typescript Boilerplate
🎉 A full-stack boilerplate that using express with webpack, react and typescirpt!
Stars: ✭ 156 (-83.93%)
Mutual labels:  webpack, eslint, babel, react-router
React Starter Kit
React, Redux, Webpack, Material UI, Boostrap 4, Code Splitting, HMR
Stars: ✭ 229 (-76.42%)
Mutual labels:  webpack, eslint, prettier, babel
Threejs Webpack Es6 Boilerplate
A basic boilerplate for a Three.js project compiled with Webpack and transpiled via Babel to enable using ES6 syntax.
Stars: ✭ 267 (-72.5%)
Mutual labels:  webpack, eslint, babel, sass
Serverless Typescript Starter
🗄🙅‍♀️ Deploy your next serverless JavaScript function in seconds
Stars: ✭ 653 (-32.75%)
Mutual labels:  webpack, eslint, prettier, babel
Monitaure
🔔 A server uptime monitoring progressive web application - NO LONGER MAINTAINED
Stars: ✭ 135 (-86.1%)
Mutual labels:  webpack, sass, react-router, service-worker
React Pages Boilerplate
Deliver react + react-router application to gh-pages
Stars: ✭ 134 (-86.2%)
Mutual labels:  webpack, eslint, babel, react-router
Static Site Boilerplate
A better workflow for building modern static websites.
Stars: ✭ 1,633 (+68.18%)
Mutual labels:  webpack, eslint, babel, sass
That React App You Want
That react app you always wanted: [email protected], [email protected], postCSS, purifycss, dll's and code splitting examples, bregh. Highly opinionated but you better like it.
Stars: ✭ 27 (-97.22%)
Mutual labels:  webpack, tree-shaking, prettier, babel
Pwa
An opinionated progressive web app boilerplate
Stars: ✭ 353 (-63.65%)
Mutual labels:  webpack, eslint, babel, react-router
React Redux Auth0 Kit
Minimal starter boilerplate project with CRA, React, Redux, React Router and Auth0 authentication
Stars: ✭ 115 (-88.16%)
Mutual labels:  webpack, eslint, babel, react-router
Reeakt
A modern React boilerplate to awesome web applications
Stars: ✭ 116 (-88.05%)
Mutual labels:  webpack, eslint, prettier, react-router

PRs Welcome MIT Licensed FOSSA Status CircleCI Coverage Status Maintainability Powered by Modus_Create

⚠️ Important Note ⚠️

While this project still fullfills the goal of demonstrating a scalable React architecture, it's now technically obsolete. At Modus Labs we are continuing to show modern best practices via GitHub and our YouTube Channel

Budgeting :: A Scalable React, Redux, React Router 4, Webpack Sample App

React, Redux, Router, Webpack, Sass

Production-ready React + Webpack architecture implemented on consumer web apps of some of the most successful enterprises in the world. Perceived performance and development experience are key factors in this setup. You can use this code base for learning or to scaffold your mission-critical project.

See live demo.

React Budgeting App

Budgeting Application

This is a simple budget management application. It tracks inflow and outflow, shows remaining budget, and interesting reports with charts. As such, it offers more features than the usual Todo App.

Budgeting app is a showcase project that demonstrates important decisions in architecture and development of a modern React application.

Feel free to use it as a reference app or a starter kit.

Key concepts:

  • [x] Webpack 4 Tree shaking
  • [x] PRPL pattern with minimal application core
  • [x] Automatic code splitting with React Router 4 and import() statement
  • [x] Automatic common chunk bundling
  • [x] CSS modules
  • [x] Snapshot testing with Jest
  • [x] Flow static typing. Check out this guide to using Flow in the project.
  • [x] Performance budgets in Webpack 3
  • [x] React 16 Error Boundaries

Performance

Budgeting App Performance The app loads in 1 second on 3G, cache disabled

Budgeting app is blazing fast, thanks to the smart architecture and Webpack 3 configuration. It takes about 1000ms (1s) to load on 3G (see above).

Alex Russel Test Emerging Markets 3G Filmstrip

The aggressive test above shows the budgeting app loads in under 5 seconds. It's a heavily limited connection that accounts for poor connectivity and limited bandwidth.

Waterfall

All important (aka critical path) assets are loaded as early as possible, while the others (e.g. images or GitHub buttons) will load after the first render.

How did we get that performance?

  1. Minimal application core. We decided to ditch the usual convention of creating a vendor chunk. Instead, it's bundled in the app core. The app core is actually very small, containing just the code needed to bootstrap the app.
  2. Common code is a chunk. We let Webpack figure out which bundles we reuse in chunks and create a common chunk that's also asyncronous.
  3. Redux module injection. Each chunk contains respective views and redux modules. Yes, that means reducers, action creators, actions - are all dynamically injected as we navigate through routes. That adds to the minimal application core concept and PRPL pattern.
  4. H2 Push. The app is hosted on Firebase and we use the magic of HTTP2 Push to push some of the scripts before they are requested.
  5. Pre-caching. Service Workers pre-cache resources so the browser can access them as soon as the user needs to.

Charts

Charts are developed using the awesome D3 library. The idea behind showing charts is not only to show beautiful content, but also to demonstrate keeping heavy content in a chunk that owns it. In other words - we show how applications can run fast even if they use larger libraries.

D3 is used in the /reports route only. Given that major routes are separate chunks (code splitting FTW!), the entire D3 library is bundled with the code that needs it. That makes the /reports route a bit heavier than the initial /budget route, but it also makes routes much faster to load.

Performance Budgets

We are looking to maintain the lightest possible application core (aka entry chunk). Our target is 300kB for the entrypoint and 300kB for all other assets. This is how we set it in webpack configuration:

performance: {
  maxAssetSize: 300000,
  maxEntrypointSize: 300000,
  hints: 'warning',
},

Adding lots of extra code to the entry chunk might cause the build (npm run build) process to show a warning.

Performance Budgets

Simulated size warning

Note that running webpack dev server in production mode (npm run prod) will trigger this warning because of the additional dev server code injected in the app. This code will not show in regular production builds.

Service Workers

Service workers are enabled only when serving static files, not through webpack-dev-server. Here's how you can test service worker functionality:

  1. Run npm run build to build the app
  2. Run npm run prod to serve the app on localhost:3000
  3. Run a new instance of Chrome with disabled security (because localhost is not on https):

OS X

open -a "Google Chrome" --args --user-data-dir=/tmp/unsafe --unsafely-treat-insecure-origin-as-secure=http://localhost

Linux

/path/to/chrome --user-data-dir=/tmp/unsafe --unsafely-treat-insecure-origin-as-secure=http://localhost

Windows

chrome.exe --user-data-dir=c:\temp --unsafely-treat-insecure-origin-as-secure=http://localhost
  1. Now you can observe network traffic in the Network tab or SW activity in Application > Service Workers in Developer Tools

Stack

The app was built using these aweseome technologies

NPM Scripts

  • npm install - install dependencies
  • npm start - run development server
  • npm run prod - run production server
  • npm run build - build app for deployment
  • npm run serve - serve previously built app using pushstate server
  • npm run lint - lint check
  • npm run lint:fix - lint check + autofixes + prettify code with prettier
  • npm test - run test suite
  • npm run test:fix - run test suite watching files for changes
  • npm run flow - run flow type checking
  • npm run update-types - update flow library definitions

Honorary Mentions

Want more?

This project is maintained by Modus Create. Fantastic React apps are in our DNA so give us a buzz if we can help with your awesome project.

License

MIT

FOSSA Status

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].