GitHub - HowProgrammingWorks/PWA: Progressive Web Application
Repository navigation
PWAPublic
About
Progressive Web Application
youtube.com/@TimurShemsedinovResources
Readme MIT license Activity Custom propertiesStars
82 starsWatchers
6 watchingForks
20 forks Report repositoryBranches
Tags
Go to Branches page Go to Tags page
Latest commit
History
20 Commits
View commit history for this file.
Folders and files
| Name | Name | Last commit message | Last commit date |
|---|---|---|---|
| Application | Application | ||
| .editorconfig | .editorconfig | ||
| .gitignore | .gitignore | ||
| LICENSE | LICENSE | ||
| README.md | README.md | ||
| eslint.config.js | eslint.config.js | ||
| package-lock.json | package-lock.json | ||
| package.json | package.json | ||
| prettier.config.js | prettier.config.js | ||
| server.js | server.js | ||
Repository files navigation
Progressive Web Application with CRDT Sync
A PWA with offline-first support and CRDT-based sync over a shared WebSocket connection.
Installation
Prerequisite: Node.js 18+
- Clone this repository
- Install dependencies:
npm i - Start the development server:
node server.js - Open
http://localhost:8000in your browser
Features
- Installable app: a native App-like UX
- Real-time notifications using Websockets
- Offline support (works without an internet or server)
- Background sync and caching with service worker and CRDT
- Broad device/browser support, Linux, MacOS, Win, iOS, Android
- Single WebSocket connection shared across tabs
- Automatic reconnection, retrieving lost messages
- HTTPS headers and CORS support
- Reactions: like, dislike, etc. with counters
TODO
- Changes to
./Application/static/domain.js- Move Logger to
logger.jsand export it as a singleton - Decompose
ChatApplication: extractui.jsanddomain.js - Domain logic should live in
domain.js - Visualization and UI logic should live in
ui.js
- Move Logger to
- Unify CRDT implementations and reuse across the app, service worker, and server
- Extract
lwwandcounterintocrdt.js; apply the Strategy pattern - Import
crdt.jsfrom the service worker and server to reuse code
- Extract
- Changes to
pwa.js- Extract utility helpers (e.g., ID generation) into
utils.js - Move
EventEmitterintoevents.js
- Extract utility helpers (e.g., ID generation) into
Copyright (c) 2025 How.Programming.Works contributors
About
Progressive Web Application
youtube.com/@TimurShemsedinov