Skip to content

not-three/main

Folders and files

NameName
Last commit message
Last commit date

Latest commit

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

Repository files navigation

not-th.re

license GNU AGPLv3 gitHub issues

ui releases build ui Nightly ui commits

api releases build api Nightly api commits

cli releases cli npm package build cli Nightly cli commits

sdk releases sdk npm package build sdk Nightly sdk commits

draw releases build draw Nightly draw commits

!3 (spoken not three, derived from the leet speak word not3) is a simple paste sharing platform similar to other solutions like hastebin or pastebin.

!3 is focused on simplicity, security by client side encryption and usage of the monaco editor.

Features

  • Simple paste sharing
  • Client side encryption
  • Monaco editor
  • Syntax highlighting
  • Dark mode
  • File transfers
  • Connect your private instance with the public UI
  • New: Excalidraw integration
  • Planned: Peer 2 Peer sessions
  • Planned: Note Bundles
  • Planned: HTML Previewer
  • Planned: JavaScript Console
  • No cookies
  • No tracking
  • No ads

Cli

We also provide a cli tool to interact with the API.

npm install -g @not3/cli
$ not3 --help
Usage: not3 [options] [command]

Options:
  -V, --version                              output the version number
  -h, --help                                 display help for command

Commands:
  license                                    Show information about the license of the software
  decrypt [options] <seed>                   Decrypt something
  encrypt [options] [input...]               Encrypt something, if no input is provided, will read from stdin
  download|d [options] <id> <seed> <output>  Download a file and decrypt it
  upload|u [options] <input>                 Upload a file and encrypt it
  query|q [options] <id> <seed>              Decrypt and show a note from the server
  save|s [options] [content...]              Encrypt and save a note on the server
  seed                                       Generate a new encryption seed
  info [options]                             Show meta information about the api
  stats [options]                            Show usage statistics of the server
  help [command]                             display help for command

Or use it with docker:

docker run --rm -it -v "$(pwd):/data" ghcr.io/not-three/cli --help

Deployment

The simplest way to use !3 is to visit our hosted instance at https://not-th.re.

Micro

The micro deployment does not bring its own UI, but you can use the public UI.

services:
  api:
    image: ghcr.io/not-three/api:latest
    restart: unless-stopped
    environment:
      CORS_ENABLED: true
      LIMITS_DISABLED: true
      INSTANCE_PASSWORD: MySecretPassword
    ports:
      - 4000:4000
    volumes:
      - db:/data/db

volumes:
  db:

After you have deployed the API, visit the public UI go to Tools -> Edit Settings and update these values:

{
  "customServer": {
    "url": "http://<ip-of-the-server>:4000/",
    "password": "MySecretPassword"
  }
}

Dont forget to save the settings, by clicking on File -> Save (or by pressing ctrl + s).

πŸ’‘ Note: If you're using your own private instance and share a URL, the encrypted link will include both the encryption key and the address of your private server. When someone opens the link and they haven't set your server as their primary one, they'll be notified and asked to confirm access to data from an external server. If they agree, the data will then be loaded securely from your instance.

Minimal

The minimal deployment includes the API and the UIs. The UI has the proxy mode enabled, so you only need a single port.

x-restart: &restart
  restart: unless-stopped

services:
  api:
    image: ghcr.io/not-three/api:latest
    <<: *restart
    volumes:
      - db:/data/db

  draw:
    image: ghcr.io/not-three/draw:latest
    <<: *restart

  ui:
    image: ghcr.io/not-three/ui:latest
    <<: *restart
    ports:
      - 4000:4000
    depends_on:
      - api
      - draw
    environment:
      PROXY_URL: http://api:3000
      DRAW_PROXY_URL: http://draw:80

volumes:
  db:

Simple

An simple deployment, including a postgres database instead of sqlite. Recommended if you want to store more than a few pastes.

x-restart: &restart
  restart: unless-stopped

services:
  api:
    image: ghcr.io/not-three/api:latest
    <<: *restart
    depends_on:
      - db
    ports:
      - 3000:3000
    environment:
      CORS_ENABLED: true
      CORS_ORIGIN: http://localhost:4000
      DATABASE_MODE: pg
      DATABASE_HOST: db
      DATABASE_USERNAME: db
      DATABASE_PASSWORD: db
      DATABASE_NAME: db

  draw:
    image: ghcr.io/not-three/draw:latest
    <<: *restart
    ports:
      - 4500:80

  ui:
    image: ghcr.io/not-three/ui:latest
    <<: *restart
    ports:
      - 4000:4000
    environment:
      API_URL: http://localhost:3000
      DRAW_URL: http://localhost:4500
      TERMS_OF_SERVICE_URL: https://example.com

  db:
    image: postgres:14.5
    <<: *restart
    environment:
      POSTGRES_PASSWORD: db
      POSTGRES_USER: db
      POSTGRES_DB: db
    volumes:
      - db:/var/lib/postgresql/data

volumes:
  db:

Advanced

See one of the following files for a more detailed example:

These include horizontal scaling, health checks and traefik as a reverse proxy.

Environment variables

For a full list, with detailed descriptions of all environment variables, see the configuration documentation.

Helm

As of now, we do not have an official helm chart, if you want to contribute one, feel free to open a PR.

Static site deployment

In some scenarios, you might want to deploy the static site without a backend, for example not-th.re is deployed with Cloudflare Pages, while the API is hosted on api.not-th.re.

The static site can then be configured by editing the config.json file.

{ "baseURL": "https://api.not-th.re/", "drawURL": "https://draw.not-th.re/", "termsURL": "https://scolasti.co/go/privacy" }

You can download the client bundle from one of the following sources:

Github Releases

All stable versions of the client are available as a github release artifact.

download ui stable gh releases artifacts

download draw stable gh releases artifacts

Docker

docker run --rm --entrypoint /bin/sh -v $(pwd):/mnt ghcr.io/not-three/ui:latest -c "cp -r /app/public/ /mnt/ui/"

docker run --rm --entrypoint /bin/sh -v $(pwd):/mnt ghcr.io/not-three/draw:latest -c "cp -r /usr/local/apache2/htdocs/ /mnt/draw/"

This will copy the public folder to your current working directory.

Github Actions

The nightly (unstable) versions of the client are also available as a github action artifacts.

download ui nightly gh actions artifacts

download draw nightly gh actions artifacts

License

This project is licensed under the GNU Affero General Public License v3.0.

About

GNU AGPLv3

Permissions of this strongest copyleft license are conditioned on making available complete source code of licensed works and modifications, which include larger works using a licensed work, under the same license. Copyright and license notices must be preserved. Contributors provide an express grant of patent rights. When a modified version is used to provide a service over a network, the complete source code of the modified version must be made available.

What you can do

Permissions Conditions Limitations
🟒 Commercial useThe licensed material and derivatives may be used for commercial purposes.
πŸ”΅ Disclose sourceSource code must be made available when the licensed material is distributed.
πŸ”΄ LiabilityThis license includes a limitation of liability.
🟒 DistributionThe licensed material may be distributed.
πŸ”΅ License and copyright noticeA copy of the license and copyright notice must be included with the licensed material.
πŸ”΄ WarrantyThis license explicitly states that it does NOT provide any warranty.
🟒 ModificationThe licensed material may be modified.
πŸ”΅ Network use is distributionUsers who interact with the licensed material via network are given the right to receive a copy of the source code.
🟒 Patent useThis license provides an express grant of patent rights from contributors.
πŸ”΅ Same licenseModifications must be released under the same license when distributing the licensed material. In some cases a similar or related license may be used.
🟒 Private useThe licensed material may be used and modified in private.
πŸ”΅ State changesChanges made to the licensed material must be documented.

Information provided by https://choosealicense.com/licenses/agpl-3.0/

This information is provided for general understanding and is not legal advice.

Contributing

The !3 project is open source and welcomes contributions. It is structured across multiple repositories, each serving a specific purpose:

  • main - Contains deployment documentation, shell scripts, and overall project setup.
  • ui - The web interface for !3, built with Nuxt (Vue) and TypeScript.
  • api - The backend API, written in TypeScript using the NestJS framework.
  • cli - Command-line interface for !3, built with TypeScript and the NestJS commander framework.
  • sdk - A TypeScript SDK usable in both browser and Node.js environments.
  • draw - A wrapper for Excalidraw using React and TypeScript, used for visual/paste sharing.

Note: The main repository is the central place for reporting bugs, submitting suggestions, and discussing ideas. It is the only repository in the organization with issues enabled.

Legal Notice for Contributors

The project is licensed under the GNU Affero General Public License (AGPL). If you contribute to this project:

  • Your contributions will be automatically licensed under the AGPL.
  • If you later reuse your contributions in another project or deploy a modified version of the software, you are responsible for complying with the AGPL's terms.
  • In particular, if you make the software available over a network (e.g., by hosting it), you are legally required to provide the corresponding source code to users of your deployment.

By contributing, you acknowledge and accept these terms. If in doubt, seek legal advice before submitting a contribution.

About

!3 is a simple, secure and open source paste sharing platform.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages