A secure, anonymous messaging platform with end-to-end encryption. Share your honest thoughts without revealing your identity.
- Hybrid RSA + AES encryption — Messages are encrypted client-side before reaching the server
- Zero-knowledge architecture — Server never sees plaintext messages
- Password-protected private keys with PBKDF2 key derivation (100,000 iterations)
- Recovery codes for account recovery without compromising security
- Send messages to any registered user without creating an account
- Recipients can only read messages after decrypting with their password
- Toggle message acceptance on/off from the dashboard
- Get engaging, thought-provoking message suggestions powered by Google Gemini AI
- Perfect for when you need conversation starters
- Beautiful, responsive design with Tailwind CSS
- Dark/Light theme support via
next-themes - Toast notifications with
sonner - Radix UI components for accessibility
| Category | Technologies |
|---|---|
| Framework | Next.js 15 (App Router, Turbopack) |
| Language | TypeScript |
| Database | MongoDB with Mongoose ODM |
| Authentication | NextAuth.js |
| Encryption | Web Crypto API (RSA-OAEP, AES-GCM, PBKDF2) |
| Resend + React Email | |
| AI | Vercel AI SDK + Google Gemini |
| Styling | Tailwind CSS 4 |
| UI Components | Radix UI, Lucide Icons |
| Validation | Zod + React Hook Form |
- Node.js 18.x or higher
- MongoDB instance (local or MongoDB Atlas)
- Google AI API key (for message suggestions)
- Resend API key (for verification emails)
-
Clone the repository
git clone https://github.com/yourusername/myhonestmessage.git cd myhonestmessage -
Install dependencies
npm install
-
Set up environment variables
Create a
.envfile in the root directory:# Database MONGODB_URI=mongodb+srv://your-connection-string # NextAuth NEXTAUTH_SECRET=your-secret-key NEXTAUTH_URL=http://localhost:3000 # Email (Resend) RESEND_API_KEY=re_your_api_key # AI (Google Gemini) GOOGLE_GENERATIVE_AI_API_KEY=your-api-key
-
Run the development server
npm run dev
-
Open your browser
Navigate to http://localhost:3000
src/
├── app/
│ ├── (app)/ # Main app routes
│ │ ├── dashboard/ # User dashboard
│ │ └── page.tsx # Home page
│ ├── (auth)/ # Authentication routes
│ │ ├── sign-in/
│ │ ├── sign-up/
│ │ └── verify/
│ ├── api/ # API routes
│ │ ├── accept-messages/
│ │ ├── auth/
│ │ ├── check-username-unique/
│ │ ├── delete-message/
│ │ ├── get-encrypted-key/
│ │ ├── get-messages/
│ │ ├── get-public-key/
│ │ ├── send-message/
│ │ ├── sign-up/
│ │ ├── suggest-messages/
│ │ └── verify-code/
│ └── user/ # Public user profile
├── components/
│ ├── ui/ # Reusable UI components
│ ├── MessageCard.tsx
│ ├── MessageForm.tsx
│ ├── Navbar.tsx
│ └── RecoveryCodeModal.tsx
├── lib/
│ ├── crypto.ts # E2E encryption utilities
│ ├── dbConnect.ts # MongoDB connection
│ ├── resend.ts # Email client
│ └── utils.ts
├── models/
│ └── UserModel.ts # User & Message schemas
├── schemas/ # Zod validation schemas
└── types/ # TypeScript types
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Sender │ │ Server │ │ Recipient │
│ (Browser) │ │ (Next.js) │ │ (Browser) │
└────────┬────────┘ └────────┬────────┘ └────────┬────────┘
│ │ │
│ 1. Fetch public key │ │
│──────────────────────>│ │
│ │ │
│ 2. Encrypt message │ │
│ (AES-256-GCM) │ │
│ │ │
│ 3. Encrypt AES key │ │
│ (RSA-OAEP-2048) │ │
│ │ │
│ 4. Send encrypted │ │
│ payload │ │
│──────────────────────>│ 5. Store encrypted │
│ │ (no plaintext) │
│ │ │
│ │ 6. Fetch messages │
│ │<──────────────────────│
│ │ │
│ │ 7. Decrypt with │
│ │ private key │
│ │ │
- Client-side encryption: Messages are encrypted in the browser before transmission
- RSA-2048 + AES-256: Industry-standard hybrid encryption
- PBKDF2 key derivation: 100,000 iterations protect against brute-force attacks
- Recovery codes: 16-character codes for account recovery (displayed once)
- IndexedDB key storage: Private keys cached locally for session persistence
| Command | Description |
|---|---|
npm run dev |
Start development server with Turbopack |
npm run build |
Build for production |
npm run start |
Start production server |
npm run lint |
Run ESLint |
Contributions are welcome! Please feel free to submit a Pull Request.
- 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
Made with <3 for anonymous, secure communication