Anonymous Web3 Messaging DApp on Monad Blockchain
NGLNad is a decentralized application that enables users to send and receive anonymous messages securely using blockchain technology. Built on the Monad blockchain with end-to-end encryption.
🌐 Live Demo: nglnad.vercel.app
- 🔒 Anonymous & Secure: Messages are encrypted and stored on-chain
- 🌐 Web3 Decentralized: Fully decentralized DApp running on Monad blockchain
- 💰 Pay Once, Use Forever: One-time registration fee of 0.1 MON
- 📩 On-Chain Messages: All messages are stored directly on the blockchain
- 🏷️ Custom Usernames: Set personalized usernames for easy sharing
- 🔗 Shareable Links: Get your unique link to receive messages
- Register - Pay 0.1 MON one-time registration fee
- Set Username - Choose a custom username in your dashboard
- Share Your Link - Share your profile link with others
- Send Messages - Others can send you anonymous messages (0.001 MON per message)
- Read Messages - Access and decrypt your messages anytime
- Stay Anonymous - Your identity remains completely private
This project consists of two main components:
- NGLMessage.sol: Core smart contract handling user registration, messaging, and payments
- Built with Solidity ^0.8.19
- Deployed on Monad blockchain
- Next.js application with TypeScript
- Tailwind CSS for styling
- Web3 integration for blockchain interactions
- Responsive design for all devices
# Install Foundry dependencies
forge install
# Build contracts
forge build
# Run tests
forge test
# Deploy contract (replace with your RPC URL and private key)
forge script script/Deploy.s.sol --rpc-url <MONAD_RPC_URL> --private-key <PRIVATE_KEY> --broadcast# Navigate to frontend directory
cd ngl-frontend
# Install dependencies
npm install
# Create environment file
cp .env.example .env
# Edit .env with your contract address and RPC URL
# Start development server
npm run devCreate a .env file in the ngl-frontend directory:
NEXT_PUBLIC_CONTRACT_ADDRESS=your_contract_address
NEXT_PUBLIC_MONAD_RPC_URL=your_monad_rpc_url
NEXT_PUBLIC_CHAIN_ID=your_chain_idregister()- Register a new user (requires 0.1 MON)updateUsername(string)- Update your usernamesendMessage(string, string)- Send encrypted message to user (requires 0.001 MON)getMessages()- Get all your received messageswithdraw()- Owner function to withdraw contract funds
# Run smart contract tests
forge test
# Run tests with gas reporting
forge test --gas-report
# Run frontend tests (if available)
cd ngl-frontend
npm test- Update
foundry.tomlwith your network configuration - Create deployment script in
script/directory - Deploy using Foundry
The frontend is deployed on Vercel. For your own deployment:
- Fork this repository
- Connect your Vercel account
- Import the project
- Set environment variables
- Deploy!
We welcome contributions! Please read our Contributing Guidelines before submitting PRs.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Made with 💜 by w1th0ut
If you have any questions or need support:
- Create an issue in this repository
- Visit our live application: nglnad.vercel.app
⭐ If you like this project, please give it a star!