Architecture

Flisk has three parts: a command line, a discovery step and an engine. This page shows what each one does, how a session moves through them, and which files are yours and which are generated.

It describes the Docker and Tilt path. A service that sets a command runs as a plain local process on your machine without Tilt; How it works shows both paths.

The three parts

The three parts of Flisk Four layers from top to bottom. Your committed files: project.json, service.json files and your code. The Flisk command line, which reads them and writes generated files. Tilt, which runs discovery and the engine from the generated Tiltfile. Docker, which runs Traefik, PostgreSQL and your service containers. YOUR PROJECT, COMMITTED .flisk/project.jsonservices/*/*/service.jsonYour code and Dockerfiles FLISK COMMAND LINE flisk projectflisk resourceflisk up writes .flisk/.flisk-out/ and starts Tilt TILT RUNS THE GENERATED TILTFILE Discovery: finds servicesEngine: builds and routes DOCKER, ON YOUR COMPUTER TraefikPostgreSQLYour servicesTilt web UI One address, :80Shared databaseReload on saveLogs, :10350
Everything above the Tilt layer is written by you or by the command line. Everything below it is started from generated files.

What each part does

PartIt doesIt does not
Command line
cli/, TypeScript
Reads your commands and prompts. Checks project.json and each service.json against their schemas. Picks free ports. Writes the generated files. Starts and watches Tilt. Runs flisk doctor.Start containers behind Tilt's back, or decide at run time what to rebuild.
Discovery
runtime/discovery/, Starlark
Scans the project for service.json files, by default in services/*/*. Fills in defaults such as ports and sync folders. Reads each dependsOn to build the order services start in.Build anything, start containers or write files.
Engine
runtime/engine/, Starlark
Runs inside Tilt. Turns each service into a Tilt build with live reload, a health check and Traefik routes. Starts the shared PostgreSQL database.Read command line options, ask questions or change your committed files.

A session, step by step

CommandWhat it writes or starts
flisk project.flisk/project.json with the project's name, stacks and discovery paths. The .gitignore lines that keep secrets and generated files out of git. The generated Tiltfile and its settings in .flisk/.flisk-out/, with a copy of the engine and discovery so flisk up works offline.
flisk resourceA folder under services/<stack>/<name>/ with its service.json, a free port and starter code for the language or framework you chose.
flisk upChecks your machine and whether generated files were edited by hand, then starts Tilt. Discovery finds the services, the engine writes each service's runtime files, and Tilt builds and starts the containers in dependency order. The command line prints the URLs when they are ready.

Committed and generated

PathWho owns itWhy
.flisk/project.jsonYou. Commit it.The team's shared description of the project.
services/*/*/service.jsonYou. Commit it.Each service's contract, next to its code.
Your code and DockerfilesYou. Commit them.Normal project source.
.envFlisk. Never commit it.Holds generated secrets such as database passwords.
.flisk/.flisk-out/Flisk. Ignored by git.Written from project.json and rebuilt when needed.
services/*/*/.autogenerated/Flisk. Ignored by git.Per-service files such as nginx and Vite config. Flisk refuses to start if they were edited by hand.

The full list of generated files is in Generated files .

Go deeper

This page is the short version of the contributor document, which also lists where to change each part of the code.

Architecture, end to end , Topology , service.json reference