tonydang
Offline-enabled apps with Phoenix LiveView and LiveSvelte
Hi everyone! I’m new to the forums and new to Elixir in general. To learn Elixir, I recently just completed my first app. It’s a todo app built with Phoenix LiveView, but with a twist, it can also work offline ![]()
By using the LiveSvelte package, I was able to use LiveView to render Svelte components which allows for offline-support. I know an offline app was not what LiveView was intended for, but I thought it was neat that it was possible to still use LiveView in such an app.
I haven’t gotten the chance to dive deeper into Phoenix Channels yet so I’m not sure if the app would perform better just using that instead. However, so far the app has been working well for me and the DX of using LiveView has been great. Anyhow, I thought I would share in case anyone else is interested in building offline-enabled apps with LiveView ![]()
Here’s a video I made walking through how I made the app:
Source code:
Live Demo:
Any questions and feedback welcomed!
Most Liked
tonydang
Thanks for checking out the app!
And yes, I just added an MIT license. Please feel free to use the code as you please ![]()
arcanemachine
Very cool. I tried it out and it works as promised.
Would you mind putting a license on the repo so that I know what I’m allowed to do with the code?
mmmrrr
I just saw that someone created a wrapper for y-crdt (the Rust library) in elixir: https://github.com/satoren/y_ex
Here is the announcement post on the YJS forum: https://discuss.yjs.dev/t/yrs-elixir-bindings/2826/3
That beeing said: thanks a ton for creating the example of combining yjs with svelte and live_view. It was a great read and I learned a lot from it ![]()
Popular in Discussions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance








