SuiteApp Project Structure for Single Page Applications

To use NetSuite UIF with single page applications (SPAs), a specific folder structure is required to convert the source files before deploying the SuiteApp project. With this folder structure, you can use JavaScript or TypeScript in your source files. During the conversion, the SPA source files are transpiled and the converted files are stored in a different folder within the project directory.

Sample SuiteApp projects that use single page applications (SPA) are available in the SuiteCloud Project Repository on Oracle Samples GitHub. For more information, see Single Page Application Samples.

SDF SuiteApp projects with SPAs must have the following structure:

If you have non-SPA script files in your SuiteApp project, take note of the following when using the gulpfile provided in the sample projects:

For more information about the gulpfile, see Build Process for SuiteApp Projects with Single Page Applications.

The following shows a sample folder structure for an SPA SuiteApp after running the build and bundle tasks implemented in the gulpfile.

          <ApplicationID>
├── build/
├── node_modules/ 
├── src/
│   ├── FileCabinet/
│         ├── SuiteApps/<ApplicationID>/
│               ├── <OtherScripts>/
│               ├── <SpaFolder>/
│                    ├── assets/
│                    ├── SpaClient.js
│                    └── SpaServer.js
│         └── Web Site Hosting Files/
│   ├── InstallationPreferences/
│   ├── Objects/
│         └── custspa_helloworld.xml
│   ├── SuiteApps/<ApplicationID>/
│         ├── <SpaFolder>/
│               ├── assets/
│               ├── HelloWorld.tsx
│               ├── SpaClient.tsx
│               └── SpaServer.tsx
│   ├── Translations/
│   ├── deploy.xml
│   └── manifest.xml
├── test/
├── gulpfile.mjs
├── jest.config.js
├── package.json
├── suitecloud.config.js
├── tsconfig.json
└── tsconfig.test.json 

        

For information about the default project structure of SuiteApp projects created using SDF, see SuiteCloud Project Structure and File Components.

Related Topics

Components and Structure of Single Page Applications
Build Process for SuiteApp Projects with Single Page Applications
Single Page Application Samples
NetSuite User Interface Framework for Single Page Applications
Single Page Application Creation And Development

General Notices