GithubHelp home page GithubHelp logo

lucasxsong / lolipfs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mcarlomagno/persssist

0.0 0.0 0.0 958 KB

Storage decentralized application running on top of Rinkeby testnet for storing files metadata and IPFS protocol for uploading, sharing and downloading files.

Home Page: https://persssist.vercel.app

License: MIT License

JavaScript 23.80% TypeScript 70.74% CSS 0.45% Solidity 5.01%

lolipfs's Introduction

banner image

Persssist

Vercel Tests License: MIT

Storage web application running on top of Rinkeby testnet that uses IPFS protocol for storing files in an open and decentralized way.

How it works

Architecture

This is a dApp or decentralized application with a simple frontend connected with a set of backend services composed by a Smart Contract deployed to Rinkeby testnet and a storage service using IPFS.

The Smart Contract role is to store basic information about the users and files stored in the app.

IPFS is a P2P API for storing files in a decentralized way, where each client work as a node for persisting files. Learn more

Alt text

Stack

Basic Process

  1. The users connect their account to Metamask after pressing Connect button (the app attempts to do this automatically if there is an existing account logged in in Metamask).
  2. Once there is a connected account in the app, the app enables the button for start uploading files on the Upload section.
  3. Once you uploaded your first file, you will be able to see the result in the Files section (Below the upload section).

Running locally

Configuring the app

First, configure .env file for blockchain configuration

INFURA_PROJECT_ID = <Your Infura Project ID>
PRIVATE_KEY = <Your Infura private key>
ACCOUNT_ADDRESS = <Your Account Address>

Then, configure .env.local file for frontend application.

NEXT_PUBLIC_MODE = <PROD | DEV (depending of your environment)>
NEXT_PUBLIC_CONTRACT = <Address of the smart contract>

Smart contract migration and deployment

In case you want to run locally for development, run a local blockchain using Ganache.

First, initialize truffle project on the repo.

truffle init

Then migrate smart contracts to ganache or any other network (see truffle-config.js for configuring networks).

In case you're running Ganache.

truffle migrate --network development

In case you prefer to debug against a deployed Smart Contract on rinkeby.

truffle migrate --network rinkeby

Running frontend application

Then, run the development server:

npm run dev
# or
yarn dev

Open http://localhost:3000 with your browser to see the result.

lolipfs's People

Contributors

mcarlomagno avatar dependabot[bot] avatar

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.