Feature Oriented Active Modeller

Fast apps.
Fast.

Describe your class once — its properties, methods, and relationships. FOAM generates the running application across every tier and platform, from the database to the network to the UI. Readable by developers and AI agents alike.

0Runtime deps
1 modelEvery tier & platform
JS · Java · SwiftGenerated targets
source model
foam.CLASS({
  name: 'Invoice',
  properties: [
    'id', 'payee', 'amount'
  ],
  methods: [ function settle() { ... } ]
});
generates
JavaScript classclient & server
Android Javanative tier
iOS Swiftnative tier
DAO storagepersistence
Network marshalingwire format
UI viewsreactive
The idea

Model the feature. Generate the rest.

FOAM is a modelling tool and a class-based object system. You describe a class by its properties, methods, event topics, listeners, and dependencies — and FOAM turns that single model into a usable class plus the companion machinery an app actually needs.

It's written in JavaScript, but the model isn't bound to it. The same definition generates code for any language or platform, so one description drives web, Android Java, and iOS Swift alike.

Declare once, generate everything — the same idea as protobufs, extended past the wire all the way to persistence and views.
One model produces
classA reactive, usable object system with live properties and listeners
storageBuilt-in DAO persistence — the same interface everywhere
networkAutomatic marshaling between client and server
viewsGenerated UI that stays in sync with the model
platformsJavaScript, Android Java, and iOS Swift from one source
Why FOAM

Three things at once, without the usual trade-off.

Frameworks normally make you pick two of speed, size, and developer velocity. A single model that generates every tier is how FOAM gives you all three.

01 / Speed

Application speed

Because one model spans every tier, FOAM optimizes the whole path end-to-end — no overhead from constantly adapting between mismatched libraries at each boundary. And less code to write means less code to run: reactive, in-memory DAOs keep apps fast at runtime.

02 / Size

Application size

Because behaviour comes from the model rather than hand-written boilerplate, apps are dramatically smaller — less code to ship, read, and maintain across every tier.

03 / Velocity

Developer efficiency

Change the model and the class, database support, network layer, and views update together. One edit, many tiers — that's where the time savings live.

Built for AI

Agent-friendly by design.

A FOAM model reads like a specification, not an implementation — which is exactly what language models generate and review best. High intent-per-token, one consistent way to do things, and the framework handles the plumbing so agents reason about what, never how.

REFLOW

A notebook-style console, in every app.

REFLOW is FOAM's interactive console — Jupyter for your live application. Run commands, query and visualize any DAO, and capture the whole session as a reusable, shareable flow document.

Query and manipulate any DAO directly; upload CSV, JSON, or XML in place
Visualize results as bar, pie, and line charts or live tables
Save, load, and share flow documents with reactive, formula-driven blocks
Call the agent orchestration service right from the prompt
REFLOW — reconciliation.flow
>dao Invoice.where(EQ(Invoice.STATUS, 'OPEN'))
invoiceNumberpayeeamount
INV-004182Northwind$ 2,400.00
INV-004183Contoso$ 875.50
INV-004184Fabrikam$ 5,120.00
>chart('bar', byWeek)
W1
W2
W3
W4
>agents.run('reconcile-disputes')
orchestrating 4 agents · done in 1.8s
Get started

Running in a few commands.

FOAM has no runtime dependencies. You'll need git, npm, Node ≥ 16, Maven, and Java ≥ 21 to build.

1
Install dependenciesPull FOAM's JavaScript build deps from the repo root.
2
Run the Java serverStarts CORE, the FOAM application server.
3
Open & sign inVisit localhost:8080 with admin / admin.
4
Scaffold a projectGenerate a fresh app in the parent directory.
~/foam3 — build.sh
# 1 — install javascript dependencies
$ ./build.sh --install
$ sudo chown -R \$USER /opt

# 2 — build & run the Java webserver (CORE)
$ ./build.sh -Jdemo
  → http://localhost:8080   (admin / admin)

# 3 — scaffold a new application (creates ../ )
$ ./build.sh -T+setup/Project \
      --appName:Example --package:com.foamdev \
      --adminPassword:badpassword

# run every Java & JavaScript test
$ ./build.sh --run-tests
Documentation

Everything to go deeper.

Watch

See FOAM in motion.

Short talks and demos — from a two-minute overview to reactive programming internals.