Skip to content

Open implementation of the FDC3 standard using Electron and an integrated App Directory.

License

Notifications You must be signed in to change notification settings

ColinEberhardt/electron-fdc3

 
 

Repository files navigation

Electron FDC3 Desktop Agent & App Directory

This project provides a fully open source implementation of the FDC3 interoperability standard. Including:

  • A fully featured and secure electron desktop agent featuring:
    • intent resolution
    • channel linking
    • directory search
  • A local file-based app directory implementation

Electron Implementation

The Electron implementation is built from the Vite Electron Builder Boilerplate (also see TEMPLATE.md).

The UI for the desktop agent is built using React MUI.

All remotely hosted content is run in BrowserView following electron security best practices.

Libraries

The following libraries are used:

Structure

  • directory/ - the app directory implementation, built with fastify
  • packages/main - the main Electron application, has access to Node
  • packages/preload - preload scripts for web renderers. Bridges the frontend ui to the main process through events and apis
    • packages/preload/channelPicker - preload for the channel picker UI
    • packages/preload/homeView - preload for the default home view UI. Note: this exposes an additional API on top of the standard FDC3 one - which can only be accessed by native "system" views.
    • packages/preload/intentResolver - preload for the intent resolver UI
    • packages/preload/searchResults - preload for the searchResults UI
    • packages/preload/view - preload for all content views. This is where the FDC3 API is implemented.
    • packages/preload/index.ts - preload for the main window - i.e. the frame around all view content.
  • packages/renderer - the parts of the desktop agent UI built with React, isolated from main app, and shown in a window on the desktop
    • packages/renderer/channelPicker - UI for the channel picker
    • packages/renderer/homeView - UI for the default home view
    • packages/renderer/intentResolver - UI for the intent resolver window
    • packages/renderer/searchResults - UI for the searchResults window
    • packages/preload/src - UI for the main window - i.e. the frame around all view content. This covers the search bar, channel picker button, and tabs.

App Directory Setup

Modify the local directory entries here:

  • directory/src/data

The local appD will run at localhost:8080 by default.

By default, the Desktop Agent points to the local directory in development and to the https://appd.kolbito.com directory in production. You can change the local settings in scripts/watch.js by modifying the entries for VITE_DEV_DIRECTORY_URL and change the production setting by modifying the value for productionDirectory in packages/main/src/utils.ts.

Commands

  1. npm start / npm run watch - Start the Electron app in dev mode.
  2. npm run start:directory - Start the local app directory.
  3. npm run compile - Build the app for local debugging only.
  4. npm run lint - Lint the code.
  5. npm run typecheck - Run a TypeScript check.
  6. npm run test - Run tests for all parts of the application, including end-to-end tests.

About

Open implementation of the FDC3 standard using Electron and an integrated App Directory.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 89.2%
  • JavaScript 9.3%
  • HTML 1.1%
  • CSS 0.4%