A complete Web4 desktop application built with Electron, featuring built-in ZK-DID identity management, quantum-resistant cryptography, and real ZHTP blockchain integration.
- Quantum-Resistant Security: CRYSTALS-Dilithium signatures + CRYSTALS-Kyber encryption
- Biometric Verification: Advanced facial recognition with liveness detection
- Privacy-First: Zero-knowledge proofs for all identity operations
- One Identity Per Human: Soulbound identity with citizen onboarding
- Credential Management: Verifiable credentials with ZK proofs
- Post-Quantum Cryptography: Quantum-resistant key generation and signatures
- Multi-Wallet Support: Multiple wallets per identity with different purposes
- Real-time Balance: Live ZHTP token balance and transaction history
- UBI Integration: Automatic Universal Basic Income claiming
- Staking Support: Participate in network consensus and earn rewards
- Zero-Knowledge Voting: Private voting with verifiable results
- One Citizen One Vote: Equal representation for all verified citizens
- Proposal System: Create and vote on network governance proposals
- Treasury Management: Community-controlled fund allocation
- Execution Engine: Automatic proposal implementation
- ZHTP Protocol: Native support for zhtp://, zk://, mesh://, dao:// protocols
- Decentralized DNS: ZDNS resolution for .zhtp domains
- dApp Integration: Seamless dApp discovery and launching
- Real-time Updates: WebSocket integration for live network data
- social.zhtp: Decentralized social network with ZK privacy
- whisper.zhtp: End-to-end encrypted messaging with token burning
- marketplace.zhtp: P2P commerce with automatic escrow
- dao.zhtp: Community governance interface
- stats.zhtp: Real-time network statistics and analytics
- Electron: Cross-platform desktop app framework
- Native Menus: Full application menu with keyboard shortcuts
- File System Integration: Identity backup/restore with native dialogs
- Cross-Platform: Windows, macOS, and Linux support
- Vanilla JavaScript: No framework dependencies for maximum performance
- Web Crypto API: Browser-native cryptographic operations
- WebSocket: Real-time communication with ZHTP network
- Electron IPC: Communication between main and renderer processes
- Quantum-Resistant: CRYSTALS-Dilithium/Kyber simulation
- Zero-Knowledge Proofs: Plonky2 integration (simulated for web)
- BLAKE3 Hashing: High-performance cryptographic hashing
- Secure Storage: Encrypted local storage for sensitive data
- ZHTP Blockchain: Real API integration with ZHTP node
- WebRTC: Peer-to-peer communication for mesh networking
- Biometric APIs: Camera access for identity verification
- Native OS: Platform-specific features and notifications
-
ZHTP Node: Ensure ZHTP blockchain node is running
cd ../core cargo run --bin zhtp-node -
Node.js: Version 16 or higher
-
Install Dependencies
npm install
-
Start Desktop App (Development)
npm run dev
-
Start Desktop App (Production)
npm start
-
Build for Current Platform
npm run build
-
Build for Windows
npm run build-win
-
Build for macOS
npm run build-mac
-
Build for Linux
npm run build-linux
-
Package for All Platforms
npm run package
- Menu: Identity β Create ZK-DID Identity
- Keyboard:
Ctrl+N(Windows/Linux) orCmd+N(macOS) - Complete biometric verification with camera
- Your quantum-resistant identity is created and stored securely
- Menu: Wallet β Open Wallet
- Keyboard:
Ctrl+W(Windows/Linux) orCmd+W(macOS) - View ZHTP token balance and transaction history
- Send tokens to other ZHTP addresses
- Claim Universal Basic Income (UBI) payments
- Menu: DAO β View Proposals
- Keyboard:
Ctrl+P(Windows/Linux) orCmd+P(macOS) - Cast zero-knowledge votes on proposals
- Create new proposals for network improvements
- Track proposal execution and results
- Use the address bar to navigate to
.zhtpdomains - Menu: Navigate β Social Network, Marketplace, etc.
- Discover and launch decentralized applications
- Access built-in dApps directly from menu
- Backup Identity: Identity β Backup Identity
- Restore Identity: Identity β Restore Identity
- Manage Multiple Identities: Identity β Manage Identities
- Secure file-based backup and restore system
- About ZHTP Web4 App
- Preferences (
Ctrl+,) - Quit (
Ctrl+Q)
- Create ZK-DID Identity (
Ctrl+N) - Manage Identities (
Ctrl+I) - Backup Identity
- Restore Identity
- Open Wallet (
Ctrl+W) - Send Tokens (
Ctrl+S) - Claim UBI
- Transaction History
- View Proposals (
Ctrl+P) - Create Proposal
- Vote on Proposals
- Treasury Status
- Home (
Ctrl+H) - Social Network
- Marketplace
- Whisper Messaging
- Back (
Ctrl+Left) - Forward (
Ctrl+Right) - Refresh (
Ctrl+R)
- Developer Tools (
F12) - Reload App (
Ctrl+Shift+R) - Node Status
- Network Statistics
Create .env file for custom configuration:
ZHTP_NODE_URL=http://localhost:8080
NETWORK_TYPE=mainnet
DEBUG_MODE=false
ENABLE_BIOMETRICS=trueAccess via ZHTP β Preferences:
- Network Configuration: ZHTP node URL and connection settings
- Privacy Settings: ZK privacy defaults and data handling
- Notification Settings: Real-time update preferences
- Developer Mode: Advanced debugging and testing features
- Secure Storage: OS-level encrypted storage for keys
- Process Isolation: Electron main/renderer process separation
- File System Access: Controlled file access for backups
- Certificate Handling: Proper SSL/TLS certificate validation
- Key Generation: CRYSTALS-Dilithium/Kyber algorithms
- Digital Signatures: Post-quantum signature schemes
- Encryption: Hybrid quantum-classical encryption
- Key Storage: Platform-specific secure storage
- Identity Proofs: ZK proofs for identity verification
- Transaction Privacy: Private transaction amounts and recipients
- Voting Privacy: Anonymous voting with verifiable results
- Credential Privacy: Selective disclosure of identity attributes
- Windows 10 and 11
- Native Windows installer (NSIS)
- Windows-specific features and notifications
- macOS 10.14 (Mojave) and later
- Apple-signed DMG installer
- macOS menu bar integration
- Ubuntu 18.04+ and other major distributions
- AppImage format for universal compatibility
- Linux desktop environment integration
packages/browser/
βββ main.js # Electron main process
βββ src/
β βββ main.js # Frontend application entry
β βββ api/
β β βββ zhtp-api.js # ZHTP blockchain API client
β βββ identity/
β β βββ zkdid-manager.js # ZK-DID identity management
β β βββ biometric-verifier.js # Biometric verification
β βββ wallet/
β β βββ quantum-wallet.js # Quantum-resistant wallet
β βββ dao/
β β βββ dao-manager.js # DAO governance system
β βββ navigation/
β βββ navigation-manager.js # Web4 navigation
βββ assets/
β βββ icon.png # App icon (PNG)
β βββ icon.svg # App icon (SVG)
βββ index.html # Main HTML entry point
βββ package.json # Dependencies and scripts
// Main process to renderer communication
mainWindow.webContents.send('create-identity');
mainWindow.webContents.send('navigate-url', 'social.zhtp');
// Renderer to main process communication
const result = await ipcRenderer.invoke('show-save-dialog', options);
const fileData = await ipcRenderer.invoke('read-file', filePath);# Development with hot reload
npm run dev
# Build distributable packages
npm run build
# Platform-specific builds
npm run build-win # Windows installer
npm run build-mac # macOS DMG
npm run build-linux # Linux AppImage
# Package all platforms
npm run package- Configure electron-updater for automatic updates
- Code signing for security and trust
- Update channels for beta/stable releases
- GitHub Releases for download distribution
- Platform-specific app stores
- Enterprise deployment options
- Fork the repository
- Create feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open Pull Request
- Security First: All crypto operations must be secure
- Performance: Optimize for desktop and mobile devices
- Privacy: No user data tracking or analytics
- Accessibility: Support screen readers and keyboard navigation
- Cross-Platform: Ensure compatibility across all supported platforms
This project is licensed under the MIT License - see the LICENSE file for details.
- Electron Team: Cross-platform desktop app framework
- CRYSTALS Team: Post-quantum cryptography algorithms
- Plonky2 Team: Zero-knowledge proof system
- ZHTP Community: Protocol design and implementation
- Web4 Vision: Decentralized internet architecture
- ZHTP Protocol: Technical Specification
- ZHTP Core: Blockchain Implementation
- Community: Discord Server
- Documentation: Developer Docs
π₯οΈ Welcome to the Future of the Internet - Web4 Desktop App is Here! π
- Quantum-Resistant Security: CRYSTALS-Dilithium signatures + CRYSTALS-Kyber encryption
- Biometric Verification: Advanced facial recognition with liveness detection
- Privacy-First: Zero-knowledge proofs for all identity operations
- One Identity Per Human: Soulbound identity with citizen onboarding
- Credential Management: Verifiable credentials with ZK proofs
- Post-Quantum Cryptography: Quantum-resistant key generation and signatures
- Multi-Wallet Support: Multiple wallets per identity with different purposes
- Real-time Balance: Live ZHTP token balance and transaction history
- UBI Integration: Automatic Universal Basic Income claiming
- Staking Support: Participate in network consensus and earn rewards
- Zero-Knowledge Voting: Private voting with verifiable results
- One Citizen One Vote: Equal representation for all verified citizens
- Proposal System: Create and vote on network governance proposals
- Treasury Management: Community-controlled fund allocation
- Execution Engine: Automatic proposal implementation
- ZHTP Protocol: Native support for zhtp://, zk://, mesh://, dao:// protocols
- Decentralized DNS: ZDNS resolution for .zhtp domains
- dApp Integration: Seamless dApp discovery and launching
- Real-time Updates: WebSocket integration for live network data
- social.zhtp: Decentralized social network with ZK privacy
- whisper.zhtp: End-to-end encrypted messaging with token burning
- marketplace.zhtp: P2P commerce with automatic escrow
- dao.zhtp: Community governance interface
- stats.zhtp: Real-time network statistics and analytics
- Vite: Modern build tool and dev server
- Vanilla JavaScript: No framework dependencies for maximum performance
- Web Crypto API: Browser-native cryptographic operations
- WebSocket: Real-time communication with ZHTP network
- Progressive Web App: Installable browser experience
- Quantum-Resistant: CRYSTALS-Dilithium/Kyber simulation
- Zero-Knowledge Proofs: Plonky2 integration (simulated for web)
- BLAKE3 Hashing: High-performance cryptographic hashing
- Secure Storage: Encrypted local storage for sensitive data
- ZHTP Blockchain: Real API integration with ZHTP node
- WebRTC: Peer-to-peer communication for mesh networking
- Biometric APIs: Camera access for identity verification
- Service Workers: Offline functionality and caching
-
ZHTP Node: Ensure ZHTP blockchain node is running
cd ../core cargo run --bin zhtp-node -
Node.js: Version 16 or higher
-
Install Dependencies
npm install
-
Start Development Server
npm run dev
-
Open Browser Navigate to
http://localhost:3000
-
Build for Production
npm run build
-
Preview Production Build
npm run preview
-
Start Production Server
npm start
- Click "Create Your ZK-DID Identity" on the dashboard
- Choose identity type (Citizen, Organization, Developer)
- Complete biometric verification with camera
- Your quantum-resistant identity is created and stored securely
- Navigate to wallet section or use
zhtp://wallet - View ZHTP token balance and transaction history
- Send tokens to other ZHTP addresses
- Claim Universal Basic Income (UBI) payments
- Participate in staking for network rewards
- Open DAO interface at
dao.zhtp - View active proposals and community discussions
- Cast zero-knowledge votes on proposals
- Create new proposals for network improvements
- Track proposal execution and results
- Use the address bar to navigate to
.zhtpdomains - Discover and launch decentralized applications
- Communicate via whisper.zhtp encrypted messaging
- Shop on marketplace.zhtp peer-to-peer commerce
- Connect socially through social.zhtp network
- Access developer tools at
dev.zhtp - Build smart contracts and dApps
- Test on ZHTP testnet
- Deploy to mainnet
- Monitor network statistics
The browser automatically detects and connects to ZHTP nodes:
// Priority order for node connection
const nodeUrls = [
'http://localhost:8080', // Local development
'https://node1.zhtp.network', // Public node 1
'https://node2.zhtp.network', // Public node 2
'https://bootstrap.zhtp.network' // Bootstrap node
];Create .env file for custom configuration:
VITE_ZHTP_NODE_URL=http://localhost:8080
VITE_NETWORK_TYPE=mainnet
VITE_DEBUG_MODE=false
VITE_ENABLE_BIOMETRICS=trueAccess via settings menu (βοΈ):
- Network Configuration: ZHTP node URL and connection settings
- Privacy Settings: ZK privacy defaults and data handling
- Notification Settings: Real-time update preferences
- Developer Mode: Advanced debugging and testing features
- Key Generation: CRYSTALS-Dilithium/Kyber algorithms
- Digital Signatures: Post-quantum signature schemes
- Encryption: Hybrid quantum-classical encryption
- Key Storage: Encrypted local storage with user passphrase
- Identity Proofs: ZK proofs for identity verification
- Transaction Privacy: Private transaction amounts and recipients
- Voting Privacy: Anonymous voting with verifiable results
- Credential Privacy: Selective disclosure of identity attributes
- Liveness Detection: Advanced anti-spoofing measures
- Privacy-Preserving: Biometric data never leaves device
- Multi-Factor: Combined with cryptographic authentication
- Revocation: Secure identity revocation and recovery
zhtp://identity/create- Create new identityzhtp://wallet/send?to=address&amount=100- Send tokenszhtp://dao/proposal/123- View specific proposal
zk://proof/verify/abc123- Verify ZK proofzk://private/message- Private messaging interface
mesh://node/status- Node status and connectivitymesh://peer/connect/node123- Connect to specific peer
dao://vote/proposal123- Vote on proposaldao://treasury- View treasury status
packages/browser/
βββ src/
β βββ main.js # Main application entry
β βββ api/
β β βββ zhtp-api.js # ZHTP blockchain API client
β βββ identity/
β β βββ zkdid-manager.js # ZK-DID identity management
β β βββ biometric-verifier.js # Biometric verification
β βββ wallet/
β β βββ quantum-wallet.js # Quantum-resistant wallet
β βββ dao/
β β βββ dao-manager.js # DAO governance system
β βββ navigation/
β βββ navigation-manager.js # Web4 navigation
βββ public/
β βββ zhtp-icon.svg # ZHTP logo/icon
β βββ manifest.json # PWA manifest
βββ index.html # Main HTML entry point
βββ vite.config.js # Vite configuration
βββ server.js # Production server
βββ package.json # Dependencies and scripts
The browser integrates with real ZHTP APIs:
// Example API calls
const api = new ZhtpApi();
// Blockchain operations
const balance = await api.getWalletBalance(userDid);
const result = await api.sendTokens(fromDid, toAddress, amount);
// Identity operations
const identity = await api.createIdentity(identityData);
const verification = await api.verifyIdentity(did);
// DAO operations
const proposals = await api.getDaoProposals();
const voteResult = await api.voteOnProposal(proposalId, vote);# Run tests
npm test
# Test with ZHTP node
npm run test:integration
# Test biometric features (requires camera)
npm run test:biometricFROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
COPY dist ./dist
COPY server.js ./
EXPOSE 3000
CMD ["node", "server.js"]- ZHTP node configured and running
- SSL certificates for HTTPS
- Environment variables set
- Service worker registered
- Analytics configured
- Error monitoring enabled
- Performance monitoring active
- Fork the repository
- Create feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open Pull Request
- Security First: All crypto operations must be secure
- Performance: Optimize for mobile and low-end devices
- Privacy: No user data tracking or analytics
- Accessibility: Support screen readers and keyboard navigation
- Testing: Comprehensive test coverage for all features
This project is licensed under the MIT License - see the LICENSE file for details.
- CRYSTALS Team: Post-quantum cryptography algorithms
- Plonky2 Team: Zero-knowledge proof system
- ZHTP Community: Protocol design and implementation
- Web4 Vision: Decentralized internet architecture
- ZHTP Protocol: Technical Specification
- ZHTP Core: Blockchain Implementation
- Community: Discord Server
- Documentation: Developer Docs
π Welcome to the Future of the Internet - Web4 is Here! π