Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NGLNad 💌

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

✨ Features

  • 🔒 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

🚀 How It Works

  1. Register - Pay 0.1 MON one-time registration fee
  2. Set Username - Choose a custom username in your dashboard
  3. Share Your Link - Share your profile link with others
  4. Send Messages - Others can send you anonymous messages (0.001 MON per message)
  5. Read Messages - Access and decrypt your messages anytime
  6. Stay Anonymous - Your identity remains completely private

🏗️ Architecture

This project consists of two main components:

Smart Contract (/src)

  • NGLMessage.sol: Core smart contract handling user registration, messaging, and payments
  • Built with Solidity ^0.8.19
  • Deployed on Monad blockchain

Frontend (/ngl-frontend)

  • Next.js application with TypeScript
  • Tailwind CSS for styling
  • Web3 integration for blockchain interactions
  • Responsive design for all devices

🛠️ Development Setup

Prerequisites

Smart Contract Development

# 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

Frontend Development

# 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 dev

📝 Environment Variables

Create 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_id

📋 Smart Contract Functions

  • register() - Register a new user (requires 0.1 MON)
  • updateUsername(string) - Update your username
  • sendMessage(string, string) - Send encrypted message to user (requires 0.001 MON)
  • getMessages() - Get all your received messages
  • withdraw() - Owner function to withdraw contract funds

🧪 Testing

# 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

🚀 Deployment

Smart Contract

  1. Update foundry.toml with your network configuration
  2. Create deployment script in script/ directory
  3. Deploy using Foundry

Frontend

The frontend is deployed on Vercel. For your own deployment:

  1. Fork this repository
  2. Connect your Vercel account
  3. Import the project
  4. Set environment variables
  5. Deploy!

🤝 Contributing

We welcome contributions! Please read our Contributing Guidelines before submitting PRs.

Development Process

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

👨‍💻 Author

Made with 💜 by w1th0ut

📞 Support

If you have any questions or need support:


⭐ If you like this project, please give it a star!

About

NGLNad - Anonymous Web3 Messaging DApp on Monad Blockchain

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages