servitor

single-binary framework for personal apps with a git data store

You have built a personal app.

Where should you host it? Cloud? Datacenter? Home server? Maybe.

How about git!?

servitor is a system for building and locally hosting apps with the whole data layer being stored in git and automatically synced as you work


how does it work?

There is nothing novel about the tech.

servitor is a single-binary Go app that reads a config file, and serves static frontend content over a socket. For any API call it uses a CGI-like interface to invoke the backend binary (can be Go or anything else)

The backend is responsible for interacting with the data layer, which lives in data/. The data format can be anything, git will eat it. Text is preferred though. JSON, yaml, txt, csv, whatever fits your app. It's your app.

The servitor app automatically commits and pushes changes to git after a period of inactivity, or upon exit, whichever comes first.

There is no elaborate conflict resolution. servitor is intended to be single-player. If you need multi-tenancy, this is not what you're looking for.

That's it!

Useruser
Frontendfrontend
Backendbackend
Gitgit

Look, it's the three tiers!


why!?

hosted (by someone else)

Someone is already taking care of hosting git for you. Depending on your provider, this brings certain durability guarantees.

free PITR

You get PITR - Point In Time Recovery! For free! Funny!

readable data

It's just text, meaning you can look at your data through your git web UI, in a pinch.

agent-friendly

The backend design is inspired by CGI, deliberately, to have dual-use as a CLI tool for your agent.

ok, fine. how?

Simple:

# download a template
servitor init 

The template is coming from here.

After that you take the pre-built template and build your app using your favourite coding method (agents welcome, we got SKILL.mds).

And then:

# host it
servitor
# hell, put that into systemd! go nuts!

this is your app

my-app/
├── .servitor.conf
├── frontend/
│   └── index.html
├── backend/
│   └── servitor-backend
├── data/
└── .git/
and this is its config:
server:
  port: 8080
  host: 127.0.0.1

frontend:
  path: ./frontend

backend:
  path: ./backend/servitor-backend
  api_prefix: /api
  timeout: 3s

sync:
  enabled: true
  inactivity_delay: 30s
  max_interval: 5m

"i have multiple apps"

Yeah, me too. servitor supports that as well. Your multiple apps share a common configuration telling the servitor binary how to host them. Nesting, baby!
And now, this is your config:
server:
  port: 8080
  host: 127.0.0.1

apps:
  - name: notes
    path: ./apps/notes
  - name: wiki
    path: ./apps/wiki

what about my agents?

Well, the backend API is served through a CGI-like interface. That means that you can teach your agent to invoke it and interact with your data.
Give your agent a SKILL.md to tell it how to invoke the backend, point it to the API documentation, and you're off to the races!

get it? get it:

release page SKILL.md