Skip to content
/ gallo Public

Web application which lets you display image attachments from Trello cards as a simple gallery. Available at https://gallo.app.

License

Notifications You must be signed in to change notification settings

rhardih/gallo

Repository files navigation

Gallo

Gallery for Trello

A digital photo frame web application, mainly targeted to run on a first generation iPad. Built on top of Trello.

  • Running version Available at gallo.app, although no promises on uptime guarantee. Can easily be self-hosted.
  • Changelog

Tech

The application is a plain old website, served by a backend written in Go and sprinkled with a dash of vanilla Javascript.

The Javascript dialect is intentionally older due to targeting Safari on iOS 5.1.1

Stylesheets are scss.

External dependencies

Running

The application is dockerized and includes files to run via docker compose:

$ docker-compose up app

Apart from the main application service, redis is included for caching HTML template renderings and API responses from Trello.

Environment

The included stubbed .env file lists a number of required and optional environment variables.

Required

  • APP_VERSION is automatically updated in the file, everytime the update_app_version make target is run. Will contain the sha of the latest commit. The value of this ends up in the version attribute of the <html> tag.
  • HOST is used to infer the return_uri for the Trello authentication flow.
  • REDIS_ADDR is the ip or hostname of the accompanying Redis server.
  • SESSION_AUTH_KEY and SESSION_ENC_KEY are both 32 character key strings, used for session encryption. A tiny Go program for generating these at random are available in keygen.go. Run with: go run scripts/keygen.go.
  • TRELLO_KEY is a Trello Developer API key. Get one here.

Optional

These are specifically related to the way the application is running on gallo.app and are only relevant if the application is deployed in a similar setup.

Others

  • APP_ENV and APP_PATH are set in the relevant compose files.

Development

For differences in local development, see docker-compose.override.yml and development.Dockerfile.

Notably, two additional services are run with a live file watcher, which handles conversion of sass to proper css.

Stability & limitations

Since Gallo has mainly been developed with the intention of running in Safari on a 1st generation iPad, spurious crashes and other odd error cases sometimes do happen. It's not the most reliable version of Safari and it has some limitations when it comes to graphics memory. E.g. here is a piece of the UIWebView documentation noting a the 10 mb limit:

https://web.archive.org/web/20130424092111/http://developer.apple.com/library/ios/navigation/

Here's others experiencing the browser crashing, due to out of memory errors:

https://stackoverflow.com/questions/2986039/ipad-iphone-browser-crashing-when-loading-images-in-javascript

Due to this, when showing images in presentation mode for a specific card, a limit exists for the number of images able to be displayed. This means that not all images will be shown at all times, but since they appear in random order, an image omitted in one showing, will probably be included in the next and vice versa.

Testing

Assuming you've got the app container running:

$ docker-compose up -d app

Run the Go test suite like so:

$ docker-compose exec app go test -v ./...

Deploying

The included Makefile has a deploy target included, which should make a rudimentary deployment easy:

$ make deploy

This make target will take care of building the application and static assets, creating the final docker image, pushing it and running the container on your DOCKER_HOST.

For a simple single host setup, using Docker Machine with the Generic driver is probably the easiest way to go.

Docs

JSDoc

Comments in Javascript sources has been written in JSDoc format and can be generated with:

$ npm run jsdoc

Generated docs will be output in ./jsdoc.

About

Web application which lets you display image attachments from Trello cards as a simple gallery. Available at https://gallo.app.

Resources

License

Stars

Watchers

Forks

Packages

No packages published