This bit of fun was brought to you through the amazing power of Tailscale, and the collaborative efforts of
<canvas>
)together with a lovely and inspirational crew of supporters. There's lots more fun still to be had, so if you want to jump in, read on! There is also a wishlist of TODO items at the bottom.
tmemes
is a web app built mainly in Go and running on tsnet
. This
is a very terse description of how it all works.
The server is tmemes
, a standalone Go binary using tsnet
. Run
TS_AUTHKEY=$KEY go run ./tmemes
to start the server. Make sure your tailnet ACL allows access to this node,
and you should be able to visit http://tmemes
in the browser.
The server "database" is a directory of files. Use --data-dir
to set the
location; it defaults to /tmp/tmemes
.
Terminology:
Types are in types.go
.
The data directory contains an index.db
which is a SQLite database (schema
in store/schema.sql), plus various other directories of image content:
templates
are the template images.macros
are cached macros (re-generated on the fly as needed).static
are some static assets used by the macro generator (esp. fonts).The store
package kinda provides a thin wrapper around these data.
UI elements are generated by Go HTML templates in tmemes/ui
. These are
statically embedded into the server and served by the handlers.
Static assets needed by the UI are stored in tmemes/static
. These are
served via /static/
paths in the server mux.