Skip to main content
Wildo.ai Coming soon

Scaffolding and knowledge

Turn the domain plan into connected project structure

Derive module and resource composition from the domain plan, keeping resource ownership and tenancy explicit.

A domain plan supplies configuration, modules and files in the workspace.

Turn the domain plan into connected project structure

The product’s domain plan describes its business areas and the objects they own. Those decisions should carry into the project structure rather than being interpreted again for each folder.

Wildo derives module and resource composition from that plan. It gives each resource an owner and connects the resulting structure to the application’s tenancy choices.

Example — Share a customer without creating it twice

Sales owns the customer resource; support refers to it. The composition keeps one customer resource under its owning module, while support’s use of that resource remains a relationship to the same business concept.

For engineers

Start from a valid domain plan

The foundation method consumes the product’s domain plan and related context. Its executor derives composition scenarios for modules and resources, applies the tenancy configuration, then applies those scenarios.

Plan decisionStructural consequence
Module identityNames the module being composed
Main resourcesEstablishes the owning module for each resource
Supporting resourcesRefers to resources without creating another main owner
TenancySupplies the primary application scope
Shared package nameConnects generated imports to the actual application package

A resource with no main owner uses the first supporting owner. Conflicting main owners are rejected before choosing an arbitrary location.

See the ownership check

This selected loop comes from the foundation composition planner. moduleId has already been derived and checked for uniqueness:

for (const resourceName of domainModule.mainResources) {
  const resourceDir = toKebab(resourceName, `resource "${resourceName}" of module "${moduleId}"`);
  const existingOwner = mainOwnerByResourceDir.get(resourceDir);
  if (existingOwner !== undefined && existingOwner !== moduleId) {
    throw new FoundationCompositionPlanError(
      `Resource "${resourceDir}" is a mainResource of BOTH "${existingOwner}" and "${moduleId}" — `
        + "ownership must be unambiguous before composing (a supportingResources entry is how a module references another module's resource).",
    );
  }
  mainOwnerByResourceDir.set(resourceDir, moduleId);
}

The distinction prevents a supporting reference from becoming an accidental duplicate resource. The application still implements the resource fields, actions and user experience on top of the composed structure.

Continue through the application setup

Foundation composition is one part of bootstrap. It does not run the complete initialization, asset installation and local-environment setup sequence by itself. Follow the foundation method and the environment guide for those steps.

Scenarios run sequentially. A later failure does not undo every earlier successful invocation, so inspect the working changes before retrying. A resource preview may also depend on its module first being created. Review the resulting files and registrations, then perform the relevant compilation, migration and runtime checks before accepting the application state.

Building a B2B product or an internal tool?

Wildo is not self-service yet. Tell us what you have in mind and we will say plainly whether it fits, and what happens next.