tmemes
tmemes copied to clipboard
A meme generator for your tailnet!
tmemes: putting the meme in TS
This bit of fun was brought to you through the amazing power of Tailscale, and the collaborative efforts of
- Maisem Ali: "I think we need memegen"
- M. J. Fromberger: "why did I not think of that"
- Jenny Zhang: "ok i’m finally in front of a computer, can I go write some css"
- Salman Aljammaz: (quietly moves heaven and earth inside a
<canvas>) - Shayne Sweeney: "Would I be stepping on toes if I built a Slack bot?"
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.
Synopsis
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 usingtsnet. RunTS_AUTHKEY=$KEY go run ./tmemesto start the server. Make sure your tailnet ACL allows access to this node, and you should be able to visit
http://tmemesin the browser. -
The server "database" is a directory of files. Use
--data-dirto set the location; it defaults to/tmp/tmemes. -
Terminology:
- Template: A base image that can be decorated with text.
- Macro: An image macro combining a template and a text overlay.
- Text overlay: Lines of text with position and typographical info.
Types are in
types.go. -
The data directory contains an
index.dbwhich is a SQLite database (schema in store/schema.sql), plus various other directories of image content:templatesare the template images.macrosare cached macros (re-generated on the fly as needed).staticare some static assets used by the macro generator (esp. fonts).
The
storepackage 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.
Links
- API documentation
- Task wishlist (#4)