Back to Web OS

PN Web OS Documentation

A comprehensive guide to using PN's privacy-focused browser-based operating system

Overview & Architecture

PN Web OS is a browser-based operating system that prioritizes user privacy and security. Built entirely with modern web technologies, it provides a full desktop experience without compromising your data.

Key Features

  • 18 Native Applications: System tools, productivity apps, communication, networking, and development tools
  • 49 Core Services: Comprehensive system services for security, networking, UI, file operations, and advanced features
  • Zero Cloud Dependency: All data stays in your browser
  • End-to-End Encryption: AES-256-GCM encryption for all stored data
  • No Telemetry: We never collect or transmit your data
  • WebAssembly Support: Compile and run C/C++/Rust code in the browser
  • Peer-to-Peer Communications: WebRTC-based decentralized messaging and file sharing
  • IPFS Integration: Decentralized storage and content addressing
  • Open Architecture: Built on standard web technologies

System Architecture

┌─────────────────────────────────────────┐
│          PN Web OS Desktop              │
├─────────────────────────────────────────┤
│ ┌──────────┐  ┌──────────┐  ┌──────────┐│
│ │   Apps   │  │ Services │  │   Core   ││
│ │          │  │          │  │          ││
│ │ Terminal │  │ Window   │  │   Auth   ││
│ │ Files    │  │ Manager  │  │   State  ││
│ │ Browser  │  │FileSystem│  │   Types  ││
│ │ Settings │  │ Notif.   │  │   Utils  ││
│ └──────────┘  └──────────┘  └──────────┘│
├─────────────────────────────────────────┤
│         Browser Storage Layer           │
│    IndexedDB | LocalStorage | Memory    │
└─────────────────────────────────────────┘

Getting Started

1. First Login

When you first access PN Web OS, you'll be prompted to create a secure account:

  • • Choose a strong password (minimum 8 characters)
  • • Your password is used to derive encryption keys
  • • All data is encrypted locally - we never see your password

2. Desktop Interface

The desktop provides a familiar interface with:

  • Taskbar: Access running apps and system functions
  • Start Menu: Launch applications and search
  • Desktop Icons: Quick access to frequently used apps
  • Notification Center: System alerts and updates

3. Window Management

Windows can be:

  • • Dragged by their title bar
  • • Resized from corners and edges
  • • Minimized, maximized, or closed
  • • Arranged using keyboard shortcuts

3. System Applications

Core system utilities for managing your PN Web OS environment.

3.1 Terminal

A full-featured command line interface with advanced scripting capabilities and privacy tools.

File System Commands

  • ls - List directory contents
  • cd [dir] - Change directory
  • pwd - Print working directory
  • cat [file] - Display file contents
  • mkdir [name] - Create directory
  • touch [name] - Create file
  • rm [name] - Remove file/directory

Privacy & System Commands

  • encrypt [text] - Encrypt a message
  • decrypt [encrypted] - Decrypt a message
  • vpn - Show VPN status
  • privacy - Privacy shield status
  • ps - List running processes
  • uname - System information
  • date - Display current date/time

3.2 File Manager

Manage your encrypted files with an intuitive GUI featuring drag & drop, file search, and recycle bin.

Features

  • • Grid and list view modes
  • • Drag & drop file operations
  • • Context menu (right-click)
  • • Quick navigation breadcrumbs
  • • File type associations
  • • Full-text file search

Security

  • • AES-256-GCM encryption for all files
  • • Encrypted file metadata
  • • Recycle bin with 30-day retention
  • • Secure file deletion
  • • File compression support

3.3 System Monitor

Real-time system monitoring with process management, resource usage tracking, and cleanup tools.

Monitoring

  • • Real-time process list
  • • CPU usage per process
  • • Memory consumption tracking
  • • Network activity monitoring
  • • Storage usage statistics

Management

  • • Process filtering and search
  • • Export process data (JSON)
  • • System cleanup utilities
  • • Cache management
  • • Performance optimization tips

3.4 System Status

Real-time infrastructure monitoring with service health tracking, uptime statistics, and automated health checks for external services.

Public Status Page

View real-time service status for all PN Web OS infrastructure:

https://www.pn.com/status

Monitored Services

  • • PN Web OS Portal (main application)
  • • Authentication Services
  • • API Services & Endpoints
  • • Database (PostgreSQL)
  • • Cache Layer (Redis/KV)
  • • File Storage (IndexedDB)

Metrics & Features

  • • Health checks every 5 minutes
  • • 24h / 7d / 30d uptime tracking
  • • Response time monitoring
  • • Historical incident reporting
  • • Automated failure detection
  • • Real-time status updates
For Customers: Understanding Service Status

What the indicators mean:

  • ✓ Green = Service operational (working normally)
  • ⚠ Yellow = Service degraded (slower than usual)
  • ✗ Red = Service down (not responding)

Uptime percentages:

  • • 100% = Perfect availability
  • • 99%+ = Excellent (brief issues)
  • • 95-99% = Degraded (intermittent problems)
  • • <95% = Significant issues

What to do if services are down:

  1. Check the status page to see which services are affected
  2. Try refreshing your browser or clearing cache
  3. Most issues resolve within 5-10 minutes
  4. Contact support if the issue persists
For Developers: Technical Architecture

System Components:

  • • Vercel Cron Job (runs every 5 minutes)
  • • PostgreSQL database (stores check results)
  • • Redis cache (30-second TTL for status data)
  • • HTTP health check functions
  • • Public status API at /api/status

Health Check Flow:

  1. Cron triggers /api/cron/health-checks
  2. System runs HTTP checks on all enabled services
  3. Results stored in check_results table
  4. Cache updated with latest status
  5. Uptime calculated from historical data

Database Schema:

  • services - Service registry
  • health_checks - Check configurations
  • check_results - Time-series results
  • incidents - Incident tracking

API Endpoints:

  • GET /api/health - Main health check
  • GET /api/health/auth - Auth service health
  • GET /api/health/cache - Cache health
  • GET /api/health/storage - Storage health
  • GET /api/status - Public status API
  • POST /api/cron/health-checks - Run checks (protected)
For Support: Troubleshooting Workflow

When a customer reports an issue:

  1. Check status page first (www.pn.com/status)
    • - Takes 5 seconds
    • - Shows real-time service status
    • - Identifies widespread vs. isolated issues
  2. If services show down:
    • - This is a widespread outage
    • - Engineering is already aware (automated alerts)
    • - Inform customer: "We're experiencing a service disruption. Monitor status at www.pn.com/status"
  3. If services show operational:
    • - Customer-specific issue
    • - Troubleshoot: browser, cache, connection, device
    • - Check browser console for errors (F12)

Escalation Criteria:

  • • ✓ Status shows operational but customer can't access
  • • ✓ Multiple customers report same issue
  • • ✓ Security-related issues
  • • ✗ Status already shows services down (no escalation needed)
  • • ✗ Customer-specific browser/cache/connection issues

3.5 Settings

Comprehensive system configuration center for privacy, security, appearance, and data management.

Privacy & Security

  • • Auto-lock screen settings
  • • Permission management
  • • Audit log viewer

Appearance & System

  • • Theme customization (dark/light)
  • • Accessibility controls (WCAG 2.1)
  • • Keyboard shortcuts configuration
  • • Virtual desktop settings
  • • Data export/import

3.6 Developer Tools

Advanced development environment with Python REPL, WASM sandbox, and module loading capabilities.

Features

  • • Python REPL (browser-based)
  • • WASM sandbox environment
  • • Module loader for dependencies
  • • Debug console access
  • • Code execution logging

Security

  • • Sandboxed execution environment
  • • No filesystem access by default
  • • Permission-based API access
  • • Resource usage limits
  • • Isolated memory space

4. Productivity Applications

Essential productivity tools for creating, viewing, and managing content.

4.1 Text Editor

Fast, lightweight text editor with syntax highlighting and multi-file support.

Features

  • • Syntax highlighting for common languages
  • • Multi-file tabs support
  • • Auto-save functionality
  • • Find and replace
  • • Line numbers and code folding
  • • Customizable themes

Supported Formats

  • • Plain text (.txt)
  • • Markdown (.md)
  • • JavaScript/TypeScript (.js, .ts)
  • • HTML/CSS (.html, .css)
  • • JSON (.json)
  • • Configuration files

4.2 Image Viewer

View and manipulate images with zoom, rotation, and basic filters.

Features

  • • Zoom in/out with smooth scaling
  • • Rotate images (90°, 180°, 270°)
  • • Flip horizontal/vertical
  • • Basic filters (brightness, contrast)
  • • Full-screen mode
  • • Image information display

Supported Formats

  • • JPEG (.jpg, .jpeg)
  • • PNG (.png)
  • • GIF (.gif)
  • • WebP (.webp)
  • • SVG (.svg)
  • • BMP (.bmp)

4.3 Calculator

Scientific calculator with history and keyboard shortcuts.

Functions

  • • Basic arithmetic (+, -, ×, ÷)
  • • Scientific functions (sin, cos, tan)
  • • Logarithms and exponents
  • • Square root and powers
  • • Percentage calculations
  • • Memory storage (M+, M-, MR, MC)

Features

  • • Calculation history
  • • Keyboard input support
  • • Copy/paste results
  • • Degrees/radians mode
  • • Expression evaluation
  • • Clear and undo functions

4.4 Notes

Encrypted note-taking app with rich text editing and Markdown support.

Features

  • • Rich text editor
  • • Markdown rendering support
  • • Note organization with folders
  • • Tags and labels
  • • Full-text search
  • • Export notes (text, markdown)

Security

  • • AES-256-GCM encryption
  • • Encrypted metadata
  • • Auto-save with encryption
  • • Local storage only
  • • No cloud synchronization
  • • Privacy-first design

4.5 Privacy Browser

Privacy-focused web browser with built-in ad/tracker blocking and fingerprint protection.

Privacy Features

  • • Built-in ad blocker
  • • Tracker blocking (100+ domains)
  • • Automatic HTTPS upgrade
  • • Fingerprint protection
  • • Cookie isolation
  • • Do Not Track header

Features

  • • Tabbed browsing
  • • Bookmark management
  • • History tracking (optional)
  • • Private browsing mode
  • • Download manager
  • • Reader mode

5. Communication Applications

Secure, encrypted communication tools using WebRTC for peer-to-peer connections.

5.1 Secure Messenger

End-to-end encrypted messaging with WebRTC peer-to-peer architecture.

Features

  • • End-to-end encryption for all messages
  • • WebRTC peer-to-peer connections
  • • Contact public key verification
  • • Message read receipts
  • • Typing indicators
  • • File attachment support

Security

  • • RSA-2048 key exchange
  • • AES-256 message encryption
  • • No server message storage
  • • Perfect forward secrecy
  • • Peer identity verification
  • • Decentralized architecture

5.2 Video Call

Peer-to-peer video calling with screen sharing and multi-party support.

Features

  • • WebRTC video/audio streaming
  • • Screen sharing capabilities
  • • Multi-party video calls
  • • Camera/microphone controls
  • • Connection quality indicators
  • • Call recording (local only)

Requirements

  • • Camera/microphone permissions
  • • STUN/TURN server access
  • • Stable network connection
  • • Modern browser with WebRTC
  • • NAT traversal support
  • • Encrypted media streams

5.3 P2P Chat

Fully decentralized peer-to-peer messaging with no server required.

Features

  • • True peer-to-peer messaging
  • • No central server required
  • • Automatic peer discovery
  • • Mesh network topology
  • • Offline message queuing
  • • Group chat support

Privacy Benefits

  • • Zero metadata collection
  • • No message history on servers
  • • Direct peer connections
  • • End-to-end encrypted
  • • Anonymous peer IDs
  • • Self-hosted architecture

6. Network Applications

Decentralized networking tools for file sharing, IPFS, and blockchain exploration.

6.1 P2P File Share

Peer-to-peer file transfer using WebRTC data channels with no file size limits.

Features

  • • Direct peer-to-peer transfers
  • • WebRTC data channels
  • • No file size restrictions
  • • Progress tracking
  • • Resume interrupted transfers
  • • Multiple concurrent transfers

Security

  • • Encrypted data channels
  • • Files never touch servers
  • • Peer identity verification
  • • Automatic file encryption
  • • Secure connection establishment
  • • Privacy-first design

6.2 IPFS Explorer

Browse and interact with the InterPlanetary File System (IPFS) for decentralized storage.

Features

  • • Browse IPFS content by CID
  • • Upload files to IPFS
  • • Pin/unpin content
  • • Gateway selection
  • • Content preview
  • • CID sharing and QR codes

Integration

  • • Pinata pinning service
  • • Web3.Storage support
  • • Public gateway access
  • • Content addressing
  • • Immutable file storage
  • • Decentralized CDN

6.3 Block Explorer

Blockchain explorer for Bitcoin and Ethereum with transaction lookup and address monitoring (read-only).

Features

  • • Bitcoin blockchain explorer
  • • Ethereum blockchain explorer
  • • Transaction lookup by hash
  • • Address balance checking
  • • Block information display
  • • Network statistics

Important Notes

  • Read-only access
  • • No wallet functionality
  • • No transaction broadcasting
  • • Public API integration
  • • Educational/monitoring purposes
  • • Real-time blockchain data

7. Security Applications

Advanced security tools for password management and credential storage.

7.1 Vault (Password Manager)

Comprehensive encrypted password manager with secure notes, credit cards, and password generation.

Features

  • • Password storage & organization
  • • Secure notes
  • • Credit card information storage
  • • Password generator (customizable)
  • • Password strength analyzer
  • • Search and filtering

Security

  • • AES-256-GCM encryption
  • • Master password protection
  • • Auto-lock after inactivity
  • • Encrypted import/export
  • • Client-side encryption
  • • Local storage only

8. Development Applications

Advanced development tools with WebAssembly compilation capabilities.

8.1 Code Editor (WASM IDE)

WebAssembly-powered integrated development environment for C, C++, and Rust with real-time compilation.

Features

  • • C/C++/Rust code editing
  • • Real-time WASM compilation
  • • Syntax highlighting
  • • Code execution in sandbox
  • • Error highlighting & debugging
  • • Multiple file projects

Supported Languages

  • • C (via Emscripten/WASI)
  • • C++ (via Emscripten)
  • • Rust (via wasm-pack)
  • • WebAssembly Text Format (WAT)
  • • Sandboxed execution
  • • Browser-native compilation

9. Services Reference

PN Web OS includes 49 core services organized into 7 categories providing comprehensive system functionality.

9.1 Core System Services (10)

window-manager

Manages all application windows (create, close, minimize, maximize, z-index, drag, resize)

filesystem

Encrypted file system with read/write/delete operations, directory management, and AES-256-GCM encryption

indexed-db

IndexedDB storage backend for persistent data storage in browser

shell-interpreter

Command-line interpreter for Terminal with 20+ built-in commands

process-manager

Process tracking, CPU/memory monitoring, and application lifecycle management

notification-service

System-wide notifications (system, info, warning, error levels)

permissions

Permission management system for app capabilities and resource access

lock-screen

Auto-lock functionality with configurable inactivity timeout

9.2 Security & Cryptography Services (5)

crypto

AES-256-GCM encryption/decryption, PBKDF2 key derivation (600,000 iterations), hashing

password-manager

Secure password storage with generation, strength analysis, and encrypted vault

audit-log

Comprehensive security audit logging for system events and user actions. Features live monitoring, new log highlighting, retention management, and compliance-ready export.→ See detailed documentation

permission-guard

Runtime permission checking and enforcement

feature-gate

Feature flag system for enabling/disabling functionality (tier-based access)

9.3 Networking Services (6 active, 3 placeholder)

webrtc-network

WebRTC peer-to-peer networking with PeerJS (v1.5.5), STUN/TURN support, NAT traversal

ipfs-manager

IPFS integration for decentralized storage (Pinata, Web3.Storage)

pn-sync

File synchronization service (client-side ready, backend not implemented)

pn-stack

Network stack management and configuration

web3-apiPLACEHOLDER

Web3 blockchain API (not active, reserved for future use)

bitcoin-apiPLACEHOLDER

Bitcoin API integration (not active, reserved for future use)

defi-apiPLACEHOLDER

DeFi protocol API (not active, reserved for future use)

9.4 File Operations Services (6)

file-associations

File type associations for auto-opening files with appropriate apps

file-compression

File compression/decompression using browser native APIs

file-search

Full-text file search with indexing and metadata search

recycle-bin

Temporary file storage with 30-day retention and restore functionality

command-history

Terminal command history with search and persistence

context-menu

Right-click context menu system for files and UI elements

9.5 UI & Accessibility Services (9)

keyboard-manager

Global keyboard event handling and input management

keyboard-shortcuts

Customizable keyboard shortcuts for system and app actions

touch-support

Touch input handling for mobile/tablet devices

touch-gestures

Multi-touch gesture recognition (pinch, swipe, rotate)

accessibility

WCAG 2.1 AA accessibility features (screen reader support, keyboard navigation, high contrast)

window-snapping

Window snapping to screen edges (left/right/maximize)

virtual-desktops

Multiple workspace support for window organization

quick-settings

Quick access panel for common settings and toggles

privacy

Privacy controls (Do Not Track, auto-delete history, telemetry off)

9.6 Advanced Services (4)

wasm-runtime

WebAssembly runtime environment for executing WASM modules

wasm-compiler

WASM compilation service for C/C++/Rust (Emscripten, wasm-pack)

cleanup-manager

System cleanup utilities for cache, temp files, and optimization

auth-recovery

Account recovery options and backup code management

9.7 Infrastructure Services (3)

init-services

Service initialization and dependency management (server-side)

init-services-client

Client-side service initialization and bootstrapping

service-index

Central service registry and dependency injection

10. Advanced Features

Cutting-edge technologies and advanced capabilities that set PN Web OS apart.

10.1 WebAssembly Compilation

Compile and execute C, C++, and Rust code directly in your browser using WebAssembly.

  • • WASM runtime environment
  • • C/C++ via Emscripten
  • • Rust via wasm-pack
  • • Real-time compilation in Code Editor
  • • Sandboxed execution
  • • No server-side compilation needed
  • • Browser-native performance
  • • Memory-safe execution
  • • Resource usage limits
  • • Debugging support

10.2 Peer-to-Peer Communications

WebRTC-based decentralized communication eliminating the need for centralized servers.

Technology

  • • WebRTC for media/data channels
  • • PeerJS v1.5.5 library
  • • STUN/TURN servers for NAT traversal
  • • ICE candidate exchange

Applications

  • • Secure Messenger
  • • Video Call
  • • P2P Chat
  • • P2P File Share

10.3 IPFS Integration

InterPlanetary File System integration for decentralized, immutable file storage.

  • • Content-addressed storage (CID)
  • • Immutable file references
  • • Pin/unpin content
  • • Gateway access (public/private)
  • • Pinata pinning service
  • • Web3.Storage integration
  • • Decentralized CDN
  • • Persistent availability

10.4 Encryption & Privacy

Military-grade encryption and client-side security for maximum privacy.

Encryption Standards

  • • AES-256-GCM for file/data encryption
  • • PBKDF2 key derivation (600,000 iterations)
  • • RSA-2048 for key exchange
  • • SHA-256 hashing

Privacy Architecture

  • • Privacy-first design
  • • Client-side encryption only
  • • No cloud data storage
  • • Local-only processing

10.5 Virtual Desktops

Multiple workspace support for organizing windows across different contexts.

  • • Multiple independent workspaces
  • • Window organization by task/project
  • • Keyboard shortcuts for switching
  • • Persistent workspace state
  • • Per-desktop wallpapers
  • • Smooth transitions

11. Security & Privacy

Privacy-First Architecture

PN Web OS implements a privacy-first architecture:

  • • All encryption happens client-side in your browser
  • • Your master password never leaves your device
  • • We cannot access your data even if we wanted to
  • • No cloud servers store your information

Encryption Standards

File Encryption

AES-256-GCM with PBKDF2 key derivation (600,000 iterations)

Message Encryption

End-to-end encryption using RSA-2048 for key exchange with AES-256 for message content

Password Storage

Encrypted vault with additional master password protection

Privacy Controls

  • Do Not Track: DNT header sent with all requests
  • Auto-delete History: Configurable automatic history cleanup
  • No Telemetry: Zero data collection or transmission
  • Local-only Data: All data stays in browser (IndexedDB)
  • Encrypted Storage: All persistent data encrypted at rest

Compliance & Standards

  • WCAG 2.1 AA: Accessibility compliance for all users
  • Privacy by Design: Privacy-first architecture from the ground up
  • GDPR-friendly: No personal data collection or processing
  • Browser Sandbox: Isolated execution environment security
  • Open Standards: WebRTC

Audit Logging & Compliance Monitoring

PN Web OS includes a production-grade audit logging system that provides comprehensive visibility into all system operations, security events, and user activities. The system is designed for compliance, security monitoring, debugging, and operational intelligence.

Live Monitoring Capabilities

  • Auto-refresh: Real-time log streaming with configurable intervals (5s, 15s, 30s, 60s)
  • New log highlighting: Green border + pulse animation for newly arrived logs (30-second highlight)
  • Critical log alerts: Immediate visual notifications for security/critical events
  • Jump to newest: One-click navigation to most recent entries
  • Last updated indicator: Real-time freshness timestamp

Scalable Performance Management

  • Automatic log retention: Configurable limits (500, 1,000, 2,000, 5,000 logs, or unlimited)
  • Auto-pruning: Intelligent cleanup at 110% threshold to maintain performance
  • Performance warnings: Proactive alerts at 90% capacity before auto-pruning
  • Memory management: Constant memory footprint (~50MB) regardless of session duration
  • Sustainable monitoring: Supports 8+ hour continuous monitoring sessions

What Gets Logged

Authentication Events

  • • Login attempts (success/failure)
  • • Logout actions
  • • Session restoration
  • • 2FA setup and verification
  • • Account creation
  • • Password changes

File Operations

  • • File creation, modification, deletion
  • • Recycle bin operations
  • • Permanent deletions
  • • File uploads/downloads
  • • Encryption operations

System Events

  • • Application launches
  • • Settings changes
  • • Service initialization
  • • Error conditions
  • • Performance metrics

Security Operations

  • • Permission checks
  • • Vault access
  • • Encryption key usage
  • • Security policy changes
  • • Failed authorization attempts

Log Severity Levels

INFO

Normal operations: User actions, routine events, system status updates. Displayed with blue border.

SECURITY

Security-relevant events: Authentication, authorization, encryption operations. Displayed with yellow border + critical badge.

CRITICAL

Critical operations: Data deletion, security failures, system errors. Displayed with red border + critical badge.

Note: New logs (from auto-refresh) temporarily display with a green border regardless of severity level for 30 seconds.

Using the Audit Log Viewer

🔴 Accessing the Viewer

Open the Settings application → Navigate to System tab → Click "View Audit Logs"

⚡ Enable Live Monitoring

  1. Click the "Live" button (turns green when active)
  2. Select refresh interval from dropdown (5s, 15s, 30s, or 60s)
  3. New logs appear with green highlighting for 30 seconds
  4. Critical/security logs show red badge in notification
  5. Click "Manual" button to disable auto-refresh

🔍 Filtering Logs

  • Search: Free-text search across all log fields
  • User ID filter: View logs from specific user
  • Session filter: Track single session activity
  • Category filter: auth.login, file.delete, etc.
  • Severity filter: INFO, SECURITY, CRITICAL
  • Date range: Start and end date selection
  • Quick filters: Click any category, user, or session ID in log cards to filter instantly

💾 Saved Filter Presets

  1. Configure your desired filters
  2. Click "Save Preset" button
  3. Enter a descriptive name (e.g., "Failed Logins", "File Deletions")
  4. Preset appears in saved list for one-click application
  5. Presets persist across sessions (localStorage)

⚙️ Configure Retention Settings

  1. Click the gear icon (Settings) in toolbar
  2. Select retention limit: 500, 1,000 (recommended), 2,000, 5,000, or unlimited
  3. Toggle auto-pruning on/off (enable for long sessions)
  4. Settings save automatically to localStorage
  5. Yellow warning appears at 90% capacity

Tip: Export logs before they're auto-pruned if you need historical data for compliance.

Export & Compliance

Export Formats

  • JSON Export: Complete log data with all metadata, timestamps, and context. Ideal for programmatic analysis, backup, or import into other systems.
  • CSV Export: Spreadsheet-compatible format with proper field escaping. Perfect for compliance audits, reporting, and data analysis in Excel/Google Sheets.

Export Workflow

  1. Apply filters to select specific logs (or export all)
  2. Click "JSON" or "CSV" button in toolbar
  3. File downloads with timestamp: audit-logs-2025-11-04T15:23:45.json
  4. Exported data respects current filter settings

Compliance Use Cases

  • Security Audits: Export all SECURITY/CRITICAL logs for review
  • Incident Investigation: Filter by time range + user, export for analysis
  • Compliance Reports: Scheduled exports for regulatory requirements
  • Legal Discovery: User activity timeline with full context
  • System Health Reports: Error logs + performance metrics

Technical Implementation (For Developers)

Storage

  • Database: IndexedDB (webos-audit-log)
  • Persistence: Survives browser restarts
  • Encryption: Optional per-user encryption available
  • Retention: 30 days default, configurable

Log Entry Structure

{
  "id": "log-1699123456789-abc123",
  "timestamp": "2025-11-04T15:23:45.123Z",
  "level": "SECURITY",
  "category": "auth.login_success",
  "userId": "user-abc123",
  "sessionId": "session-xyz789",
  "accountType": "persistent",
  "userTier": "free",
  "context": {
    "ip": "::1",
    "userAgent": "Mozilla/5.0...",
    "method": "password"
  }
}

Programmatic Access

// Log an event
import { auditLog, AuditLevel } from '@/lib/webos/services/audit-log'

await auditLog.log(AuditLevel.SECURITY, 'auth.login_success', {
  method: 'password',
  ip: request.ip
})

// Query logs
const logs = await auditLog.query({
  userId: 'user-123',
  levels: [AuditLevel.CRITICAL],
  startDate: new Date('2025-11-01'),
  limit: 100
})

// Export logs
const jsonData = await auditLog.export({
  userId: 'user-123',
  startDate: new Date('2025-11-01')
})

Performance Characteristics

  • Query Performance: <50ms for 1,000 logs, <100ms for 10,000 logs
  • Memory Usage: ~50MB constant with retention limit enabled
  • Auto-Refresh: Configurable 5-60 second intervals, minimal overhead
  • Scalability: Tested up to 50,000 logs in IndexedDB without degradation

Best Practices

For Security Teams

  • • Monitor CRITICAL/SECURITY logs in real-time during incidents
  • • Use 5-15 second refresh intervals for active monitoring
  • • Create saved presets for common investigation patterns
  • • Export logs immediately when suspicious activity detected
  • • Review failed login attempts and permission denials daily

For Compliance Officers

  • • Schedule regular exports for audit trail documentation
  • • Maintain retention settings that meet regulatory requirements
  • • Document all log exports with date ranges and purposes
  • • Use CSV exports for integration with compliance tools
  • • Review audit logs quarterly for policy compliance

For Developers

  • • Use auto-refresh during active debugging (15-30s intervals)
  • • Filter by category + session to trace specific workflows
  • • Export error logs when reporting bugs
  • • Monitor performance-related log entries
  • • Test with unlimited retention during development

For Operations Teams

  • • Set retention to 2,000-5,000 logs for 24/7 monitoring
  • • Enable auto-pruning for long-running sessions
  • • Create system health monitoring presets
  • • Export daily summaries for trend analysis
  • • Use jump-to-newest for rapid issue triage

Troubleshooting Common Issues

New logs not highlighting

Solution: Highlighting only works with auto-refresh enabled. Click "Live" button and wait for next refresh cycle. First refresh after enabling won't show highlights (no baseline to compare against).

Logs disappearing

Solution: Auto-pruning is working as designed. Check Settings → increase retention limit or disable auto-pruning. Export logs before they're pruned if you need historical data.

Performance slow

Solution: Reduce retention limit (try 1,000 or 500 logs). Use more aggressive filtering. Increase auto-refresh interval to 30s or 60s. Clear browser cache and restart.

Export not working

Solution: Check browser download settings. Ensure pop-ups not blocked. Try different export format (CSV vs JSON). Check browser console for errors (F12).

12. File System & Encryption

The PN Web OS file system provides a secure, encrypted storage solution that runs entirely in your browser. All files are encrypted before storage and decrypted on-demand.

File System Features

  • Encrypted Storage: AES-256-GCM encryption
  • File Compression: Native browser compression APIs
  • Full-text Search: Indexed search with metadata
  • Recycle Bin: 30-day retention for deleted files
  • File Associations: Auto-open with appropriate apps
  • Context Menus: Right-click file operations

Storage Backend

  • IndexedDB: Browser-native persistent storage
  • No Limits: Storage quota based on available disk space
  • Local Only: Data never leaves your device
  • Encrypted Metadata: File names and attributes encrypted
  • ACID Transactions: Reliable data integrity
  • Fast Access: Optimized for performance

File System Structure

/
├── home/
│   └── user/
│       ├── Documents/
│       ├── Downloads/
│       ├── Pictures/
│       └── .config/
└── system/
    └── apps/

Terminal Commands

CommandDescription
lsList directory contents
cd [dir]Change directory
pwdPrint working directory
cat [file]Display file contents
mkdir [name]Create directory
touch [name]Create file
rm [name]Remove file or directory
encrypt [text]Encrypt a message
decrypt [encrypted]Decrypt a message
vpnShow VPN status
privacyShow privacy shield status

13. Development Guide

Creating a New Application

To create a new application for PN Web OS:

  1. Create a new component in /lib/webos/apps/
  2. Implement the AppComponentProps interface
  3. Register the app in the desktop applications array
  4. Add appropriate icon and metadata

Application Template

'use client'

import { AppComponentProps } from '@/lib/webos/types'
import { useWebOS } from '@/lib/webos/context/WebOSContext'

export default function MyApp({ window }: AppComponentProps) {
  const webos = useWebOS()

  return (
    <div className="h-full bg-pn-gray-900">
      <h1 className="text-white p-4">My Application</h1>
    </div>
  )
}

Complete API Reference

fileSystem

Encrypted file system operations

  • readFile(path) - Read file contents
  • writeFile(path, data) - Write file data
  • mkdir(path) - Create directory
  • rm(path) - Remove file/directory
  • ls(path) - List directory contents
  • encrypt(data, password) - Encrypt data
  • decrypt(encrypted, password) - Decrypt data

windowManager

Window creation and management

  • createWindow(app) - Create new window
  • closeWindow(id) - Close window
  • minimizeWindow(id) - Minimize window
  • maximizeWindow(id) - Maximize/restore window
  • snapWindow(id, position) - Snap to edge
  • bringToFront(id) - Focus window

notificationService

System notifications

  • system(message) - System notification
  • info(message) - Info notification
  • warn(message) - Warning notification
  • error(message) - Error notification

processManager

Process lifecycle and monitoring

  • startProcess(name, metadata) - Start process
  • stopProcess(pid) - Stop process
  • listProcesses() - Get all processes
  • getProcessInfo(pid) - Get process details

crypto

Cryptography operations

  • encrypt(data, key) - AES-256-GCM encryption
  • decrypt(encrypted, key) - AES-256-GCM decryption
  • hash(data) - SHA-256 hashing
  • deriveKey(password, salt) - PBKDF2 key derivation

permissions

Permission management

  • request(permission) - Request permission
  • check(permission) - Check if granted
  • revoke(permission) - Revoke permission

WebOS Context Hook

Access WebOS services using the useWebOS() hook:

const webos = useWebOS()

// Access services
webos.fileSystem.readFile('/home/user/file.txt')
webos.notificationService.info('Hello World')
webos.windowManager.createWindow(myApp)

// Access user state
const { username, tier } = webos.user

Account & Authentication

Learn about the different ways to access PN Web OS, account creation, mode switching, and security features.

PN Web OS Documentation v1.1.0

Launch Web OS →