Skip to content

ABE1617/Hyperspace-Browser

 
 

Repository files navigation

Hyperspace Browser

A next-generation AI-powered desktop browser built with Python and Electron

Version License

📋 Overview

Hyperspace Browser is a modern desktop browser that merges traditional web navigation with intelligent automation and AI reasoning. It features a sleek, dark-themed interface powered by Electron and a robust Python backend for AI operations, OCR, and browser automation.

✨ Key Features (Phase 1)

  • Modern Browser Interface: Chromium-based tabbed browsing with custom UI
  • Frameless Design: Sleek, minimalist window with custom controls
  • AI Assistant Panel: Built-in AI chat interface (ready for LLM integration)
  • Python Backend: FastAPI-based server for AI and automation
  • Tab Management: Full support for multiple tabs with smooth animations
  • Navigation Controls: Address bar, back/forward, refresh, and home buttons
  • Real-time Status: Backend connection monitoring and status updates

🚀 Quick Start

Prerequisites

Before you begin, ensure you have the following installed:

Installation

  1. Clone or navigate to the project directory

    cd Hyperspace-Browser
  2. Install Node.js dependencies

    npm install
  3. Install Python dependencies

    pip install -r requirements.txt

Running the Application

Method 1: Using Electron (Recommended)

Simply run the following command, which will automatically start both the Python backend and Electron frontend:

npm start

The application will:

  1. Launch the Python FastAPI backend on http://localhost:8000
  2. Open the Electron browser window
  3. Connect the frontend to the backend

Method 2: Manual Start (For Development)

Terminal 1 - Start Python Backend:

cd backend
python main.py

Terminal 2 - Start Electron Frontend:

npm start

📁 Project Structure

Hyperspace-Browser/
│
├── backend/                 # Python backend server
│   ├── main.py             # FastAPI server entry point
│   ├── ai/                 # AI and LLM integration (future)
│   ├── ocr/                # OCR and screen capture (future)
│   ├── control/            # Virtual mouse/keyboard (future)
│   └── utils/              # Utility functions
│
├── frontend/               # Electron frontend
│   ├── index.html          # Main UI structure
│   ├── style.css           # Styling and animations
│   ├── renderer.js         # Browser logic and IPC
│   └── assets/             # Images, icons, etc.
│
├── main.js                 # Electron main process
├── package.json            # Node.js dependencies
├── requirements.txt        # Python dependencies
└── README.md              # This file

🎨 User Interface

Browser Controls

  • Address Bar: Enter URLs or search terms
  • Navigation Buttons:
    • ← Back
    • → Forward
    • ⟳ Refresh
    • ⌂ Home
  • Tab Controls:
    • Click tabs to switch
    • ✕ to close tabs
    • + to create new tabs
  • AI Assistant: 🤖 button to open the AI panel
  • Window Controls: Minimize, Maximize, Close

Keyboard Shortcuts

  • Enter in address bar - Navigate to URL or search
  • Enter in AI input - Send message
  • Click on tabs to switch between them

🔧 Configuration

Backend Configuration

The backend runs on http://localhost:8000 by default. To change this:

  1. Edit backend/main.py and modify the uvicorn.run() parameters
  2. Update BACKEND_URL in frontend/renderer.js

Electron Window Configuration

Edit main.js to customize the window:

  • Window size: width and height properties
  • Frame style: frame property
  • Background color: backgroundColor property

🧪 API Endpoints

The backend provides the following REST API endpoints:

Endpoint Method Description
/ GET API information
/health GET Backend health check
/ai/chat POST AI chat interface (placeholder)
/ocr/capture POST Screen capture & OCR (planned)
/automation/action POST Browser automation (planned)

API Documentation

Once the backend is running, visit:

🛠️ Development

Enable DevTools

Uncomment this line in main.js:

mainWindow.webContents.openDevTools();

Hot Reload (Python Backend)

Change reload=False to reload=True in backend/main.py:

uvicorn.run(
    "main:app",
    host="127.0.0.1",
    port=8000,
    reload=True  # Enable hot reload
)

📦 Building for Production

To create a standalone executable:

npm run build

This will create installers in the build/ directory.

For Windows-specific build:

npm run build:win

🗺️ Roadmap

Phase 1: ✅ Minimal Browser Implementation (Current)

  • Electron browser shell
  • Python FastAPI backend
  • Basic UI with tabs and navigation
  • Frontend-backend communication

Phase 2: AI Integration (Planned)

  • Local LLM integration (Ollama/GPT4All)
  • AI-powered browsing assistance
  • Context-aware responses
  • Multi-agent collaboration

Phase 3: OCR & Vision (Planned)

  • Screen capture functionality
  • Text recognition with Tesseract
  • Visual element detection
  • AI-driven page analysis

Phase 4: Automation (Planned)

  • Virtual mouse and keyboard
  • AI-driven form filling
  • Automated navigation
  • Task recording and playback

Phase 5: Advanced Features (Planned)

  • Voice control integration
  • Custom plugin system
  • Theme marketplace
  • Multi-device sync

🤝 Contributing

This is a personal project, but suggestions and feedback are welcome!

📄 License

MIT License - See LICENSE file for details

🐛 Troubleshooting

Backend Won't Start

  • Ensure Python dependencies are installed: pip install -r requirements.txt
  • Check if port 8000 is already in use
  • Verify Python version: python --version (should be 3.9+)

Frontend Won't Connect to Backend

  • Check backend status in the status bar
  • Ensure backend is running on port 8000
  • Check browser console for connection errors

Webview Not Loading Pages

  • Ensure you have internet connectivity
  • Try disabling any firewall/antivirus temporarily
  • Check if the URL is valid

📞 Support

For issues and questions:


Made with ⚡ by the Hyperspace Team

About

a test project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • CSS 49.2%
  • JavaScript 34.1%
  • Python 8.6%
  • HTML 8.1%