kyoheiu / carbon

An opinionated online text editor, self-hosted & Git-powered.
https://carbon-demo.kyoheiu.dev/
24 stars 0 forks source link

carbon

An opinionated online text editor, self-hosted & Git-powered.

Like a carbon paper, through this app you can edit your text files in a single, flat directory on your server.

Aims to be alternative to Google Keep, Simplenote, Evernote, and so on.

demo site (Without the git feature; reset every 15 minutes)

breaking change on v2

If you receive Permission denied error when upgrading from v1, please execute the command below.

# chown -R $(id -u):$(id -g) /path/to/data

features

deploy

Here, assume that you store text files in /path/to/data.

  1. If you'd like to use the git feature, create a git repository in your data. After that, add user.name and user.email to data/.git/config like this:
[user]
    name = Kyohei Uto
    email = "im@kyoheiu.dev"

If you do not want the git feature, skip this step and go on to the next (and final) one.

  1. Use docker compose up -d with docker-compose.yml. For example:
version: "3"
services:
  carbon:
    image: docker.io/kyoheiudev/carbon:2.0.4
    container_name: carbon
    user: "1000:1000" # UID and GID that created git repository.
    volumes:
      - "./data:/carbon/data:rw"
      - "/etc/passwd:/etc/passwd:ro"
      - "/etc/group:/etc/group:ro"
    environment:
      - CARBON_GIT=on # requited to enable the git feature
      - CARBON_GIT_USER=carbon # default to 'carbon'
      - CARBON_GIT_EMAIL=git@example.com # default to 'git@example.com'
    ports:
      - 3000:3000
    logging:
      driver: json-file
      options:
        max-size: 1m
        max-file: "3"

And the app will start listening on port 3000.

tech stack

Contributing

Contributions are very welcome!

If you have an idea for a new feature, please create an issue before making PR.

Development

Prerequisites

cd client && npm i
cd .. && make dev

For details, see Makefile.