Skip to content

adarshba/openbridge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenBridge

An iOS app for connecting to opencode CLI servers and interacting with AI agents via chat.

SCREENSHOTS
-----------
Server Discovery Gallery
    ./Screenshots/Simulator Screenshot - iPhone Air - 2026-04-02 at 01.06.01.png

Add Server (Manual Connection)
    ./Screenshots/Simulator Screenshot - iPhone Air - 2026-04-02 at 01.06.06.png

Session List
    ./Screenshots/Simulator Screenshot - iPhone Air - 2026-04-02 at 01.06.10.png

Chat Interface
    ./Screenshots/Simulator Screenshot - iPhone Air - 2026-04-02 at 01.06.23.png

FEATURES
--------
- Automatic Discovery: Discovers opencode servers via Bonjour/mDNS on your local network
- Manual Connection: Add servers by IP address and port with connection validation
- iMessages-Style Chat: Clean, familiar messaging interface with bubble-style conversations
- Session Management: Browse, search, and create new chat sessions
- Real-Time Responses: Watch AI responses stream in with animated typing indicator
- Code Blocks: Automatic detection and formatting of code snippets in messages
- Dark Mode Support: Fully adaptive interface for light and dark themes

REQUIREMENTS
------------
- iOS 18.0+
- Xcode 15.0+
- Swift 5.9+
- opencode CLI running with 'opencode serve' (default port 4096)

INSTALLATION
------------
For Users:
Download from the App Store (when available) or build from source.

For Developers:
    git clone <repo-url>
    cd OpenBridge
    xcodegen generate
    open OpenBridge.xcodeproj

Then build and run on your device or simulator.

USAGE
-----
1. Start opencode server with mDNS discovery enabled:
       opencode serve --mdns

   Or with a custom domain name:
       opencode serve --mdns --mdns-domain=myserver.local

2. Open OpenBridge on your iOS device (ensure same WiFi network)

3. The app will automatically discover your server - tap it to connect

4. Select or create a session: Browse existing conversations or start a new one

5. Start chatting: Type messages and receive AI responses

MANUAL CONNECTION
-----------------
If not using mDNS, you can manually add a server:

1. Start opencode server on your machine:
       opencode serve

2. Find your machine's IP address (e.g., 192.168.1.100)

3. In OpenBridge, tap "Add Server" and enter the IP address and port

4. The app will validate the connection before adding it

CONFIGURATION
-------------
Default Settings:
- Port Range: 4096-4100 (ports scanned for opencode servers)
- Connection Timeout: 5s (timeout for manual server connections)
- Request Timeout: 30s (HTTP request timeout for API calls)
- Message History: 10 (messages loaded per session)

ARCHITECTURE
------------
OpenBridge/
├── Services/
│   ├── ServerDiscovery.swift    (Server scanning and discovery)
│   ├── ChatManager.swift        (HTTP API communication)
│   └── SessionManager.swift     (Session state and navigation)
├── Views/
│   ├── GalleryView.swift        (Server grid)
│   ├── SessionsView.swift       (Session list)
│   ├── ChatView.swift           (Chat interface)
│   └── MessageBubble.swift      (Message components)
└── Constants.swift              (App constants)

DEVELOPMENT
-----------
Regenerate project after adding files:
    xcodegen generate

Build from command line:
    xcodebuild -project OpenBridge.xcodeproj -scheme OpenBridge

LICENSE
-------
MIT

About

OpenBridge connects your iPhone to opencode AI servers on your local network. Features automatic Bonjour discovery, session management, and a chat interface

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages