Building from Source

Build zer0 browser from source code for development or custom deployments.


πŸ“‹ Prerequisites

  • Node.js 16+

  • Git

  • Tor Expert Bundle for your platform

  • 4 GB RAM minimum


πŸš€ Quick Build

# Clone repository
git clone https://github.com/BrowserZer0/Zer0.git
cd Zer0

# Install dependencies
npm install

# Download Tor binary
# Windows: Place tor.exe in ./resources/win/Tor/
# Linux/Mac: Place tor in ./resources/lin/

# Run development mode
npm run electron-dev

# Build production
npm run build-win    # Windows
npm run build-mac    # macOS
npm run build-linux  # Linux

πŸ“ Project Structure

zero_browser/
β”œβ”€β”€ public/              # Electron main process
β”‚   β”œβ”€β”€ electron.js     # Main entry
β”‚   β”œβ”€β”€ preload.js      # Preload scripts
β”‚   └── functions/      # Tor, updater, etc.
β”œβ”€β”€ src/                # React UI
β”‚   β”œβ”€β”€ components/     # UI screens
β”‚   └── electron-tabs/  # Tab implementation
└── dist/              # Build output

πŸ”§ Development

# Start dev server
npm start

# Run with Electron
npm run electron-dev

# Run tests
npm test

# Lint code
npm run lint

πŸ“¦ Build Scripts

{
  "electron-dev": "concurrently \"npm start\" \"electron .\"",
  "build-win": "electron-builder build --win",
  "build-mac": "electron-builder build --mac",
  "build-linux": "electron-builder build --linux"
}

πŸ› Troubleshooting

Tor not found:

Build fails:

  • Clear node_modules: rm -rf node_modules && npm install

  • Update Node: Use v16 or later

Electron won't start:

  • Check port 3000 is free

  • Try: npm run electron-dev


πŸ“š Next Steps


Need help? Join our Discord or email [email protected]

Last updated