Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tailscale/tmemes

A meme generator for your tailnet!
https://github.com/tailscale/tmemes

go memes tailscale tsnet webapp

Last synced: about 2 hours ago
JSON representation

A meme generator for your tailnet!

Awesome Lists containing this project

README

        

# 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 ``)
- 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`][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:

- **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.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.

---

## Links

- [API documentation](./docs/api.md)
- [Task wishlist](https://github.com/tailscale/tmemes/issues/4) (#4)

[tsnet]: https://godoc.org/tailscale.com/tsnet