A full-stack Web3 application that allows users to sign custom messages with their wallets and verify signatures on the backend.
- Dynamic.xyz Headless Wallet Integration: Secure wallet authentication without widgets
- Custom Message Signing: Sign any message with your connected wallet
- Backend Verification: Verify signatures and recover signer addresses using ethers.js
- Message History: Persistent history of signed messages with verification status
- Beautiful UI: Modern glassmorphic design with smooth animations
- Responsive Design: Works seamlessly on desktop and mobile
- React 18+ with TypeScript
- Dynamic.xyz SDK for headless wallet integration
- Tailwind CSS with custom design system
- shadcn/ui components
- Local storage for message persistence
- Express.js REST API
- ethers.js for signature verification
- CORS enabled for cross-origin requests
- In-memory storage for demonstration
- Node.js 18+ and npm
- Git
# Clone the repository
git clone <repository-url>
cd <project-name>
# Install dependencies
npm install
# Start the development server
npm run devThe frontend will run on http://localhost:8080
# Navigate to server directory
cd server
# Install dependencies
npm install
# Start the backend server
npm startThe backend API will run on http://localhost:3001
- Sign up at Dynamic.xyz
- Create a new project and get your Environment ID
- Update
src/components/WalletProvider.tsxwith your actual Environment ID:
environmentId: 'your_actual_environment_id_here'GET /health
Returns server status and timestamp.
POST /verify-signature
Content-Type: application/json
{
"message": "Your custom message",
"signature": "0x1234..."
}
Returns:
{
"isValid": true,
"signer": "0xabc123...",
"originalMessage": "Your custom message"
}GET /signatures
Returns all stored signatures for debugging.
- Connect Wallet: Use Dynamic.xyz headless authentication
- Enter Message: Type any custom message you want to sign
- Sign Message: Wallet will prompt for signature
- Auto Verification: Message is sent to backend for verification
- View History: All signed messages are stored locally and displayed
Run the test suite:
npm test- Push to GitHub
- Connect repository to Vercel
- Deploy automatically
- Create new web service
- Connect to the
/serverdirectory - Set start command:
npm start - Update frontend API URLs to production backend
- Messages are signed client-side with user's private key
- Backend only receives messages and signatures (never private keys)
- Signature verification uses standard ethers.js verification
- No sensitive data is stored on the backend
- All verification is cryptographically secure
- ✅ In-memory storage for simplicity
- ✅ Frontend-only message history
- ✅ Direct API calls (no API client abstraction)
- 🔄 Add database for persistent backend storage
- 🔄 Implement API client with retry logic and error handling
- 🔄 Add message encryption for sensitive content
- 🔄 Implement user authentication and message ownership
- 🔄 Add message templates and categories
- 🔄 Implement signature batching for multiple messages
- 🔄 Add multi-chain support (currently Ethereum only)
- 🔄 Add rate limiting and request validation
The app uses a custom crypto-native design system with:
- Dark theme with purple/blue gradients
- Glassmorphic cards with backdrop blur
- Semantic color tokens in HSL format
- Smooth animations and hover effects
- Responsive typography scale
Frontend:
- React 18+
- TypeScript
- Tailwind CSS
- Dynamic.xyz SDK
- shadcn/ui
- Vite
Backend:
- Node.js
- Express.js
- ethers.js
- CORS
MIT License - see LICENSE file for details.