File size: 1,035 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Boot

This module is where all the client-side magic starts. The core set of application modules that contain the client-side application routes, any additional application bootstrapping occurs, and the page.js router is started triggering the initial route handler.

## Folder structure

```text
client/boot/
β”œβ”€β”€ app.js
β”œβ”€β”€ common.js
└── polyfills.js
```

There is a single entry point for the Webpack client build: `client/boot/app.js`. It is responsible for handling a lot of features we want to happen on every page.

The major ones are shared between all projects and live in `client/boot/common.js` file. Those are in roughly chronological order:

- Initializing i18n
- Boot strapping translation strings
- Adding touch events
- Adding accessibility focus features
- Initializing and configuring Redux store
- Passing the query and hash objects into the page.js context
- Loading sections
- Setting general purpose middlewares (handlers for oauth, logged out, clear notices, unsaved forms)
- Starting page.js