C3 AI Documentation Home

Structuring large UI applications

C3 AI Platform allows you to compose packages together into a single application to allow functionality to be reused across multiple applications. This document will go over some recommendations for how to separate out packages and how to override the functionality within those packages.

Application architecture

When first starting an application, it's simpler to keep all the Type definitions, application logic, and UI in the same package. As your application evolves and becomes more complex, it's best practice to split the application in multiple packages.

Decoupling an application into multiple packages allows you to:

  • Accelerate development by reusing existing data models, business logic, or UIs.
  • Minimize code duplication and avoid having to fix the same issue in multiple places.
  • Iterate, test, and release packages at different cadences for other teams to consume.

package structure illustration

Dependencies

You can compose an application by declaring dependencies between multiple packages. There are two ways to achieve this:

  • You have the source code for all packages in your dependency tree.
  • You are authorized to access pre-built artifacts for the dependencies you need. At build time, C3 AI Platform fetches the package artifacts to build your application.

package structure illustration

Was this page helpful?