Thanks to visit codestin.com
Credit goes to github.com

Skip to content

jwjohns/Apex-Browser

Repository files navigation

Apex Browser

A privacy-first, Chromium-based web browser with built-in AI capabilities that run entirely locally by default.

Project Status: Early Development

This project is in very early stages of development. We have implemented the foundational architecture and core components, but Apex Browser requires significant community support and contributions to become fully functional.

What Works Now

  • Basic AI sidebar interface
  • Provider management system (OpenAI, Anthropic, local models)
  • Settings page at chrome://apex
  • Secure API key storage

What Needs Community Help

  • Full local AI model integration (llama.cpp runtime)
  • Page content extraction for context-aware responses
  • Vector database implementation
  • Model download and management UI
  • Cross-platform testing and builds
  • Documentation and examples
  • Performance optimization

We need your help to build this browser! If you believe in privacy-first AI and local-first computing, please consider contributing. Every contribution, whether code, documentation, testing, or feedback, helps make Apex Browser a reality.

Overview

Apex Browser is built on Chromium with a focus on user privacy and local-first AI features. All AI processing happens on your device by default, with optional cloud provider integration using your own API keys (BYOK - Bring Your Own Keys).

Key Features

  • Local AI Processing: Built-in AI models run entirely on your device
  • Privacy by Default: Zero telemetry, zero tracking, zero data collection
  • AI Sidebar: Context-aware AI assistant that can analyze and discuss web pages
  • Bring Your Own Keys: Optional integration with OpenAI, Anthropic, DeepSeek, and other providers using your own API keys
  • Vector Storage: Local SQLite-based vector database for embeddings and semantic search
  • Open Source: Full codebase transparency

Quick Start

Prerequisites

  • Chromium source tree (tested with Chromium 143+)
  • Python 3.8+
  • Ninja build system
  • Xcode (macOS) / Visual Studio (Windows) / GCC/Clang (Linux)

Building from Source

  1. Set up Chromium source tree:
# Follow Chromium's official guide:
# https://chromium.googlesource.com/chromium/src/+/main/docs/get_the_code.md

# Typical location:
cd /path/to/chromium/src
  1. Clone Apex modifications:
cd /path/to
git clone [email protected]:jwjohns/Apex-Browser.git
cd Apex-Browser
  1. Apply Apex to Chromium (method depends on your setup):

Option A - Manual file copying:

# Copy Apex-specific sources
cp -r src/apex /path/to/chromium/src/apex
cp -r src/chrome/browser/ui/webui/apex /path/to/chromium/src/chrome/browser/ui/webui/
cp -r src/chrome/browser/resources/apex /path/to/chromium/src/chrome/browser/resources/

# Apply modified files (see patches/ directory)

Option B - Using setup script (coming soon):

./setup_apex.sh /path/to/chromium/src
  1. Configure build:
cd /path/to/chromium/src
gn gen out/Apex --args='
  is_debug = false
  use_system_xcode = true
  angle_enable_metal = false
'
  1. Build:
autoninja -C out/Apex chrome
  1. Run:
# macOS
out/Apex/Apex.app/Contents/MacOS/Apex

# Linux
out/Apex/chrome

# Windows
out\Apex\chrome.exe

Architecture

Component Structure

apex/                          # Apex-specific components
├── ai/                        # AI runtime components
│   ├── core/                  # Core AI interfaces
│   ├── providers/             # Provider implementations
│   │   ├── local_provider.cc  # Local llama.cpp provider
│   │   ├── openai_provider.cc # OpenAI API integration
│   │   └── anthropic_provider.cc # Anthropic API integration
│   └── models/                # Model management
├── privacy/                   # Privacy components
│   └── key_manager.cc         # Secure API key storage
└── vector_store/              # SQLite-vec integration

chrome/                        # Modified Chrome components
├── browser/ui/webui/apex/     # WebUI handlers
│   ├── apex_ui_handler.cc     # Main settings page
│   └── apex_sidebar_handler.cc # AI sidebar handler
└── browser/resources/apex/    # Frontend resources
    ├── apex.html
    ├── apex.js
    ├── sidebar.html
    └── sidebar.js

Key Components

AI Router (apex/ai/core/ai_router.h): Central request routing system that manages provider selection and fallback logic.

Provider System: Abstraction layer supporting multiple AI backends:

  • Local (llama.cpp)
  • Ollama
  • OpenAI
  • Anthropic
  • DeepSeek
  • OpenRouter
  • Custom endpoints

Privacy Layer: Ensures all API keys are stored securely in OS keychains and no telemetry is sent.

WebUI Integration: Custom chrome:// pages for settings and sidebar interface.

Privacy Principles

  1. Local-First: AI features work offline by default
  2. No Telemetry: Absolutely zero usage tracking or data collection
  3. Secure Storage: API keys stored in OS keychain (Keychain on macOS, Credential Manager on Windows, Secret Service on Linux)
  4. Transparent Logging: All AI requests logged locally for user audit (content never leaves device)
  5. User Control: Full control over which providers are used and when

Using the AI Sidebar

  1. Navigate to any webpage
  2. Open the AI sidebar (View menu or keyboard shortcut)
  3. Ask questions about the page content
  4. The AI will use page context to provide relevant answers

The sidebar uses your default AI provider (local by default). Configure providers at chrome://apex.

Configuration

Setting up Local AI (Default)

Local AI is enabled by default using bundled models. No configuration required.

Adding Cloud Providers (Optional)

  1. Navigate to chrome://apex
  2. Click "Add Provider"
  3. Select provider type (OpenAI, Anthropic, etc.)
  4. Enter your API key
  5. Test connection

API keys are stored securely in your system keychain and never transmitted except to the provider you configured.

Development

Code Style

Apex follows Chromium's coding style:

Testing

# Run Apex-specific unit tests
out/Apex/apex_unittests

# Run browser tests
out/Apex/browser_tests --gtest_filter="Apex*"

Project Structure

All Apex-specific code lives in:

  • src/apex/ - Core C++ components
  • src/chrome/browser/ui/webui/apex/ - WebUI handlers
  • src/chrome/browser/resources/apex/ - Frontend resources

Modified Chromium files are documented in patches/ directory.

Modified Chromium Files

The following Chromium files have been modified for Apex integration:

  • chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc - Register Apex WebUI
  • chrome/common/webui_url_constants.cc - Add chrome://apex URLs
  • chrome/common/webui_url_constants.h - URL constant definitions
  • chrome/browser/ui/BUILD.gn - Build configuration
  • chrome/browser/resources/chrome_paks.gni - Resource packaging

See patches/ directory for detailed diffs.

Roadmap

Completed

  • AI Router architecture
  • Local AI provider (llama.cpp integration)
  • AI Sidebar interface
  • Settings page (chrome://apex)
  • Provider management system
  • Secure API key storage

In Progress

  • Page content extraction for context-aware responses
  • Sidebar toggle button in browser chrome
  • Model download and management UI

Planned

  • Vector database for long-term memory
  • Multi-tab context synthesis
  • Custom prompt templates
  • Embedding generation for semantic search
  • Browser automation capabilities
  • Extension API for AI features

Contributing

We urgently need contributors! This project is in early development and requires community effort to reach its full potential.

Areas where you can help:

  • C++ Development: Core browser features, AI integration, privacy components
  • JavaScript/UI: Settings pages, sidebar interface, user experience
  • AI/ML: Local model integration, inference optimization, embeddings
  • Documentation: Build guides, architecture docs, user tutorials
  • Testing: Cross-platform testing, performance benchmarks, bug reports
  • Design: UI/UX improvements, branding, icons

See CONTRIBUTING.md for detailed guidelines on contributing to Apex Browser.

License

Apex Browser is released under the BSD 3-Clause License, consistent with Chromium's licensing.

See LICENSE for full details.

Building for Different Platforms

macOS

gn gen out/Apex --args='
  is_debug = false
  use_system_xcode = true
  angle_enable_metal = false
'
autoninja -C out/Apex chrome

Output: out/Apex/Apex.app

Linux

gn gen out/Apex --args='
  is_debug = false
  is_component_build = false
'
autoninja -C out/Apex chrome

Output: out/Apex/chrome

Windows

gn gen out/Apex --args="is_debug=false is_component_build=false"
autoninja -C out/Apex chrome

Output: out\Apex\chrome.exe

Support

For issues, questions, or contributions, please use the GitHub issue tracker.

Acknowledgments

Apex Browser is built on Chromium, the open-source browser project. We are grateful to the Chromium team and contributors for their foundational work.

About

Privacy centric AI enabled web browser based on chromium

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published