A complete anonymous messaging platform built entirely with Next.js, featuring built-in API routes for backend functionality. Send and receive anonymous feedback securely without revealing your identity.
- 🔒 100% Anonymous Messaging: Send messages without any sender identification
- ✉️ Email Verification: Secure sign-up process with OTP verification
- 📬 Message Inbox: Organized view of all received messages
- ⚙️ Privacy Toggle: Enable/disable message receiving anytime
- 📱 Mobile-Optimized: Responsive design for all devices
- 🔄 Session Management: Automatic logout after inactivity
- Next.js 14 (App Router)
- React + TypeScript
- NextAuth.js (Authentication)
- MongoDB (Database)
- Mongoose (ODM)
- Shadcn/ui (Beautiful UI Components)
- MUI (Material UI Components)
- Tailwind CSS (Utility-first styling)
- React Hook Form + Zod (Form validation)
- Bcrypt.js (Password hashing)
- Nodemailer (Email services)
- Node.js (v18+)
- MongoDB Atlas account or local MongoDB instance
- SMTP email service (SendGrid, Resend, etc.)
-
Clone the repository
git clone https://github.com/Kuldeep-Rathod/Mystery-Message.git cd mystery-messages -
Install dependencies
npm install
-
Set up environment variables Create
.envfile in root directory:MONGODB_URI=mongodb://localhost:27017/ NEXTAUTH_SECRET=your-strong-secret-key-here NEXTAUTH_URL=http://localhost:3000 SMTP_HOST=your.smtp.server SMTP_PORT=587 SMTP_USER=your@email.com SMTP_PASS=your-email-password FROM_EMAIL=no-reply@yourdomain.com
-
Run the development server
npm run dev
-
Access the app Open http://localhost:3000 in your browser
mystery-message/
├── public/ # Static files (images, fonts, etc.)
│
├── src/ # Main application code
│ ├── app/ # Next.js App Router
│ │ ├── (app)/ # Protected routes wrapper
│ │ ├── (auth)/ # Authentication routes wrapper
│ │ ├── api/ # API route handlers
│ │ └── u/[username]/ # Dynamic user message pages
│ │
│ ├── components/ # Reusable UI components
│ ├── context/ # React context providers
│ ├── lib/ # Utility/helper functions
│ ├── models/ # Database models (Mongoose)
│ ├── schemas/ # Zod validation schemas
│ ├── types/ # TypeScript type definitions
│ ├── utils/ # Email templates and utilities
│ └── middleware.ts # Next.js middleware
│
└── .env # Environment variables
- Find a user's profile (e.g.,
mystery-message.com/u/username) - Type your secret message
- Click "Send Anonymously"
- The recipient will never know it was you!
- Register and verify your email
- Share your unique link (
/u/yourusername) - Manage messages in your private dashboard
- Control who can message you in settings
- Push your code to a GitHub repository
- Create a new project in Vercel
- Add all environment variables
- Deploy!
MONGODB_URI=your_production_mongo_uri
NEXTAUTH_SECRET=your_production_secret
SMTP_CREDENTIALS=your_production_email_credsWe welcome contributions! Please follow these steps:
- Fork the project
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
For questions or feedback:
- Kuldeep Rathod - kuldiprathod375@gmail.com
- Project Link: https://github.com/Kuldeep-Rathod/Mystery-Message