Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Note
Preview features aren’t meant for production use and may have restricted functionality. These features are available before an official release so that customers can get early access and provide feedback.
Power Apps code app architecture consists of:
- The Power Apps SDK
- Generated models/services for connectors
- The
power.config.jsonconfiguration file - The Power Apps host
Understanding how these parts collaborate through development, publishing, and runtime execution make you more successful. Learn about:
- The role of each layer (your code vs. SDK vs. host)
- How models/services are generated and consumed when you add or remove connectors
- What is packaged and published with
pac code push
App development
An HTML or TypeScript/JavaScript app is a prerequisite to use code apps technology. Code apps support Single-Page Applications (SPAs). The Power Platform CLI and Power Apps SDK enable your app to use Power Platform connectors and be hosted in a Power Platform environment.
| Component | Description |
|---|---|
| power.config.json | A file generated from the Power Apps SDK, which contains metadata. Both the CLI and Power Apps SDK use this metadata for Power Platform connections and to publish an app to an environment. Your app logic isn't expected to interact with the power.config.json file. |
| Power Apps SDK | The @microsoft/power-apps - npm package. It has APIs your app can interact with directly and it contains logic that manages models and services as connections are added and removed from an app. |
| Power Platform CLI | The PAC CLI pac code push command takes a compiled app and publishes it in a Power Platform environment where it can then be shared with users and run from Power Apps. |
Runtime
When a code app runs, there are three logical components:
- Your code
- The Power Apps SDK
- The Power Apps host
- The Power Apps SDK exposes APIs that your code can use and the generated models and services your app uses to perform data requests via Power Platform connectors.
- The Power Apps host manages end-user authentication, app loading, and presenting contextual messages to the user if an app fails to load.