Building apps
Working with git
Every app is a git repository - clone it, run it locally, push a commit to main to save a version, push a branch to start a draft, push with -o deploy to put it online.
Every app is also a git repository. Clone it to work with your own editor and tools, run it locally, and push: a commit pushed to main becomes a version, a branch becomes a draft. An agent with a shell usually works this way - it is fast, and its tools are its own.
Clone#
The repository’s address is the editor’s address with any name and .git added:
Shell
git clone https://lambda.example.com/editor/<editor key>/tasks.git
cd tasks
dotnet run # with the .NET 10 SDK: the app on http://localhost:8080/
The editor shows the address under Clone (full view), on the overview and beside the code. It contains the editor key, which is what lets a push in - treat it like the editor link.
What is in it#
The repository is the app as an ordinary .NET project:
| Path | What it is |
|---|---|
Project.cs |
the app’s main code - the body of BuildAsync() |
other *.cs files, in any folder |
the app’s other C# files, compiled with it |
resources/ |
what the app serves and reads: its front end, its migrations |
docs/, tests/ |
its documentation and tests |
| anything else | kept with every version, never compiled or served - the sources of a front end, a README |
Program.cs, the .csproj, Platform/, Dockerfile, .gitignore, .dockerignore, AGENTS.md, CLAUDE.md, and LICENSE while the source is published |
the platform’s files, which make it a project that runs locally |
The platform’s files are the same in every commit; a push that changes, adds or removes one is refused. AGENTS.md explains the repository to coding agents - Claude Code reads it through CLAUDE.md. Locally, Platform/ stands in for the platform: the workspace is the folder workspace/, the database database/database.db, and Secret.Read("NAME") reads the environment variable NAME.
The app’s data is never in the repository: no database, no files of the workspace, no secret.
main: versions#
Every commit pushed to main becomes the next version, in order.
- The first line of the commit message is the version’s change - what the owner reads in the history. The rest of the message is kept as what was asked for and why.
mainonly moves forward: no force pushes, no merge commits. If a version was saved meanwhile - in the editor, by an agent - the push is refused;git pull --rebaseand push again.- A push is compiled first, and refused if it does not compile; the errors come back with file and line.
git push -o deployputs the newest version online with the push.
Shell
git commit -am "Shows the day every task is due"
git push -o deploy
Branches: drafts#
Every other branch is a draft, with its own preview and test data.
Shell
git switch -c due-dates
# change, commit
git push -u origin due-dates # starts the draft, its preview online
- The first push of a branch starts a draft from the newest version among its commits, with a copy of the app’s data. The answer names the preview’s address.
- Every later push replaces the draft’s files and puts the preview online. Force pushes are fine here.
git push origin due-dates:mainturns each of its commits into a version and deletes the draft. Add-o deployto put the newest online.- Or push the branch’s last commit with
-o mergeto make it one version, and-o deploywith it. git push origin --delete due-datesdiscards the draft.
Only a draft that holds the newest version can be merged. If main moved on, git rebase origin/main first. Drafts started in the editor or by an agent appear as branches after git fetch.
What a push says#
Every push is answered with remote: lines: the versions or the draft it became, whether it compiled, what went online and where, and what to do next. When a push is refused, they say why.
Options such as -o deploy travel only with a push that changes something. To put a version online that is already pushed, deploy it in the editor or with POST /api/v1/lambdas/<editor key>/deployment/start.
What is refused#
- changing, adding or removing one of the platform’s files;
- executable files and symbolic links - run a script through its interpreter;
- tags, and anything in
class ProjectbesidesBuildAsync(); - a push to
mainwith more commits than the installation keeps versions - squash them; - what any save is refused for: names a file cannot have, a version larger than the tier allows, a push to a demo.
Front ends built with a tool#
The platform builds nothing. If part of an app is made by a tool - a bundled front end, compiled styles - keep its sources in a folder of their own with a README.md saying how to build, run the build locally into resources/, and commit the sources and what the build wrote together. Keep what the tool installs (node_modules/) out with a .gitignore in that folder, and make the build use relative paths: an app answers below /lambda/…/ and its drafts below /features/…/.
Published sources#
An app whose owner published its code can be cloned by anybody, read only, from /source/<public key>.git - every version, without drafts.