Skip to main content

Overview

The Custom application type scaffolds a blank canvas. Instead of a preset tier, you pick a network configuration and add every compute, database and storage resource yourself with fjall add.
Pick Custom when no preset tier fits, when you are learning how Fjall composes resources, or when you want full control over the architecture.
--type custom pre-selects Custom in the starting-point picker, it does not skip the wizard. Pass --non-interactive to run without prompts.

Prerequisites

Interactive flow

Custom is the only application type that asks for a network configuration, and the only one that asks no database, service or Dockerfile questions.
The review confirms a blank canvas before anything is written:
Two prompts appear conditionally:
  • ? Use suggested container '<dir>'? (Y/n) when a monorepo container is inferred and --container was not passed. Answering no asks ? Container directory (leave empty for repo-root scaffold):.
  • ? Select a deployment target: when the organisation config yields more than one target. A single target auto-selects.

Non-interactive creation

--network accepts none, tinkerer, lightweight, standard, resilient and enterprise. The interactive picker offers all of these except enterprise, which is flag-only. none scaffolds network: false, which suits standalone S3, CDN, Lambda and EventBridge resources.

What gets scaffolded

The Custom type returns an empty resource plan, so the generator adds no database, no storage and no compute. infrastructure.ts is written with the application shell plus the network preset you picked (or no network at all). Every resource comes afterwards from fjall add.

Adding resources

fjall add writes a factory call into the application’s infrastructure.ts. The <type> positional, --app and --name are all required, so bare fjall add exits with a missing-argument error rather than opening a wizard.
Resource names match [a-zA-Z][a-zA-Z0-9]*. PascalCase is the convention, not a validation rule.

Resource types

Required property flags

A first add must carry every required key for that type. The codemod names any that are missing.
DynamoDB is not a Fjall database variant. fjall add database --type DynamoDB is rejected at validation. The four accepted values are Aurora, Instance, GlobalAurora and ClickHouse.

How property flags parse

Each --flag consumes the next token as its value. A trailing flag, a flag followed immediately by another flag, and a duplicate flag are all rejected. The bare tokens true, false and null decode to JSON literals, and a value starting with { or [ must parse as JSON.

Preset selectors

--preset and --tier cannot be combined. On database, --tier also needs --type, because each tier describes each database type differently.
Pass --no-verify on add or modify to skip the post-write typecheck of the edited infrastructure.ts.

Building custom architectures

Each fjall add writes a factory call. The examples below show the generated code for common architectures, so you can see what each combination produces.

Microservices

Event-driven

memorySize is in MB and timeout is in seconds.

Batch processing

Hybrid

Mix and match

Custom takes any combination of compute and database types.
A deployment: "code" Lambda always needs a code source. handler defaults to index.handler and runtime defaults to the current Node.js runtime.

When to use Custom

Choose Custom for:
  • Unique architectural requirements
  • Proof of concepts
  • Learning how Fjall composes resources
  • Maximum control over every resource
Choose a preset tier for:
  • Standard architectures (Standard or Resilient)
  • Quick deployment with opinionated defaults
  • Free experimentation (Tinkerer)

Tips

  • Plan the architecture before adding resources.
  • Start with one compute resource and add more incrementally.
  • Use PascalCase names that describe each resource (Api, UserDb, Uploads).
  • Match resource types to cost targets (t4g.micro instances and FARGATE_SPOT for low-cost workloads).
  • Run fjall list --app <name> after each add to see what is in infrastructure.ts.
  • Run fjall validate --deep before deploying to typecheck the edited file.

Common custom architectures

Next Steps

Add Resources

Add compute, databases and storage to an existing application.

Compute Factory

ECS, Lambda and EC2 options for compute resources.

Database Factory

Aurora, Instance, Global Aurora and ClickHouse variants.

Deploy Application

Ship your custom architecture to AWS.