项目
在 GitHub 查看
thisistonydang/liveview-svelte-pwa
关于
Local-First 的 LiveView Svelte 待办应用
网站与应用开发实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文Local-First LiveView Svelte ToDo App
This to-do app is a demo of an installable Phoenix Progressive Web App (PWA) that can sync real-time across multiple devices while also being able to work locally offline.
Detailed Video Walkthrough
Live Demo
A live demo of the app can be found here.
Running Locally
You can run this app locally by following the steps below after cloning the repo.
- Install the Phoenix dependencies.
mix deps.get
- Install the Node.js dependencies. The
--prefix assetsis required when running the command from the root directory in order to install the dependencies in theassetsdirectory.
npm install --prefix assets
- Create the database.
mix ecto.create
- Start the Phoenix server.
mix phx.server
Deploying the Project
To deploy this app to Fly.io, run the following commands.
Note: You will need to have an account with Fly and
flyctl installed.
- Remove the
fly.tomlfile. A new one will be created when you runfly launch.
rm fly.toml
- Initialize and deploy the project. Fly will automatically detect the app type and set up the necessary configuration. You can tweak the settings or stick with the defaults, but make sure that a Postgres database is included in the configuration settings.
fly launch
Technologies Used
- Phoenix LiveView, PubSub, and Ecto/PostgreSQL for real-time syncing and data persistence.
- Svelte (via LiveSvelte) for the frontend UI and state management.
- Service Workers, Web Storage, and IndexedDB (via y-indexeddb) for offline support.
- CRDTs (via Yjs) to resolve conflicts between distributed app states.
Inspired By
- Wout De Puysseleir - LiveSvelte - Render Svelte directly into Phoenix LiveView with E2E reactivity.
- Ryan Cooke - Ryan Cooke - E2E Reactivity - using Svelte with Phoenix LiveView
- Daniils Petrovs - SvelteKit: From landing page to offline PWAs
Contact
Created by Tony Dang. Please feel free send any questions or feedback to [email protected].
探索相关项目
加载中…
