|
Frontend
- Next.js 15 — App Router, Server Components
- Tailwind CSS — Utility-first styling
- Shadcn UI — Accessible, composable components
- React Hook Form + Zod — Type-safe form validation
Backend
- Next.js API Routes — Serverless API layer
- MongoDB + Mongoose — Flexible NoSQL data modeling
Auth & Communication
- NextAuth / Auth.js — Session-based authentication
- Resend — Transactional email for OTP delivery
AI
- OpenAI API — GPT-powered anonymous message suggestions
mystery-message/
├── src/
│ ├── app/ # Next.js App Router pages & API routes
│ │ ├── api/ # REST endpoints (auth, messages, suggest)
│ │ ├── (auth)/ # Sign-in, Sign-up, Verify pages
│ │ └── u/[username]/ # Public anonymous message page
│ ├── components/ # Reusable UI components
│ ├── lib/ # DB connection, utilities
│ ├── models/ # Mongoose schemas (User, Message)
│ └── schemas/ # Zod validation schemas
├── public/
└── .env.local # Environment variables (see below)
- Node.js 18+
- A MongoDB Atlas cluster (or local MongoDB)
- API keys for OpenAI and Resend
# Clone the repo
git clone YOUR_GITHUB_REPO_LINK_HERE
cd mystery-message
# Install dependencies
npm installCreate a .env.local file in the root directory:
# Database
MONGODB_URI=mongodb+srv://<user>:<password>@cluster.mongodb.net/mystery-message
# Auth
NEXTAUTH_SECRET=your_super_secret_nextauth_key
NEXTAUTH_URL=http://localhost:3000
# AI
OPENAI_API_KEY=sk-...
# Email (via Resend)
RESEND_API_KEY=re_...npm run devOpen http://localhost:3000 in your browser.
1. Sign Up → Get a unique link (e.g. /u/yourname)
2. Share your link → on Instagram bio, Twitter, Discord, etc.
3. Anyone visits your link → types an anonymous message
4. You log in → read, manage, and delete messages on your dashboard
Contributions are welcome! Please open an issue first to discuss what you'd like to change.
# Fork the repo, then:
git checkout -b feature/your-feature-name
git commit -m "feat: add your feature"
git push origin feature/your-feature-name
# Open a Pull RequestThis project is licensed under the MIT License.
Made with ❤️ using Next.js, MongoDB & OpenAI




