Giter Site home page Giter Site logo

ronxjansen / lit-password-manager Goto Github PK

View Code? Open in Web Editor NEW

This project forked from salmandabbakuti/lit-password-manager

0.0 0.0 0.0 3.39 MB

Password manager with Lit for encryption and Ipfs for storage

Home Page: https://lit-password-manager.vercel.app

License: MIT License

Shell 0.74% JavaScript 69.91% TypeScript 14.12% CSS 9.30% Solidity 5.92%

lit-password-manager's Introduction

Lit Password Manager

A web3-native password manager that utilizes decentralized infrastructure and lit protocol to store and retrieve passwords.

Lit Protocol is a decentralized key management network powered by threshold cryptography. A blockchain-agnostic middleware layer, Lit can be used to read and write data between blockchains and off-chain platforms, facilitating encryption, access control, and automation for the open web via programmatic signing.

Tech Stack

  • Frontend: Next.js, Antd
  • Web3 Client: ethers.js
  • Smartcontracts: Solidity, Hardhat
  • Storage: IPFS, Pinata
  • Encryption: Lit Protocol
  • Blockchain Network: Polygon Mumbai
  • Indexer: The Graph

Workflow Architecture:

Workflow Architecture

Access Control conditions:

Its quite surprising that many people use NFT or eth balance based access control. If I posses specific NFT or balance in my account, I should be able to decrypt other users passwords? No. So, I'm using the logic where the user who encrypted the password can only decrypt it. This is a very basis of encryption and decryption of passwords. I'm not sure if this is the right way to do it. I'm open to suggestions.

// only the user who encrypted the data should be able to decrypt it
const accessControlConditions = [
  {
    contractAddress: "",
    standardContractType: "",
    chain: "mumbai",
    method: "",
    parameters: [":userAddress"],
    returnValueTest: {
      comparator: "=",
      value: account // ,<=== user address should be dynamic and match the user address connected to the wallet
    }
  }
];

Prerequisites

There are some optional prerequisites that you can skip and use my deployed resources instead.

  1. Node.js Nodejs version 14.17.0 or higher.
  2. Private key of an Ethereum account with some ETH/Matic in it. (Optional)
  3. RPC endpoint of an Ethereum node of your choice. (Optional)
  4. Metamask extension installed in your browser.
  5. Pinata API keys.
  6. The Graph Account. (Optional)

Deployed Resources:

Getting Started

Copy the .env.example file to .env and fill in the required values.

Deploying Contract (Optional)


yarn install

yarn hardhat compile

yarn hardhat deploy --network polygonTest

# copy contract address deployed and paste it in client's .env file

Deploying Subgraph (Optional)

Note: Update the subgraph.yaml file with the contract address deployed in the previous step. Update deploy script with your own subgraph name.


cd indexer
yarn install
yarn codegen
yarn deploy

# copy subgraph url and paste it in client's .env file

Running the client

Copy the .env.example file to .env and fill in the required values.

cd client
yarn install
yarn dev

Safety

This is experimental software and is provided on an "as is" and "as available" basis.

Lit Password Manager is a proof of concept and is not ready for production use. It is not audited and has not been tested for security. Use at your own risk. I do not give any warranties and will not be liable for any loss incurred through any use of this codebase.

Demo

intro_video.mp4

Screenshot1

Screenshot2

Screenshot3

Screenshot4

lit-password-manager's People

Contributors

salmandabbakuti 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.