A modern Next.js application that allows users to send and receive anonymous messages with AI-powered suggestions.
- User Authentication: Secure signup and signin with email verification
- Anonymous Messaging: Send anonymous messages to registered users
- Message Management: View, accept, and delete received messages
- AI-Powered Suggestions: Get message suggestions using Google's AI models
- Responsive Design: Works seamlessly on all devices
- Frontend: Next.js 15, React 19, Tailwind CSS 4
- Backend: Next.js API Routes, MongoDB with Mongoose
- Authentication: NextAuth.js
- Validation: Zod, React Hook Form
- Email: Nodemailer, Resend, React Email
- AI: AI SDK with Google integration
- Styling: Tailwind CSS, Radix UI components
- Deployment: Vercel (recommended)
- Node.js 18+ and npm/yarn/pnpm
- MongoDB database
- Google AI API key (for message suggestions)
- Email service credentials (for verification emails)
-
Clone the repository
git clone https://github.com/devMonkRahul/Next-Mistry-Message.git cd Next-Mistry-Message -
Install dependencies
npm install # or yarn install -
Create a
.env.localfile in the root directory with the following variables:# MongoDB MONGODB_URI=your_mongodb_connection_string # NextAuth NEXTAUTH_SECRET=your_nextauth_secret NEXTAUTH_URL=http://localhost:3000 # Email (Choose one: Nodemailer or Resend) # For Nodemailer EMAIL_SERVER_USER=your_email EMAIL_SERVER_PASSWORD=your_email_password EMAIL_SERVER_HOST=smtp.example.com EMAIL_SERVER_PORT=587 EMAIL_FROM=your_email # For Resend RESEND_API_KEY=your_resend_api_key # Google AI GOOGLE_AI_API_KEY=your_google_ai_api_key -
Run the development server
npm run dev # or yarn dev -
Open http://localhost:3000 in your browser
src/
├── app/ # Next.js App Router
│ ├── (app)/ # Main application routes
│ ├── (auth)/ # Authentication routes
│ ├── api/ # API routes
│ └── u/ # User profile routes
├── components/ # React components
│ └── ui/ # UI components
├── config/ # Configuration files
├── context/ # React context providers
├── lib/ # Utility libraries
├── model/ # MongoDB models
├── schemas/ # Zod validation schemas
├── types/ # TypeScript type definitions
└── utils/ # Utility functions
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.