Budgeting
Budgeting - React + Redux + Webpack (tree shaking) Sample App
Install / Use
/learn @ModusCreateOrg/BudgetingREADME
⚠️ 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

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.

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

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

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:
- Run
npm run buildto build the app - Run
npm run prodto serve the app on localhost:3000 - 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
- 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
- [x] Webpack 4
- [x] React 16.x
- [x] Redux 3.x
- [x] React Router 4
- [x] Reselect
- [x] Babel
- [x] Prettier
- [x] Jest
- [x] Flow
- [x] Ducks 🐣
- [x] Sass
- [x] Autoprefixer
- [x] D3 5.x
NPM Scripts
npm install- install dependenciesnpm start- run development servernpm run prod- run production servernpm run build- build app for deploymentnpm run serve- serve previously built app usin
Related Skills
bluebubbles
337.7kUse when you need to send or manage iMessages via BlueBubbles (recommended iMessage integration). Calls go through the generic message tool with channel="bluebubbles".
node-connect
337.7kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
slack
337.7kUse when you need to control Slack from OpenClaw via the slack tool, including reacting to messages or pinning/unpinning items in Slack channels or DMs.
frontend-design
83.3kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
