GithubHelp home page GithubHelp logo

mayocream / pastebin-ipfs Goto Github PK

View Code? Open in Web Editor NEW
168.0 3.0 9.0 872 KB

🌐 (Web 3.0) Pastebin built on IPFS, securely served by Distributed Web and Edge Network.

Home Page: https://paste.shoujo.io

License: MIT License

Makefile 0.63% Go 46.39% HTML 2.77% CSS 6.42% TypeScript 43.08% Dockerfile 0.71%
ipfs pastebin go react typescript webcrypto

pastebin-ipfs's Introduction

pastebin-ipfs

go node docker deploy

简体中文

(IPFS Archivists)

Still in development, Pull Requests are welcomed.

Pastebin built on IPFS, securely served by Distributed Web and Edge Network.

It's like gist but for anonymous. Alternative to Ubuntu Pastebin.

paste.shoujo.io

Features

  • Stored in IPFS distributed network
  • AES-GCM Encryption
  • OpenAPI (CORS Origin *)
  • File upload (API Only)
  • Cache by CDN (or IPFS Gateway)
  • Syntax highlight by Prismjs
  • Markdown Preview
  • No Expiration

Usage

Web

Webpage serves Gallery and provide GUI to paste your snippets.

Vist Webpage.

API

API Docs: OpenAPI v3 - Swagger UI

Pastebin it has a rate limit at 20 qps.

Terminal

Create snippets:

$ curl -T doc.md https://paste.shoujo.io/api/v0/ # remember to have a slash '/' at the end
# or
$ curl -X POST https://paste.shoujo.io/api/v0/ -d 'いつか君に伝えたいと思っていた気持ちは'
# or
$ curl -X PUT https://paste.shoujo.io/api/v0//lyrics.txt -d 'Stars fall, birds sleep'

Cat snippets:

curl https://paste.shoujo.io/api/v0/QmTnhJH8azDsudkxgp8wNLEN5Zq86NAE6DAkzwGBDpaQ6Z/plain.txt

Self-Hosted

Kubernetes

Deploy pastebin-ipfs with Helm.

git clone https://github.com/mayocream/pastebin-ipfs
cd pastebin-ipfs/helm
helm install pastebin-ipfs .

Refer values.yaml for more detail.

Docker Compose

Edit deploy/docker/docker-compose.yml file.

docker-compose up -d

Docker

You must have ipfs-daemon running on your host first.

Check out IPFS docker-compose.yml.

docker run -p 8080:3939 mayocream/pastebin-ipfs:latest

Development

make run # start ipfs daemon at http://127.0.0.1:5001
         # run pastebin API at http://127.0.0.1:3939
make web-live # run Webpage

Feedback

You can provide suggestion or ask question by open a Github Issue in any languages. 🧐

Topic

Discuss about this project!

Reddit - Pastebin built on IPFS, alternative to Ubuntu Pastebin

V2EX - 我做了一个去中心化的 Pastebin, Ubuntu Pastebin 的替代品

Todo

Credits

LICENSE

MIT

pastebin-ipfs's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

pastebin-ipfs's Issues

"How it works" document

ref: https://www.reddit.com/r/ipfs/comments/qaih8i/comment/hh6k8rp/?utm_source=share&utm_medium=web2x&context=3

Q:

Thumbs up, really like the project.
I have questions, i'm new to ipfs so wanted to understand how all of this works.
So if i make a paste on your platform, where does that text gets stored, because there is no one who have visited that paste hash by now, so its probably getting stored on only my node & if i turn off my computer will it be lost? or you are using some sort of pinning service for this.
Maybe i'm missing something here.

A:

How it works:
Your paste text is created, and then gets stored on an IPFS node (IPFS daemon running with the pastetbin-ipfs server), and the object gets pinned by default on the local node.
It's "possible" that your paste data is lost if the IPFS node is down and no other nodes having a duplicate copy of the object. :<
CDN and multiple public IPFS gateways help to deliver IPFS objects faster through HTTP protocol and cache on edge networks.

File structure

@Map1en src 文件夹里,pages 里面每个单页都一个文件夹,单独一个空的 index.ts,这样没有必要吧,能精简成单文件么。

route 单独一个文件夹也有点多余。

Basic workflows

Things need to do:

  • publish page
  • publish with AES-GCM encrypt (password input)
  • gallery page
  • cid view page
  • API tests #2
  • API docs #4

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.