Gaga - A simple planning poker app for remote teams using LiveView

Hey everyone! I’ve been working on a small poker planning app recently.

I use it with my customers as we are all working remotely due to COVID…

I thought it might help some other teams out there, so I took some time to clean up the repo (in case someone finds it useful as an example :sweat_smile:) and pushed it to GitHub.

For the technical part, it only uses LiveView, Presence, and PubSub (no database, Redis, or JS, though I might have to add some to copy the game URL into the clipboard some day ^^).

The game logic is about 100 lines (+ 60 if you add the view helpers).
I included some pointers to the interesting files in the README.

The game is also completely decentralized and lives entirely in the LiveView.

The initial implementation used GenServer to keep the game state and handle round events. Then I realized it wasn’t necessary, thanks to Presence already doing all the job of broadcasting and synchronizing the state (aka “the votes”).
Everything else is done in the LiveView, which is what I found interesting as it made the whole app much more straightforward (even if we shouldn’t put too many things in the Presence :yum:).
Hopefully, this might be inspiring to the curious people here :wink:.

It took about half a day to release & deploy the first version (+ some more hours to add a Readme, some open graph meta, and hide all the signing salts in env variables before making the repo public :wink:).

It was quite a fun experience all along!

Oh, and the docker image is 11MB :lollipop:.

You can try it live here, or check out the source code on GitHub.

I hope you’ll like it!

9 Likes

nice,thank for sharing,I could use this example in my learning process.

This is a very nice example, thank you very much.

I have one general point regarding Live View and I will take your app as an example. I tested you app on an iPad safari browser and I was able to enter a name and to start the game, but I was not able to press a button. In chrome on an iPad it works.

Is it possible to build a Live View app, which is unobtrusive, so you can also use it when the javascript is broken?

Best Regards

If you can load the page, but not create any “actions” like clicking, you might have a problem with the Websocket connection. A common fix for this is to fall back to LongPoll if the Websocket connection cannot be established. You can use Jose Valim’s solution for this: https://github.com/phoenixframework/phoenix/issues/2914#issuecomment-693562742

1 Like

This is really cool, just the size/type of the project I need at my learning stage right now :slight_smile: