# @ode/ode

> A self-hosted collaborative rich document editor

Latest version **0.0.1** (published 2021-01-13) · GPL-3.0-only license · 0 weekly downloads

## Install

```sh
npm install @ode/ode
pnpm add @ode/ode
yarn add @ode/ode
bun add @ode/ode
```

Provides the commands `ode`, `generateid`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; large bundle; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2021-01-13 |
| First published | 2021-01-13 |
| Weekly downloads | 0 |
| License | GPL-3.0-only |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=12.0.0 |
| Dependencies | 6 |
| Unpacked size | 20.1 MB |
| Known vulnerabilities | 0 (+88 in 1 direct dependencies) |
| Install scripts | yes |
| Author | smoores |
| Maintainers | ode |
| Keywords | self-host, collaborative, document, editor |

## Links

- npm: https://www.npmjs.com/package/@ode/ode
- Repository: https://gitlab.com/smoores/ode
- Homepage: https://gitlab.com/smoores/ode/-/blob/main/README.md
- Issues: https://gitlab.com/smoores/ode/-/issues
- npm.io page: https://npm.io/package/@ode/ode

## Dependencies (6)

- [ejs](https://npm.io/package/ejs.md) ^3.1.5
- [dotenv](https://npm.io/package/dotenv.md) ^8.2.0
- [express](https://npm.io/package/express.md) ^4.17.1
- [body-parser](https://npm.io/package/body-parser.md) ^1.19.0
- [parse-server](https://npm.io/package/parse-server.md) ^4.4.0
- [prosemirror-transform](https://npm.io/package/prosemirror-transform.md) ^1.2.8

## Alternatives

- [@cantoo/pdf-lib](https://npm.io/package/@cantoo/pdf-lib.md) — 297.9K weekly downloads
- [datatables.net-buttons](https://npm.io/package/datatables.net-buttons.md) — 200.1K weekly downloads
- [@ckeditor/ckeditor5-export-pdf](https://npm.io/package/@ckeditor/ckeditor5-export-pdf.md) — 167.0K weekly downloads
- [scanbot-web-sdk](https://npm.io/package/scanbot-web-sdk.md) — 15.0K weekly downloads
- [@syncfusion/ej2-angular-pdfviewer](https://npm.io/package/@syncfusion/ej2-angular-pdfviewer.md) — 8.8K weekly downloads

## Recent versions

- 0.0.1 (latest) — 2021-01-13

## README

# Ode

Ode is a self-hosted collaborative rich document editor.

It's based on [Parse Platform](https://parseplatform.org/), an open source, self-hosted "Complete Application Stack," and [Prosemirror](https://prosemirror.net), a rich text editor toolkit.

## Self-hosting

Ode's primary goal is to be as easy as possible to run on hardware that you own or rent. There are several ways to do this.

### Docker Containers (Manual)

Docker images for Ode are published to the GitLab Container Registry with every release. These images can be pulled from registry.gitlab.com/smoores/ode.

Ode requires an existing MongoDB v4.2^ installation. We recommend using the `percona/percona-server-mongodb:4.2` image.

```console
docker run --name mongodb -d -v mongodb_data:/data/db -p 27017:27017 percona/percona-server-mongodb:4.2
```

**Note**: The above example uses a [named volume](https://docs.docker.com/storage/volumes/) to store your data. This makes Docker responsible for managing your data's location. Use a path to a host directory instead of `mongodb_data` to instead use a [bind mount](https://docs.docker.com/storage/bind-mounts/), which makes your data available available on your host machine.

Ode requires an APP_ID and MASTER_KEY to run. It's best to keep these persistent across restarts, so we recommend saving them in a `.env` file. This repo has a script that will generate these values for you:

```console
./scripts/generateid.sh
```

The following environment variables are also required. You can add them to the `.env` file generated by the above script, or pass them as additional arguments to the `docker run` command below with the `-e` flag.

| env variable | example value | description |
|--------------|---------------|-------------|
| PROTOCOL     | https://      | The protocol to use when connecting to your server from the browser. This should always be `https://` unless you are only serving local traffic. |
| DOMAIN       | example.com   | The domain name to use when connecting to your server from the browser. |
| DATABASE_URI | mongodb://my.db.ip.address:27017 | The URI for your MongoDB instance. Remember that this will be accessed from within a docker container, so MongoDB will be unavailable at `localhost` even if running on the same machine. See [Networking Tips](#Networking%20Tips) for more information. |

To pull and run the latest version of Ode:

```console
docker run --name ode -d -p 1337:1337 --env-file .env registry.gitlab.com/smoores/ode:latest
```

#### Networking Tips

If you're running your MongoDB instance on the same physical machine as your Ode instance, you can create a Docker network to connect the two.

```console
docker network create --driver bridge ode-net
```

Now, when running your MongoDB and Ode containers:

```console
docker run --name mongodb -d -v mongodb_data:/data/db -p 27017:27017 --network ode-net percona/percona-server-mongodb:4.2

docker run --name ode -d -p 1337:1337 --env-file .env --network ode-net -e DATABASE_URI=mongodb://mongodb:27017 registry.gitlab.com/smoores/ode:latest
```

In addition to specifying the new network with the `--network` flag, we also set the `DATABASE_URI` environment variable to `mongodb://mongodb:27017`. Since the containers are on the same Docker network, they can resolve each others' IP addresses via container name.

### Docker Compose

The `docker-compose.yml` file in this repository is for development and _should not_ be used for a production instance. Instead, if you wish to use docker-compose to run your production instance, you can use the following:

```yaml
version: "3.7"

volumes:
  mongodb_data:

services:
  ode:
    container_name: ode
    image: 'registry.gitlab.com/smoores/ode:latest'
    env_file: .env
    ports:
      - 1337:1337
  mongodb:
    container_name: mongodb
    image: 'percona/percona-server-mongodb:4.2'
    restart: always
    command: '--journal --setParameter internalQueryExecYieldPeriodMS=1000 --setParameter internalQueryExecYieldIterations=100000'
    ports:
      - 27017:27017
    volumes:
      - mongodb_data:/data/db
```

**Note**: See the manual [Docker instructions](#Docker%20Containers%20(Manual)) above for instructions on generating the `.env` file.

---
_Source: https://npm.io/package/@ode/ode · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
