Skip to content
Aryan Deshmukh

App · JavaScript

Node Connect

Decentralised chat with MetaMask sign-in and token rewards. Solidity, Hardhat, Next.js.

Open the site Source on GitHublive, 112 msCI passing

Why it exists

It started as a final-year project to learn how a dApp is built end to end: a Solidity contract, its tests, a deploy to a public testnet and a frontend that talks to it through a wallet. Bringing it up to date in 2026 (Next.js 16, ethers 6, Hoodi after Holesky was retired, CI) taught the rest: a leaked deployer key does not stop mattering when the file is deleted, and putting everything on chain makes every click cost a wallet confirmation and every message public.

What it does

  1. 01

    Wallet sign-in. MetaMask connects the account; the app switches MetaMask to the configured network and adds it when missing. The API uses Sign-In with Ethereum (EIP-4361) and an httpOnly cookie.

  2. 02

    On-chain profiles and friendships. a username and an encryption public key per address in the Registry contract; a friendship needs a request and an acceptance, and can be declined, removed or blocked.

  3. 03

    End-to-end encrypted chat. X25519 keys come from one wallet signature, messages are sealed in the browser (NaCl box) and the server stores base64 ciphertext only. The API accepts a message only between accepted friends, checked on chain.

  4. 04

    Pending and failed states. a message shows at once as sending; if the API refuses it, it stays in the thread as not sent with Retry and Discard.

  5. 05

    Live thread. the open conversation polls every 4 seconds while the tab is visible.

  6. 06

    Mining. the Mine page shows yesterday's claim, solves the proof of work in a Web Worker and sends Mining.claim; the server builds each day's Merkle tree from message counts (never content) and publishes its leaves at /api/mining/batch so anyone can recompute the root. A daily Vercel cron (/api/mining/anchor, 00:10 UTC) posts the root as the relayer.

Next

Cash Your Coupons