03-app-structure/01-bootstrap.md
Bootstrap
Bootstrap
Bootstrapping a Vroq app means creating the minimal root files and wiring them together in the standard way.
The bootstrap should stay small, predictable, and consistent across apps.
Standard bootstrap files
A standard Vroq app starts with:
index.htmlApp.jsshared/store/configureStore.jsif the app uses storeshared/store/initialState.jsif the app uses store
Bootstrap responsibilities
index.html
Responsible for:
- loading
ui.css - defining import maps
- creating the root
#appelement - loading
App.js
App.js
Responsible for:
- creating long-lived root objects such as the store
- composing top-level app UI
- calling
mount(...)
configureStore.js
Responsible for:
- creating the app store
- registering reducers
- registering extensions
- registering actions if needed
initialState.js
Responsible for:
- defining the default app state shape
Bootstrap rules
- keep bootstrap files small
- keep feature logic out of
index.html - keep
App.jsfocused on root composition - keep store creation centralized
- follow the same bootstrap pattern across apps
Final rule
A reader should be able to understand how the app starts by reading only index.html, App.js, and the store setup files.