How the91455/zerowawe works
Purpose and delivery model
Zerowawe is an anonymous peer-to-peer messaging client: users receive/share a nickname, establish direct WebRTC connections, and exchange messages and media without a central message server. It is a React single-page application, packaged for mobile through Capacitor.
Application bootstrap
The browser app starts at src/main.jsx, which mounts the React root and global styling. src/App.jsx is the primary application-level composition point; given the compact source tree, it likely owns the main screen/state transitions for landing, identity, connection, sharing, and chat. index.html is the Vite HTML host.
Paths: src/main.jsx, src/App.jsx, index.html
P2P communication boundary
The intended transport is WebRTC via PeerJS. PeerJS/WebRTC is the critical external boundary: connection negotiation may require PeerJS infrastructure, but chat payloads are designed to travel directly between peers rather than through an application backend. The client must treat peer availability, connection lifecycle, message delivery, and media transfer as asynchronous network state.
Paths: src/App.jsx, package.json
Identity and privacy primitives
Anonymous identity is nickname-based rather than account-based. Nickname generation is isolated in src/utils/nicknames.js, making it the boundary for the “infinite identity” algorithm and shareable peer identifier format. Cryptographic behavior, if used for client-side identifiers or payload protection, is isolated in src/utils/crypto.js; it should remain separate from UI state and transport wiring.
Paths: src/utils/nicknames.js, src/utils/crypto.js, src/App.jsx
User interaction and sharing flow
The primary control flow is: initialize/generate a nickname, expose it for QR or native sharing, accept or target another peer nickname, establish a P2P session, then render and exchange chat/media events. UI implementation is concentrated in the app component and custom CSS, rather than a component-heavy design system.
Paths: src/App.jsx, src/App.css, src/index.css
Mobile runtime integration
Capacitor provides the native mobile shell and platform bridge for the web application. Native Share and device-oriented distribution are architecture-relevant capabilities, while the React/Vite build remains the core UI runtime.
Paths: capacitor.config.json, package.json, vite.config.js
Assets and deployment surface
Static branding and runtime-served assets are under public/; design reference screenshots live separately under assets/screenshots/. The Vite build produces the web bundle consumed directly in browsers or embedded by Capacitor.
Paths: public, public/logo.png, assets/screenshots
Main entry points: App.jsx Identity, share and chat UI · vite.config.js Vite build · main.jsx React bootstrap · package.json Dependencies and scripts
Components 16
Web application
React/Vite client runtime.
- Vite HTML host
index.html - React bootstrap · Mounts the React root and global styles.
src/main.jsx - App composition · Owns primary screen and session transitions.
src/App.jsx - Identity, share and chat UI · Drives nickname sharing, peer targeting, and chat/media rendering.
src/App.jsx - App styles
src/App.css - Global styles
src/index.css - Vite build · Produces the browser bundle used by web and mobile runtimes.
vite.config.js - Public assets · Branding and browser-served static files.
public
Peer-to-peer boundary
Direct asynchronous peer sessions.
- Nickname generator · Creates anonymous, shareable peer identifiers.
src/utils/nicknames.js - Crypto primitives · Keeps optional client-side cryptography outside UI and transport wiring.
src/utils/crypto.js - PeerJS / WebRTC · Negotiates connections; payloads travel directly between peers.
- Remote peer · Another Zerowawe client reached by nickname.
Mobile delivery
Capacitor packages the web client.
- Capacitor configuration
capacitor.config.json - Native mobile shell · Provides platform bridge and native sharing capability.
Other components
- Dependencies and scripts
package.json - Design screenshots
assets/screenshots
Connections 16
- Vite HTML host → React bootstrap: loads
- React bootstrap → App composition: mounts
- React bootstrap → Global styles: applies
- App composition → Identity, share and chat UI: coordinates
- App composition → App styles: uses
- Identity, share and chat UI → Nickname generator: generates identity
- Identity, share and chat UI → Crypto primitives: may protect identifiers or payloads
- Identity, share and chat UI → PeerJS / WebRTC: opens and manages sessions
- PeerJS / WebRTC → Remote peer: direct WebRTC data and media
- Dependencies and scripts → PeerJS / WebRTC: declares dependency
- Dependencies and scripts → Vite build: runs build
- Vite build → Vite HTML host: builds host
- Vite build → Public assets: serves or copies
- Vite build → Native mobile shell: bundles web client for
- Capacitor configuration → Native mobile shell: configures
- Native mobile shell → Identity, share and chat UI: exposes native sharing