SAP UI5 Fiori App Structure Explained – Complete Guide to Every File in the Free-Style JavaScript Template

SAP UI5 Fiori App Structure Explained – Every File Guide

When you create a new Free-style Fiori application using the SAP Fiori tools Application Generator, you get a ready-made project structure with many files and folders. For beginners, this structure can look confusing. Even experienced developers sometimes forget the exact purpose of certain files.

In this post, we will go through every single file that is generated in a standard JavaScript (non-TypeScript) Free-style UI5 application. You will understand what each file does and why it is important.

This is the base template. In a later post we will also cover the same structure when TypeScript is enabled.


SAP UI5 Free-Style App – File Structure at a Glance
📁 Project Root
📄 eslint.config.mjs → Linting rules for clean & consistent JavaScript
📄 package.json → Project metadata, scripts and dependencies
📄 package-lock.json → Locks exact dependency versions
📄 README.md → Project documentation
📄 ui5.yaml → Main UI5 Tooling configuration
📄 ui5-local.yaml → Local UI5 resources override
📄 ui5-mock.yaml → Enables Mock Server for offline development
📁 webapp/
📄 Component.js → Application entry point & root component
📄 index.html → Bootstrap file for local testing
📄 manifest.json → App descriptor (routing, models, data sources)
📁 controller/
📄 App.controller.js → Root controller (app-wide logic)
📄 Demo.controller.js → Controller for the Demo page
📁 css/
📄 style.css → Custom application styles
📁 i18n/
📄 i18n.properties → Translation texts (i18n)
📁 localService/
📁 mainService/
📄 metadata.xml → OData metadata for Mock Server
📁 model/
📄 models.js → Creates device & global models
📁 test/
📁 integration/
📄 AllJourneys.js → Loads all OPA5 journeys
📄 NavigationJourney.js → Sample navigation test
📁 arrangements/
📄 Startup.js → Starts app before each test
📁 pages/
📄 App.js → Page object for App view
📄 Demo.js → Page object for Demo view
📁 unit/
📄 AllTests.js → Loads all unit tests
📁 controller/
📄 Demo.controller.js → Sample unit test for controller
📁 view/
📄 App.view.xml → Root view (container for pages)
📄 Demo.view.xml → XML view for the Demo page
One-liner reference • Perfect for presentations & quick revision

SAP UI5 Fiori App Structure

Click any file on the left to jump to its explanation.

JavaScript Free-style Template No TypeScript
Project Root
eslint.config.mjs

ESLint Configuration

What it does

Defines linting rules using the modern flat config format (ESLint 9+). It helps catch common JavaScript mistakes and keeps the code style consistent across the team.

Why it matters: Prevents subtle bugs and enforces a uniform coding standard.
package.json

Project Manifest

What it does

Contains the project name, version, scripts and all dependencies. This is the file npm reads when you run commands.

  • npm start – starts the local development server
  • npm run build – creates a productive build
  • npm test – runs unit and integration tests
Why it matters: Without this file the project cannot be installed, started or built.
package-lock.json

Dependency Lock File

What it does

Locks the exact versions of every package so every developer and CI environment gets the same dependency tree.

Why it matters: Guarantees reproducible builds. Always commit this file to Git.
README.md

Project Documentation

What it does

The first thing people see when they open the repository. Replace the generated text with your own documentation.

ui5.yaml

UI5 Tooling Configuration

What it does

Main configuration for the UI5 Tooling. It tells the tooling where the webapp lives, which UI5 version to use, and which middleware or custom tasks to apply.

Why it matters: This file drives both the local development server and the productive build.
ui5-local.yaml

Local Override

What it does

Optional override used when you want to serve UI5 libraries from a local folder instead of the CDN.

ui5-mock.yaml

Mock Server Configuration

What it does

Activates the UI5 Mock Server so the application can run against local metadata instead of a real backend.

Why it matters: Lets frontend developers work independently while the backend is still under development.
webapp/
webapp/Component.js

Application Component

What it does

The root of the UI5 application. It creates the component instance, initializes models, sets up the router, and defines the root view.

Why it matters: This is the true entry point of the application.
webapp/controller/App.controller.js

Root Controller

What it does

Controller for the root App view. Usually very lightweight and handles only application-wide concerns.

webapp/controller/Demo.controller.js

Demo Page Controller

What it does

Contains the logic for the sample Demo page (event handlers, formatters, navigation, etc.).

Why it matters: Every new page you create will have a corresponding controller in this folder.
webapp/css/style.css

Custom Stylesheet

What it does

Application-specific CSS. UI5 already provides a complete theme, so only put necessary overrides here.

webapp/i18n/i18n.properties

Translation Bundle

What it does

Stores all user-visible texts as key-value pairs so the application can be translated later.

Why it matters: Hard-coded strings are considered bad practice in UI5.
webapp/index.html

Bootstrap HTML

What it does

The HTML file loaded by the browser during local development. It bootstraps UI5 and creates the component.

Why it matters: Essential for local testing. In Fiori Launchpad the shell loads the component directly.
webapp/localService/mainService/metadata.xml

OData Metadata

What it does

The $metadata document used by the Mock Server. It describes entity sets, properties and associations.

webapp/manifest.json

Application Descriptor

What it does

The most important configuration file in a modern UI5 app. It declaratively defines:

  • App identity (ID, title, version)
  • Data sources and models
  • Routing configuration
  • UI5 library dependencies
Why it matters: The Fiori Launchpad, the Component and the tooling all read this file.
webapp/model/models.js

Model Factory

What it does

Helper module that creates and returns the device model (and any other global models). Called from Component.js during startup.

webapp/test/
webapp/test/integration/AllJourneys.js

OPA5 Journey Loader

What it does

Loads all integration (OPA5) journey files so they can be executed by the test runner.

webapp/test/integration/arrangements/Startup.js

Test Arrangement

What it does

Starts the application before each OPA5 journey so every test begins from a clean state.

webapp/test/integration/pages/App.js

App Page Object

What it does

Reusable actions and assertions for the root App view. Keeps journey files clean and maintainable.

webapp/test/integration/pages/Demo.js

Demo Page Object

What it does

Page object for the Demo view – same pattern as the App page object.

webapp/test/unit/AllTests.js

Unit Test Loader

What it does

Loads all QUnit unit test modules so they can be run together.

webapp/test/unit/controller/Demo.controller.js

Sample Unit Test

What it does

Shows how to write a QUnit unit test for a controller method in isolation.

webapp/view/
webapp/view/App.view.xml

Root View

What it does

The outermost view. Usually contains an App or Shell control that acts as the container for all other pages.

webapp/view/Demo.view.xml

Demo Page View

What it does

XML definition of the sample Demo page. This is where you declare controls, bind data, and attach event handlers.

Why it matters: Every new screen you design will live as an XML view in this folder.
Click any file on the left to jump directly to its explanation.

Conclusion

Understanding the standard Free-style UI5 project structure is very important. Once you know the purpose of each file, it becomes much easier to add new pages, configure routing, write tests, or prepare the application for production.

This post covered the pure JavaScript version of the template. In the next post, we will look at the same structure when TypeScript is enabled and explain the additional files that appear.

If you found this guide useful, feel free to leave a comment below. Your feedback helps me improve future posts.

Happy coding!

Comments