This document is loaded by the parent formio-angular skill during Phase 3. It is not a standalone skill — no frontmatter, no independent trigger. The parent reads it after BOOTSTRAP has left the workspace in place and before AUTH.
Before generating anything, inspect the target workspace:
- Read
src/app/config.ts. Parse it (even a rough string search is fine) for an exported symbol whose value looks like aFormioAppConfig— specifically an object literal with keysappUrlandapiUrl. - Read
src/app/app-module.ts. Check for animport { FormioModule } from '@formio/angular';line AND a{ provide: FormioAppConfig, useValue: AppConfig }(or equivalent) entry in theprovidersarray.
If both conditions hold AND the captured appUrl/apiUrl match the SETUP values, skip this phase. Tell the user which files triggered the skip:
Skipping CONFIG —
src/app/config.tsalready exportsAppConfigwithappUrl = X, apiUrl = Y, andAppModulealready importsFormioModuleand registers theFormioAppConfigprovider. Moving to AUTH. Say if you want to regenerateconfig.tsanyway.
If the existing values disagree with the SETUP values, do not silently overwrite. Show the diff to the user and ask whether to keep the existing values (re-run SETUP to match) or overwrite config.ts with the new values. This is the one place in the orchestrator where the user might have meant something different from the SETUP answer.
Write exactly this file, substituting the SETUP values for {{FORMIO_PROJECT_URL}} and {{FORMIO_BASE_URL}}. No comments, no // TODO, no extras — the file is tiny and must read identically to the angular-demo reference.
import { FormioAppConfig } from '@formio/angular';
export const AppConfig: FormioAppConfig = {
appUrl: '{{FORMIO_PROJECT_URL}}',
apiUrl: '{{FORMIO_BASE_URL}}',
};Notes on why this shape:
appUrlis the project API root — this is where forms and submissions live. TheFormioResourcemodule in the sub-skill appends/<form-path>to this URL.apiUrlis the platform deployment — this is where the SDK fetches tenant metadata, role definitions, and (if relevant) platform-level SSO configuration.FormioAppConfigis a TypeScript interface exported by@formio/angular; using the type ensures compile-time failure if the SDK later adds required fields.- Exporting
AppConfig(capital A) matches the demo; the parent skill registers it by that exact name.
The AppModule needs three additions if they are not already present. Edit in place — don't regenerate the whole file.
At the top of app-module.ts, add:
import { FormioModule, FormioAppConfig } from '@formio/angular';
import { AppConfig } from './config';If there is already a line importing from @formio/angular, merge the symbols into that import instead of adding a second one.
Add FormioModule to the @NgModule({ imports: [...] }) array:
@NgModule({
imports: [
// ...existing imports
FormioModule,
],
// ...
})
export class AppModule {}Add the provider registration to @NgModule({ providers: [...] }):
@NgModule({
// ...
providers: [
// ...existing providers
{ provide: FormioAppConfig, useValue: AppConfig },
],
// ...
})
export class AppModule {}This useValue form is all that is needed: FormioModule reads the provided FormioAppConfig in its constructor and calls Formio.setBaseUrl/setProjectUrl at bootstrap, so the SDK is configured even though useValue skips the FormioAppConfig constructor. No forRoot / FORMIO_CONFIG wiring is required.
Before writing or editing any files, print a diff-style preview:
Files to create
src/app/config.ts (new file)
Files to edit
src/app/app-module.ts
+ import { FormioModule, FormioAppConfig } from '@formio/angular';
+ import { AppConfig } from './config';
+ FormioModule added to @NgModule imports
+ { provide: FormioAppConfig, useValue: AppConfig } added to @NgModule providers
Proceed with these writes? (AUTH is next.)
Wait for explicit approval. If the user declines, stop — do not write partial state, do not advance to AUTH. The parent skill's ## When to reset to an earlier phase rule applies if the user wants to re-run SETUP with corrected URLs.
Write config.ts and edit app-module.ts. Then tell the user what was written and what the next phase is:
Wrote
src/app/config.tsand updatedsrc/app/app-module.ts. Moving to AUTH.
Proceed to AUTH.md.