Solel//dev docs

Addresses

An app with a back end can have its own address, so people can open it in any browser or on a phone, not only in a window on the desktop. Solel's router publishes it, and signs people in before they reach your app.

Asking for one

Add subdomain to your manifest:

"subdomain": "notes"
  • Where. notes is published under the apps' addresses, shown in Settings › Network. That's Solel's own address unless an admin set another, so with home.example.com it's notes.home.example.com.
  • One person's install gets their username added, like notes-sam.home.example.com, so everyone can have their own.
  • Before Solel's address is set, there's nowhere to publish it, and the app works only in its window.

Who reaches it

Visitors sign in with their Solel account first. An app installed for everyone is open to the household, and one installed for a person only to them. Your back end is told who they are in X-Solel-User, X-Solel-Username, X-Solel-Name and X-Solel-Role, and never sees the sign-in cookie.

Trust those headers only when X-Solel-Proxy-Token matches your SOLEL_APP_TOKEN. See Back ends and workers.

Public paths

List paths anyone may visit without signing in, such as share links, in public:

"public": ["/s/"]

Each starts and ends with /, and you can list up to 10. Nobody is signed in there, so no identity headers come, but X-Solel-Proxy-Token still does. A request with . or .. in its path, an encoded or doubled slash, or a backslash isn't treated as public.

While it's down

While your back end is starting, restarting or down, visitors get a short page saying the app isn't available right now, with 503 and Retry-After: 30.

Clashes, DNS and certificates

  • Clashes. A route someone set up by hand keeps its address. If yours is taken, your app isn't published.
  • It follows the app. The route shows in Settings › Network, marked with your app, but can't be changed there. Turning the app off or removing it takes the address down.
  • DNS and certificates work as for any route. See Network and domains.

Your own address

Your back end can find its address with GET $SOLEL_CORE_URL/api/apps/self, sending its token, to give out links to itself:

{
  "id": "<install id>", "appId": "com.example.notes", "version": "1.2.0",
  "forEveryone": true, "grants": ["notify"],
  "address": { "host": "notes.home.example.com" },
  "serverName": "den"
}
  • address is left out for an app without a subdomain. While it isn't published, it has a problem, saying why, instead of a host.
  • serverName is the server's own name, to tell people where something runs.