Skip to content

Permissionless-Software-Foundation/ipfs-file-pin-service

Repository files navigation

ipfs-file-pin-service

js-standard-style semantic-release

Overview

This project runs a Helia IPFS service and REST API server. It is forked from ipfs-service-provider. The intention is for this app to activated by psf-slp-indexer via webhook. It will be notified when new Pin Claims are found on the blockchain. It then confirms a proper proof-of-burn was submitted with the claim, and then pins the IPFS file content with its local node.

IPFS node

This web server spins up an embedded IPFS (Helia) node. This node can be controlled and interrogated via the REST API. psf-bch-wallet is a command-line app (CLI) that can easily tap into this REST API in order to interact with the embedded IPFS node.

  • Video link will be added here

Requirements

  • node ^20.16.0
  • npm ^10.8.1
  • Docker ^24.0.7
  • Docker Compose ^1.27.4

Installation

Production Environment

The docker directory contains a Dockerfile for building a production deployment.

docker-compose pull
docker-compose up -d
  • You can bring the containers down with docker-compose down
  • You can bring the containers back up with docker-compose up -d.

Development Environment

A development environment will allow you modify the code on-the-fly and contribute to the code base of this repository. Ubuntu v20 is the recommended OS for creating a dev environment. Other operating systems may cause issues.

git clone https://github.com/Permissionless-Software-Foundation/ipfs-service-provider
cd ipfs-service-provider
./install-mongo-sh
npm install
npm start

Configuration

This app is intended to be started via a bash shell script. See the environment variables used to configure this app in the config/env/common.js file.

File Structure

The file layout of this repository follows the file layout of Clean Architecture. Understaning the principles laid out this article will help developers navigate the code base.

Usage

  • npm start Start server on live mode
  • npm run docs Generate API documentation
  • npm test Run mocha tests

Documentation

API documentation is written inline and generated by apidoc. Docs can be generated with this command:

  • npm run docs

Visit http://localhost:5020/ to view docs

There is additional developer documentation in the dev-docs directory.

Dependencies

IPFS

Snapshots pinned to IPFS will be listed here.

License

MIT

About

IPFS File Pinning service. Pins triggered by psf-slp-indexer

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages