MyAppsTreeBeta
← Home

How MyAppsTree works: technical details

This page describes what happens when someone opens an app through MyAppsTree, how the lock works, and what is not covered. For the same in plain words, see How MyAppsTree works.

The pieces

Apps are on a different domain from the dashboard on purpose. Apps are other people's code, and browsers treat all addresses under one domain as one site. A separate domain keeps an app away from the dashboard's sign-in.

Opening a private app

  1. A visitor opens name.myappstr.ee. The gateway looks up the app.
  2. If the visitor has no pass for this app yet, they are sent to myappstree.com.
  3. They sign in with Google if needed. MyAppsTree checks that they are the owner, or that their email is shared on the app directly or through a circle.
  4. They are sent back to the app's address with a signed code that is valid for 60 seconds. The gateway exchanges it for a pass: a cookie for that one app address, valid for 7 days.
  5. On every later request the gateway verifies the pass and checks access again in the database, then forwards the request. Removing someone therefore takes effect on their next request, not when the pass runs out.

Opening a public app

There is no sign-in and no pass. The gateway forwards the request straight away, and the app receives no information about who the visitor is.

What the gateway changes in a request

The lock

The lock is a key shared between MyAppsTree and your app. MyAppsTree creates the key (64 characters, random) and stores it encrypted. The gateway sends it with every request in the X-MyAppsTree-Key header. Your app gets one check that runs before anything else:

The check has to run on a server, so the app needs a server side (for example Next.js or anything with middleware). A purely static site cannot check a key. Your coding agent writes the check from the instructions MyAppsTree gives you; you do not edit the app by hand.

Environment variables

So every published deployment is locked, and development stays open: the app on your own computer, your tool's unpublished preview, and development builds. Where a platform has its own reliable development signal, the check may use that instead of MYAPPSTREE_LOCK=off. The check never decides from the request itself (host name, headers, cookies), because a visitor can fake those. When it is not certain that the app runs in development, it stays locked.

When you create or update a key, MyAppsTree makes a one-time link and puts it in the instructions you copy for your coding agent. The agent requests the link once and stores the answer straight at your host, so the key does not appear in the chat.

"Update key" makes a new key and a new link. Until the app has the new key, it refuses visits that come through MyAppsTree as well.

What "Check" tests

MyAppsTree sends two requests to the app's original address:

When both are true, the app counts as locked and a padlock is shown next to it. The padlock shows the result of the last check. MyAppsTree does not check again by itself, so if the check is later removed from the app's code, the padlock stays until you press Check again. Updating the key or removing the lock takes the padlock away.

What is not covered

For coding agents

The exact instructions a coding agent follows are public at /agents.md, and as an installable skill at /skill.md. They are the same text the dashboard gives you to copy.