Skip to content

yashodipmore/fil-token-gated-dapp-de-storage

 
 

Repository files navigation

web3-medical-invoice

Web3 Medical Invoice

Prerequisites

Ensure you have the following installed on your machine:

  • Node.js
  • Yarn

You can check their versions using the following commands:

node -v
yarn -v

Getting Started

Cloning the Repository

Clone your fork of the ZKMedical-Billing repository:

git clone https://github.com/[USER_NAME]/ZKMedical-Billing/

Navigate to the Project Directory

Change into the medical-invoice-ionic-tokengated/ directory:

cd ZKMedical-Billing/medical-invoice-ionic-tokengated/

Opening the Project

Open the project in your preferred code editor. For Visual Studio Code, use:

code .

Setting Up Environment Variables

  1. Create a .env file in the root directory:

    touch .env
  2. Copy the contents from .env.example and paste them into .env.

  3. Obtain the following credentials:

    • Infura API Key: Visit the Infura Dashboard to create an API key and add it to .env:

      VITE_INFURA_API_KEY=<your_infura_api_key>
      
  4. Navigate to the web3-tools-contracts directory to get the latest deployed contract address on all supported chains. Update the contract addresses in the .env file:

    VITE_MEDI_INVOICE_CONTRACT_ADDRESS=<contract_address>
    

Installing Dependencies

Install the necessary dependencies using Yarn:

yarn

Running the Application

Serve the Application (Web Version)

Start the web application:

ionic serve

Running on Android Device

  1. Sync the Android codebase:

    ionic cap sync android
  2. Run the synced APK on an Android device:

    npx cap run android
  3. Open the project in Android Studio:

    ionic cap open android

Running on iOS Device

  1. Sync the iOS codebase:

    ionic cap sync ios
  2. Run the synced IPA on an iOS device:

    npx cap run ios
  3. Open the project in Xcode:

    ionic cap open ios

Storacha/IPFS

  1. Setup your Storacha client by giving your email, it'll send an authorization mail where you have to validate the req image

  2. Modify any content on the spreadsheet and Save the file using saveAs, yyou'll get your CID that is uploaded to your storacha space which is created automatically when you do 1st step image

  3. Check your Storacha console for the files that are being uploaded image

  4. When file uploads are done you can try refreshing for retrieving the files at IPFS files section image

  5. And then you can move these files to the Local storage image

About

Filecoin token gated dapp with decentralized storage

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 56.8%
  • JavaScript 43.0%
  • Other 0.2%