Multiple apps

Many FileMaker solutions incorporate multiple Web Viewer widgets or interface screens. You can support multiple distinct views from a single codebase by defining multiple entry points, or by adding distinct apps within the same project workspace.

When a separate application is necessary, it resides as a sibling directory within the existing project. Each app binds to exactly one connected FileMaker file.

Benefits of a single app bundle

  • Centralized build and deployment: Updating a shared component or library updates all views simultaneously. Separate apps require independent builds, distinct storage fields, and separate deployments.

  • Design system consistency: A shared component library ensures consistent visual styling and behavior across all views.

  • Shared initialization architecture: The initial props handshake, user authentication state, generated data client types, and query caching configurations are defined once and reused across screens.

  • Direct in-app linking: Screens share a client router, enabling immediate navigation without reloading a new web bundle.

Apps in the same project share the workspace configuration and the vendored copy of @adk/fmdapi, but maintain individual adk.config.json configurations, Typegen schemas, and compiled output bundles.

Single bundle with multiple entry points

Each FileMaker Web Viewer layout object loads an independent runtime instance of the compiled bundle without shared memory.

Each instance configures its view based on initial parameters. Upon loading, the Web Viewer requests initial props from FileMaker Pro, and the response specifies the starting route. For example, a Web Viewer on a Dashboard layout opens to /dashboard, while one on an Invoices layout opens to /invoices/:id.

This allows each Web Viewer to function as a contextual widget while running from a unified bundle. See Initial props for implementation details.

Single-screen versus multi-screen apps

A Web Viewer can also host a complete single-page application featuring sidebar navigation and nested client routes. In this pattern, FileMaker acts as the outer container, and user navigation occurs entirely within the Web Viewer.

Both models use the same underlying bundle architecture. Use targeted Web Viewer objects per layout when each view belongs to a distinct FileMaker context; use a unified Web Viewer app when users navigate across views without leaving the layout.

When to create a separate app

In most solutions, adding routes within a single app is preferred. A distinct app workspace is warranted under specific conditions:

  • Specialized dependencies: Embedded Web Viewer apps load in a single compiled file without runtime code-splitting. If a screen requires large specialized libraries (such as complex charting or 3D rendering), placing that screen in a separate app keeps primary bundles lightweight.

  • Independent release lifecycles: Features developed by separate teams or deployed on independent release schedules benefit from isolated app workspaces.

Add a second app

To scaffold an additional app within your project, ask your coding agent:

Copy
Add a second web viewer app called reports to this project.

ADK prompts for the app name and connected file binding. The agent verifies that the target file contains required ADK components before scaffolding the workspace.

The new app is created under webviewer-apps/ and shares the root workspace and vendored @adk/fmdapi library:

Copy
my-project/
├── vendor/@adk/fmdapi/       # shared
└── webviewer-apps/
    ├── dashboard/
    └── reports/              # new

See Project folders and generated files for directory structures and command options.