This is a Next.js application that allows users to send anonymous messages to others via a public URL. It integrates Google Gemini API for smart message handling, supports custom sign-up with email verification, and uses NextAuth for secure authentication.
✨ Features
🔐 Authentication
Custom sign-up system with email verification (via Nodemailer).
NextAuth
for session management & provider support.
🤖 AI Integration
Powered by Google Gemini API for message processing.
💌 Anonymous Messaging
Users share their public URL.
Anyone with the link can send messages anonymously.
🎨 Modern UI & Forms
shadcn/ui components for a clean and consistent design.
react-hook-form for robust form handling.
zod for type-safe schema validation.
📧 Email Verification
Secure verification flow using Nodemailer.
🔑 Forgot Password
Secure reset flow implemented using JWT tokens.
🛠️ Getting Started
-
Clone the Repository
git clone https://github.com/mahesh-09-12/secret-message.git
cd secret-message-app
-
Install Dependencies
npm install
yarn install
pnpm install
bun install
- Set Up Environment Variables
Create a .env.local file in the root of your project and add:
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=your_secret_key
GEMINI_API_KEY=your_gemini_api_key
EMAIL_USER=your_email@example.com
EMAIL_PASSWORD=your_email_password
EMAIL_FROM=your_email@example.com
JWT_SECRET=your_jwt_secret
DATABASE_URL=your_database_url
-
Run the Development Server
npm run dev
yarn dev
pnpm dev
bun dev
Visit http://localhost:3000 🎉
📦 Deployment
Deploy easily with Vercel:
Push your project to GitHub/GitLab/Bitbucket.
Import it into Vercel.
Configure environment variables.
Deploy 🚀
More details: Next.js Deployment Docs
📚 Tech Stack
Framework: Next.js
Auth: NextAuth
Forms: react-hook-form
- zod
UI Components: shadcn/ui
AI Integration: Google Gemini API
Email: Nodemailer
Database: (MongoDB / Prisma / Your choice)
🤝 Contributing
Contributions, issues, and feature requests are welcome! Feel free to open a PR or create an issue.
📜 License
This project is licensed under the MIT License.