Skip to content

A simple vuejs app that demos how to save a file to IPFS via a VueJS app and store in a smart contract via drizzle

Notifications You must be signed in to change notification settings

devbootstrap/IPFS-vuejs-drizzle-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IPFS Vuejs Drizzle Demo App

This is a sample application that demonstrates how to upload a file to IPFS and store its resulting CID on a Smart Contract in the Ethereum blockchain using a Vue JS with Drizzle front end! :)

Packages used

  • Drizzle Vue Plugin v0.1.1
  • VueJS 2.6.11
  • IPFS 0.5.0

Run the application!

After cloning you need to:

Install dependencies:

npm i

Start ganache (the menomic is optional)

ganache-cli -m 'theme narrow finger canal enact photo census miss economy hotel often'

Start truffle console

truffle console

Start the VueJS app:

cd app
npm i
npm run serve

Start a local IPFS Daemon:

ipfs daemon

Take the app for a test drive:

So two things left to do! Open the app to upload a file and view the file in IPFS:

Steps to create this project from zero!

These steps below are how I created this app from zero. If you have just cloned this repo then you do not need to do these steps! Just follow the

npm i -g truffle@nodeLTS
npm i -g @vue/cli
truffle init
vue create app
truffle create contract SimpleIPFSStore
truffle create migration ipfsstore
truffle compile
ln -s ../../build/contracts app/src/contracts

...now in the app (Vue JS) project folder:

cd app
npm i @types/node
npm i @drizzle/vue-plugin
npm i ipfs-http-client
touch src/drizzleOptions.ts
touch src/decs.d.ts

...some final touches so that certain things are working with TypeScript!

About

A simple vuejs app that demos how to save a file to IPFS via a VueJS app and store in a smart contract via drizzle

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published