Dynamic Sdk has a bug for verify code for new user , hoping for a fix in future
Web3.Message.Signer.-.Google.Chrome.-.25.August.2025.mp4
Live Link -- https://web3-signer-mu.vercel.app/
A full-stack Web3 application that enables users to authenticate with Dynamic.xyz embedded wallets, sign custom messages, and verify signatures cryptographically.
- Headless Dynamic.xyz Integration: Email-first authentication with embedded wallet creation
- Cryptographic Message Signing: Sign custom messages using Web3 wallets
- Backend Signature Verification: Verify signatures using ethers.js with EIP-191 standard
- Beautiful Modern UI: Responsive design with dark theme and Web3 aesthetics
- Signature History: Local storage of signed messages with full details
- Real-time Backend Health: Monitor backend connectivity status
- Comprehensive Error Handling: User-friendly error messages and robust validation
- Dynamic.xyz SDK: Headless authentication and wallet management
- Ethers.js: Web3 wallet interactions and message signing
- Radix UI: Accessible, unstyled UI components
- Tailwind CSS: Utility-first styling
- React Hot Toast: User notifications
- Express.js: RESTful API server
- Ethers.js: Cryptographic signature verification
- TypeScript: Full type safety
- CORS & Security: Helmet.js and input validation
- Node.js 18+ (with npm, yarn, or pnpm)
- Dynamic.xyz Account: Free tier at app.dynamic.xyz
-
Authentication Phase
User visits app → Sees email input → Enters email → Receives OTP email → Enters OTP → Creates embedded wallet -
Wallet Connection Phase
Email verified → Embedded wallet auto-created → Wallet address displayed → Ready to sign messages -
Message Signing Phase
User types custom message → Clicks "Sign Message" → Browser wallet prompt → User confirms → Signature generated -
Verification Phase
Signature sent to backend → Backend verifies with ethers.js → Returns {isValid, signer, originalMessage} → Results displayed -
History Management
Each signature saved to localStorage → User can view history → Copy signatures → Delete entries
- Authentication: Email + OTP (no MetaMask popup required)
- Wallet: Embedded wallet automatically created by Dynamic.xyz
- Signing: Browser-based signing (may show embedded wallet UI)
- Verification: Backend cryptographically verifies signature
- Storage: History persists across browser sessions
# Clone the repository
git clone <your-repo-url>
cd Web3_Signeer
# Install frontend dependencies
npm install
# Install backend dependencies
cd backend
npm install
cd ..- Create a Dynamic.xyz account at app.dynamic.xyz
- Create a new environment
- Enable Embedded Wallets in your dashboard:
- Go to Wallets > Embedded Wallets
- Enable embedded wallet creation
- Copy your Environment ID
# Copy the example file
cp .env.local.example .env.local
# Edit with your values
NEXT_PUBLIC_DYNAMIC_ENVIRONMENT_ID=2e180032-bc06-43e7-8b29-f155290619ca
NEXT_PUBLIC_API_URL=http://localhost:3001
NEXT_PUBLIC_DYNAMIC_DEBUG=false# Copy the example file
cd backend
cp .env.example .env
# Edit with your values
PORT=3001
NODE_ENV=development
FRONTEND_URL=http://localhost:3000cd backend
npm run devThe backend will start on http://localhost:3001
# From project root
npm run devThe frontend will start on http://localhost:3000
# Install all dependencies
npm run setup
# Setup environment files
cp .env.local.example .env.local
cp backend/.env.example backend/.env
# Add your Dynamic.xyz Environment ID to .env.local
# NEXT_PUBLIC_DYNAMIC_ENVIRONMENT_ID=your-env-id-here# Run diagnostic tool
npm run debug
# If all checks pass, start the servers:
# Terminal 1: Backend
cd backend && npm run dev
# Terminal 2: Frontend
npm run devManual Verification:
- Open http://localhost:3000
- You should see the Web3 Message Signer interface
- Check that "Backend Online" indicator is green
- Test authentication with your email
- Sign a test message and verify it works end-to-end
- Email authentication works
- OTP verification completes successfully
- Wallet address displays correctly
- Message signing prompts wallet interaction
- Backend verification returns correct results
- Signature history persists across sessions
- Copy-to-clipboard functions work
- Disconnect clears all state
- CORS Configuration: Add your deployment domains
- Webhook Endpoints: Configure if needed for production
- Rate Limiting: Set appropriate limits for your use case
- Security Settings: Review and configure security policies
Web3_Signeer/
├── app/ # Next.js app directory
│ ├── globals.css # Global styles
│ ├── layout.tsx # Root layout with providers
│ └── page.tsx # Main application component
├── backend/ # Express.js backend
│ ├── src/
│ │ ├── index.ts # Express server setup
│ │ ├── utils/ # Utility functions
│ │ │ └── signatureVerification.ts
│ │ └── middleware/ # Express middleware
│ │ └── errorHandler.ts
│ ├── package.json # Backend dependencies
│ └── tsconfig.json # TypeScript config
├── components/ # React components
│ ├── dynamic-provider.tsx # Dynamic.xyz context provider
│ └── ui/ # Radix UI components
├── lib/ # Utility libraries
│ ├── utils.ts # General utilities
│ └── web3.ts # Web3-specific functions
├── GUIDE/ # Development guides
├── package.json # Frontend dependencies
└── README.md # This file
Health check endpoint
{
"status": "OK",
"timestamp": "2024-01-01T12:00:00.000Z",
"service": "Web3 Message Signer Backend"
}Verify a message signature
// Request
{
"message": "Hello, Web3!",
"signature": "0x1234..."
}
// Response (Success)
{
"isValid": true,
"signer": "0x742d35Cc6634C0532925a3b8D4C2C4e0C8A7d3E2",
"originalMessage": "Hello, Web3!",
"timestamp": "2024-01-01T12:00:00.000Z"
}
// Response (Error)
{
"isValid": false,
"error": "Invalid signature format",
"timestamp": "2024-01-01T12:00:00.000Z"
}- Check Console for JavaScript errors
- Verify Network tab for API call failures
- Check Application > Local Storage for saved history
- Fork the repository
- Create a feature branch:
git checkout -b feature/new-feature - Make your changes
- Add tests for new functionality
- Commit your changes:
git commit -am 'Add new feature' - Push to the branch:
git push origin feature/new-feature - Submit a pull request
- Dynamic.xyz for Web3 authentication infrastructure
- Ethers.js for Ethereum interactions