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 withfjall add.
--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.? Use suggested container '<dir>'? (Y/n)when a monorepo container is inferred and--containerwas 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.
[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.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.
--no-verify on add or modify to skip the post-write typecheck of the edited infrastructure.ts.
Building custom architectures
Eachfjall 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
- 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.microinstances andFARGATE_SPOTfor low-cost workloads). - Run
fjall list --app <name>after each add to see what is ininfrastructure.ts. - Run
fjall validate --deepbefore 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.