Skip to main content
Please ensure you’ve completed:For standalone applications, configure AWS credentials:

Introduction

Fjall applications are complete infrastructure stacks that include compute, storage, and networking resources. Choose from pre-built templates or build your own custom stack.

Create Your Application

Run the following command to start the interactive application creator:
fjall create app

Application Types

You’ll be prompted to choose from these application types:

Standard

  • RDS Instance database
  • ECS Fargate containers
  • Application Load Balancer
  • Best for: Production workloads

Resilient

  • Multi-region deployment
  • Aurora Global database
  • Route 53 failover
  • Best for: Mission-critical apps

Tinkerer

  • RDS Instance database
  • ECS on EC2 compute
  • Development defaults
  • Best for: Learning and experimenting

Lightweight

  • RDS Instance database
  • ECS Fargate containers
  • Application Load Balancer
  • Best for: Lightweight applications

Starter

  • Interactive selection
  • Mix and match resources
  • Full customisation
  • Best for: Specific requirements

Example Creation Flow

fjall create app

? Choose your starting point:
 Starter    Blank canvas · Build your way
    Standard   Production-ready · Multi-AZ, Fargate ECS, RDS
    Lightweight Streamlined · Single-AZ, Instance-backed ECS, RDS
    Resilient  High-availability · Multi-AZ, Encrypted, Fargate ECS, Aurora
    Tinkerer   Free experimental · Single-AZ, Free tier ECS, RDS

? Name your application: api
? Include database: Yes
? Provide Dockerfile: No

🚀 Creating standard application: api

 Creating application structure
 Application structure created at ./fjall/api
 Installing dependencies
 Dependencies installed successfully

────────────────────────────────────────────────

🎉 Success! Your api application has been created.

Next Steps:
🔗 Deploy your application: fjall deploy api
📚 Learn more: https://docs.fjall.io/deployment/deploy-account

What Gets Created

Your application structure:
fjall/
└── api/
    ├── infrastructure.ts   # CDK infrastructure code
    ├── package.json       # Dependencies and scripts
    ├── cdk.json          # CDK configuration
    ├── cdk.context.json  # CDK context values
    └── tsconfig.json     # TypeScript configuration

Infrastructure Code

The generated infrastructure.ts for a standard application includes:
#!/usr/bin/env node

import { App, StorageFactory, ComputeFactory, getConfig } from "@fjall/components-infrastructure";

const appName = "api";
const app = App.getApp(appName);

app.addTags({
  "fjall:costAllocation:owner": "engineering",
});

const apiStorage = app.addStorage(
  StorageFactory.build("ApiStorage", {
    type: "Instance",
    databaseName: "ApiDatabase",
  }),
);

app.addCompute(
  ComputeFactory.build("ApiCompute", {
    type: "ecs",
    ecsType: "fargate",
    ecrRepository: app.getDefaultContainerRegistry(),
    containerPort: 3000,
    containerEnvironment: {
      ENVIRONMENT: getConfig().environment,
      DATABASE_HOST: apiStorage.getHostEndpoint(),
      DATABASE_PORT: `${apiStorage.getHostPort()}`,
      DATABASE_NAME: apiStorage.getDatabaseName(),
    },
    containerSecretsImport: {
      DATABASE_PASSWORD: apiStorage.getCredentials().getImport("password"),
    },
    connections: [apiStorage],
  }),
);

Non-Interactive Mode

Skip prompts by providing options:
fjall create app \
  --name api \
  --type standard \
  --no-database

Available Options

OptionDescriptionExample
--nameApplication name--name api
--typeApplication type--type resilient
--no-databaseSkip database--no-database
--dockerfileDockerfile path--dockerfile ./app/Dockerfile
--container-portContainer port--container-port 8080

Next Steps

After creating your application:
  1. Review the generated code: Check fjall/api/infrastructure.ts
  2. Customise if needed: Modify resources, add environment variables
  3. Deploy: Continue to Deploy Application
Applications can be created independently or as part of an organisation. For multi-account setups, create the organisation first.