Skip to content

Nextcloud app providing file & calendar bridge between RoundCube and Nextcloud

License

AGPL-3.0, Unknown licenses found

Licenses found

AGPL-3.0
LICENSE
Unknown
COPYING
Notifications You must be signed in to change notification settings

Gecka-Apps/nextcloud-roundcube-bridge

Repository files navigation

RoundCube Bridge

GitHub release License: AGPL v3 Nextcloud PHP

A Nextcloud app that provides a communication bridge between RoundCube (embedded via the mail_roundcube app) and Nextcloud services.

Features

  • Attach files from Nextcloud - Pick files from your Nextcloud storage and attach them to emails
  • Save attachments to Nextcloud - Save email attachments directly to your Nextcloud files
  • Insert share links - Create and insert public share links into your emails
  • Calendar integration - Add calendar invitations (.ics files) directly to your Nextcloud Calendar

Requirements

How It Works

The bridge uses postMessage API to communicate between Nextcloud and the RoundCube iframe:

  1. Bridge Client Injection - When RoundCube loads in the iframe, the bridge injects a NextcloudBridge JavaScript object
  2. RoundCube Plugin - The NextBridge plugin in RoundCube uses this object to request file operations
  3. Nextcloud Handlers - The bridge app handles these requests using Nextcloud's APIs (WebDAV, CalDAV, OCS Sharing)
┌────────────────────────────────────────────────────────────┐
│                    Nextcloud                               │
│  ┌─────────────────────────────────────────────────────┐   │
│  │                mail_roundcube_bridge                │   │
│  │  ┌─────────────┐    postMessage    ┌─────────────┐  │   │
│  │  │  Vue App    │◄──────────────────│ Injected    │  │   │
│  │  │  (Bridge)   │                   │ Client      │  │   │
│  │  └──────┬──────┘                   └──────┬──────┘  │   │
│  └─────────┼────────────────────────────────┼──────────┘   │
│            │                                │              │
│     WebDAV/CalDAV                    ┌──────┴──────┐       │
│     OCS APIs                         │  RoundCube  │       │
│                                      │  (iframe)   │       │
│                                      │  NextBridge │       │
│                                      │   plugin    │       │
│                                      └─────────────┘       │
└────────────────────────────────────────────────────────────┘

API Reference

The injected NextcloudBridge object provides:

// Files
NextcloudBridge.pickFiles({ multiple: true, mimeTypes: ['image/*'] })
NextcloudBridge.saveFile(filename, base64Content, mimeType)
NextcloudBridge.saveFiles([{ filename, content, mimeType }])
NextcloudBridge.createShareLink()

// Calendar
NextcloudBridge.getCalendars()
NextcloudBridge.addToCalendar(calendarUrl, icsContent)

// Utils
NextcloudBridge.blobToBase64(blob)
NextcloudBridge.base64ToBlob(base64, mimeType)

Installation

From App Store (soon)

  1. Go to Nextcloud Apps
  2. Search for "RoundCube Bridge"
  3. Click Install

Manual Installation

cd /path/to/nextcloud/apps
git clone https://github.com/Gecka-Apps/nextcloud-roundcube-bridge mail_roundcube_bridge
cd mail_roundcube_bridge
make build

Then enable the app in Nextcloud settings.

Development

Prerequisites

  • Node.js 20+
  • npm

Setup

# Install dependencies
npm install

# Development build (with source maps)
make dev

# Production build (minified)
make build

# Watch mode (auto-rebuild on changes)
make watch

Code Quality

# PHP CodeSniffer
make phpcs

# PHP Mess Detector
make phpmd

Available Make Targets

Target Description
help Show available targets
build Build production assets
dev Build development assets
watch Build and watch for changes
phpcs Run PHP CodeSniffer
phpmd Run PHP Mess Detector
appstore Create app store package
clean Remove build artifacts
distclean Remove build artifacts and dependencies

License

This app is released under the GNU Affero General Public License Version 3.

Authors

Related Projects


Built with 🥥 and ☕ by Gecka — Kanaky-New Caledonia 🇳🇨

About

Nextcloud app providing file & calendar bridge between RoundCube and Nextcloud

Resources

License

AGPL-3.0, Unknown licenses found

Licenses found

AGPL-3.0
LICENSE
Unknown
COPYING

Stars

Watchers

Forks

Packages

No packages published