Home

Awesome

Frontend CI

Frontend - Pastenym

This project is inspired from pastebin service. The main goal is to offer a solution for sharing text with Nym products to offer full anonymity, even on metadata level

Demo

Get shared text: Get shared text: https://pastenym.ch/#/jD6Vhmrz&key=b2d6ae002a1674daa43a07be7fc4f01c

Share a text: http://pastenym.ch/

What Nym is developping ?

Nym is developing the infrastructure to prevent this data leakage by protecting every packet’s metadata at the network and application layers.

How pastenym service will use Nym product

Your text is sent to a client which is connected to the Nym network and which stores it in a database (eventually a more distributed solution will be considered),

This system allows you to share information while respecting your privacy by protecting your data and metadata.

On the side of No Trust Verify we only see an anonymous id when sending the text, and therefore impossible to know who is behind and from where the data was sent. Moreover, data is end-to-end encrypted: your browser generates a key used to encrypt the text, the key is placed in the URL you share with your friends and is used in their browser to decrypt the text received by the server.

Donate

If you enjoy pastenym, please consider buying us a cup of coffee. We worked hard to make it free and plan to spend alot of time supporting it. Donations are greatly appreciated.

BTC: bc1q5j4tq0yr75j90xwegwtfpaccdx3xdaxxzjtzt8

The best way to support us is by delegated NYM to our nodes

Init the project

Frontend

NodeJS (v18.2.0) and NPM (v9.20.0) are used for the frontend.

  1. Copy the .env.example to .env. Detailled values are explained in .env details section at the bottom
  2. Run npm install -g yarn && yarn and grab a cup of coffee
  3. Run yarn dev and go to http://localhost:8080 in your favorite browser.

or

Run yarn build to build the project, everything will be in the dist folder. Just copy it to host it with a webserver

If you don't have a backend you can use this one, just set the REACT_APP_NYM_CLIENT_SERVER= to this value: HWm3757chNdBq9FzKEY9j9VJ5siRxH8ukrNqYwFp9Unp.D34iYLRd5vzpCU4nZRcFVmoZpTQQMa6mws4Q65LdRosi@Fo4f4SQLdoyoGkFae5TpVhRVoXCF8UiypLVGtGjujVPf

Host it publicly with Docker

If you want to host it publicly here's some steps that can help you

To run it:

  1. Copy the .env.example to .env and edit the variables in it. The REACT_APP_NYM_CLIENT_SERVER value should match the address displayed by the backend. You can use the one written in the example file, it's a working backend.

  2. Copy and paste the content displayed here in a docker-compose.yml file

  3. set your hostname on this line (keep the ``)

traefik.http.routers.pastenym-frontend.rule=Host(`YOUR HOSTNAME`)
  1. start it docker compose up --build -d
Docker-compose.yml
version: "3"

services:

  traefik:
    image: "traefik:v2.9"
    container_name: "traefik"
    restart: unless-stopped
    command:
      - "--providers.docker=true"
      - "--providers.docker.exposedbydefault=false"
      - "--entrypoints.web.address=:80"
      - "--entrypoints.websecure.address=:443"
      - "--certificatesresolvers.letsEncrypt.acme.httpchallenge.entrypoint=web"
      - "--certificatesresolvers.letsEncrypt.acme.httpchallenge=true"
      - "--certificatesresolvers.letsEncrypt.acme.storage=/letsencrypt/acme.json"
    ports:
      - 443:443
      - 80:80
    volumes:
      - ./letsencrypt:/letsencrypt
      - /var/run/docker.sock:/var/run/docker.sock:ro

  pastenym-frontend:
    image: notrustverify/pastenym-frontend:latest
    restart: unless-stopped
    labels:
      - traefik.http.routers.pastenym-frontend.entrypoints=websecure
      - traefik.http.routers.pastenym-frontend.rule=Host(`YOUR HOSTNAME`)
      - traefik.http.routers.pastenym-frontend.tls=true
      - traefik.http.routers.pastenym-frontend.tls.certresolver=letsEncrypt
      - traefik.enable=true
    env_file: .env
    ports:
      - 8001:80 

.env details

This section list the options for personnal branding and optionnal config

Backend connection

VariableDefault valueExplanation
REACT_APP_NYM_CLIENT_SERVERHWm3757chNdBq9FzKEY9j9VJ5siRxH8ukrNqYwFp9Unp.D34iYLRd5vzpCU4nZRcFVmoZpTQQMa6mws4Q65LdRosi@Fo4f4SQLdoyoGkFae5TpVhRVoXCF8UiypLVGtGjujVPfConfigure the backend server that the frontend will use to send and retrieve pastes
SERVER_NAMEhttps://pastenym.chLinks displayed when paste URL ID are generated

Instance info exposition

Setting the env variable GENERATE_INFO_FILE_ABOUT_INSTANCE to "true" will generate a info.json file at the root of your instance (so at the <SERVER_NAME>/info.json according the server name value above). If the env variable is undefined or has any other value, it will not be generated. It allows you to expose the following parameters of your instance, in a static json file (without loading the whole webpack):

KeyExampleCondition
hosted_by"https://notrustverify.ch"If provided in the .env file
hosted_by_name"No Trust Verify"If provided in the .env file
version"1.4.2"From the package.json file
country"NZ"If provided in the .env file
backend_addr"HrXyP...yBAdEp"

If you list your instance in our directory service (here), this file will be queried recently to ensure the liveness of your instance as well as to allow users to choose or compare instances. The backend address will be used to query the backend you are using directly for the list of supported operations. For more information about the directory, check our repo!

Personnal branding

To change logo, create a new logo-header.png in the /public folder. The size should be 25px

Header

VariableDefault valueExplanation
DISABLE_ABOUTfalseDisable the About page. Set true to disable it

Footer

VariableDefault valueExplanation
SOCIAL_TWITTEREmptyEnable the twitter icon in the footer by giving the URL (eg. https://twitter.com/notrustverif)
SOCIAL_EMAILEmptyEnable the email icon in the footer by giving the URL
SOCIAL_TELEGRAMEmptyEnable the email icon in the footer by giving the URL
SOCIAL_MATRIXEmptyEnable the matrix icon in the footer by giving the URL
SOCIAL_GITHUBEmptyEnable github icon in the footer by giving the URL
SOCIAL_MEDIUMEmptyEnable the medium icon in the footer by giving the URL
HOSTED_BY_URLEmptyEnable the hosted by text in the footer. Set a value to enable it
HOSTED_BY_NAMEEmptySet a name for the hosted by text
DISABLE_DEVELOPPEDBYfalseDisable the Developed by text in the footer. Set to true to disable it