Skip to content

theGateway1/Decentralized-AI-ToDo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

A decentralized ToDo app integrated with an open source AI agent: View Application

Tech Stack:

Frontend: React JS (Hosted on netflify)
Backend: Node JS, Express JS (AWS Elastic Beanstalk)
Blockchain: Solidity smart contract (Hosted on Polygon Amoy Testnet)
AI Model: Meta-llama/Llama-3.2-1B-Instruct (Open Source)


Endpoints:

Frontend: https://modern-ai-todo.netlify.app
Backend: https://gpt4-web3-todo-app.ap-south-1.elasticbeanstalk.com/
Smart contract Address: 0xe2516BF6d888E040f619dd1157f423bA3be96D88
Verify Contract: https://amoy.polygonscan.com/txs?a=0xe2516BF6d888E040f619dd1157f423bA3be96D88&p=1
ABI File: https://drive.google.com/file/d/11RIHW432wGiPrYE8IcDaer-QdIaTGPyG/view?usp=sharing


System design & usage notes:

  1. The frontend of this application does NOT handle any business logic or blockchain transactions.
  2. The frontend connects to the user wallet and requests the backend for an auth token (JWT).
  3. The backend sends back auth token, and from that point every request from frontend includes auth token inside headers - without that the request will fail.
  4. For using this app on PC, install MetaMask extension. For mobile, install MetaMask application, since regular browser windows don't have access to Ethereum.
  5. Connect to Polygon Amoy Testnet. You won't need POL currency to pay gas fee for using this application, as the backend is signing the transactions with its own private key.
  6. To enable connection to backend inside MetaMask browser, the backend uses CloudFront as CDN, because MetaMask has a rare issue of relying exclusively on the (centralized) list of root certs provided by the metamask team. - it trusts CloudFront issued SSL certificates.
  7. The AI agent integrated with this application is an open source AI model (meta-llama/Llama-3.2-1B-Instruct) available on GPT4All, integrated using Hugging Face.
  8. The app has a live task completion chart, built using d3.js.

Local installation & setup:

  1. Clone this repository.
  2. Run npm install inside both directories - frontend and backend.
  3. Inside backend folder, create a .env file and add following keys:
ANKR_POLYGON_RPC_URL 
PRIVATE_KEY (MetaMask Wallet Key + 0x appended in front) 
TRUFFLE_DEPLOYMENT_KEY (MetaMask Wallet Key without 0x appended in front) 
HUGGINGFACE_API_KEY 
AUTH_SECRET
  1. Run nodemon in backend.
  2. Run npm start in frontend.
  3. Click on MetaMask extension and connect with Polygon Amoy testnet.
  4. Click on Connect wallet to connect with your wallet.
  5. Go Crazy!

Screenshots

image

image

image

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors