This is the legacy documentation of Project-level Custom Applications, which is in maintenance mode. Visit the new documentation for Org-level Custom Applications.
BETA
Folder Structure
After bootstrapping a new application, your project should look like this:
.├── README.md├── custom-application-config.json├── jest.test.config.js├── menu.json├── package.json├── src│ ├── components│ │ ├── entry-point│ │ │ ├── entry-point.js│ │ │ ├── entry-point.spec.js│ │ │ └── index.js│ │ ├── main-view│ │ │ ├── index.js│ │ │ ├── main-view.js│ │ │ ├── main-view.mod.css│ │ │ ├── main-view.spec.js│ │ │ └── messages.js│ │ ├── view-one│ │ │ ├── index.js│ │ │ ├── messages.js│ │ │ └── view-one.js│ │ └── view-two│ │ ├── index.js│ │ ├── messages.js│ │ └── view-two.js│ ├── i18n│ │ ├── data│ │ │ ├── core.json│ │ │ ├── de.json│ │ │ ├── en.json│ │ │ └── es.json│ │ └── index.js│ ├── index.js│ ├── load-messages.js│ └── routes.js└── yarn.lock
Note: In this documentation, React components are referred as <MyComponentName>
.
src/
: Directory containing all the JavaScript files (for example React components) for the application. More specifically, it should include the following:src/index.js
: The application entry point. Contains the import statements to render the React application. The path to this file is also defined in thewebpack.config.<env>.js
as theentryPoint
.src/routes.js
: Defines the sub routes and components rendered by the application. The main route is defined in the<EntryPoint>
component and is loaded asynchronously using Code-Splitting.src/load-messages.js
: See Translations.src/i18n
: Contains the translations from the Intl messages.src/components/entry-point
: Contains the<EntryPoint>
component which must:- Use the
<ApplicationShell>
component to load the core logic of the application (including layout elements like the left hand and top navigation). - Define a
<Route>
component to handle requests matching the main application route path.
- Use the
custom-application-config.json
: See Application configwebpack.config.<env>.js
: Contains the setup for getting the webpack configurations fordevelopment
andproduction
.jest.test.config.js
: Contains configurations for running tests using a Jest runner.dist/
: Contains the production bundles (created once you runyarn build
).package.json
: Contains the dependencies to work on the project and npmscripts
to perform important tasks (for exampleyarn test
,yarn start
,yarn build
,yarn compile-html
, etc.).