Skip to content

prose-im/prose-app-web

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

prose-app-web

Test and Lint Build and Release Bundle and Publish GitHub Release

Prose Web application. Built in TypeScript / VueJS / WebAssembly.

The Prose project was originally announced in a blog post: Introducing Prose, Decentralized Team Messaging in an Era of Centralized SaaS. This project is the Web implementation of the Prose app.

Copyright 2023, Prose Foundation - Released under the Mozilla Public License 2.0.

Tested at NodeJS version: v20.10.0

Quick Setup

Docker image

A Docker image containing a production build of the Prose Web app is available on Docker Hub as proseim/prose-app-web. It contains all required assets and listens as a HTTP server serving those assets with the proper rules.

First, pull the proseim/prose-app-web image:

docker pull proseim/prose-app-web:latest

Then, run it:

docker run --rm -p 8080:8080 proseim/prose-app-web

That's it, your Prose Web app should now be available at: http://localhost:8080

Manual build

If you prefer to make your own build, first make sure your build environment has NodeJS version 12 and above.

Then, execute those commands:

npm install
npm run build

The built files will be available in the dist/ directory. The content of this directory need to be copied to your Web server and served from a root URL.

Architecture

The Prose Web app consists mostly of VueJS views, bound to core libraries, namely the client and views cores, that are common to all platforms Prose runs on.

The app uses the core client library to connect to XMPP. It calls programmatic methods in order to interact with its internal database and the network. It binds as well to an event bus to receive network events, or update events from the store. Messages are shown in their own view, which is provided by the core views library.

This decoupling makes things extremely clean, and enables common code sharing between platforms (eg. Web, macOS, iOS, etc.).

Build

πŸ‘‰ This builds Prose for use in a Web browser.

Building the Prose Web app is done per-target environment. Please check below for build instructions based on your target environment.

Production target

To build Prose for a production environment (with all optimizations, meaning the build will be slower), hit:

npm run build

The production build expects the XMPP domain you will connect to through Prose to expose its alternative connection endpoints (ie. WebSocket or/and BOSH) through XEP-0156: Discovering Alternative XMPP Connection Methods, so make sure the host-meta file is properly added to your domain (served over HTTPS).

Development target

πŸ‘‰ Before you start, please make sure that a local prose-pod-server (repository) is running on your development machine. Configurations for your local server can be sourced from prose-pod-system (repository).

Tip

You may follow our usage guide on how to start a local Prose Pod setup. This will start a self-contained Prose Pod with all required components (the XMPP server and the Prose API).

πŸ“¦ Develop with a release core (default)

To build Prose for a development environment (that is, a live development server streaming changes live), hit:

npm run dev

πŸ”¬ Develop with a local core (advanced)

βš™οΈ Client core

If it is desired to build against a local prose-core-client (repository) containing a built prose-sdk-js package, you may pass a PROSE_CORE_CLIENT_PATH environment variable with the relative path to the core client library:

PROSE_CORE_CLIENT_PATH="../prose-core-client" npm run dev

On a second terminal, you may also watch for changes in the prose-core-client repository:

find crates bindings/prose-sdk-js/src Cargo.toml | entr -r cargo xtask wasm-pack build --dev

Any change happening in the core will trigger a compilation run, which itself will trigger a HMR event in the Web app (this may reload the whole app).

πŸ’¬ Views core

If you would like to source a local prose-core-views (repository) build, you may pass a PROSE_CORE_VIEWS_PATH environment variable with the relative path to the core views library:

PROSE_CORE_VIEWS_PATH="../prose-core-views" npm run dev

Bundle

πŸ‘‰ This bundles Prose for use as a standalone application (macOS, Windows, etc.).

Prose can be bundled into a native-like application using Tauri, which uses the target system default Web renderer. The benefit of Tauri over eg. Electron, is that the resulting bundled application size is kept small (Tauri's overhead is about 600KB).

Production bundle

To bundle Prose as a final production application, run:

npm run bundle build

Development bundle

To bundle Prose as a development application (with Hot Module Replacement), run:

npm run bundle dev

Design

Prose main view Prose profile modal Prose login screen

πŸ‘‰ The Prose Web app reference design can be found there.

Updates

As Prose is still being developed, update videos can be found on the Prose blog, month by month:

License

Licensing information can be found in the LICENSE.md document.

πŸ”₯ Report A Vulnerability

If you find a vulnerability in any Prose system, you are more than welcome to report it directly to Prose Security by sending an encrypted email to [email protected]. Do not report vulnerabilities in public GitHub issues, as they may be exploited by malicious people to target production systems running an unpatched version.

⚠️ You must encrypt your email using Prose Security GPG public key: πŸ”‘57A5B260.pub.asc.