Skip to content

Repository files navigation

image image image image image

🛠️ Tech Stack

Frontend

Backend

Auth & Communication

AI

  • OpenAI API — GPT-powered anonymous message suggestions

📁 Project Structure

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)

⚙️ Getting Started

Prerequisites

  • Node.js 18+
  • A MongoDB Atlas cluster (or local MongoDB)
  • API keys for OpenAI and Resend

Installation

# Clone the repo
git clone YOUR_GITHUB_REPO_LINK_HERE
cd mystery-message

# Install dependencies
npm install

Environment Variables

Create 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_...

Run Locally

npm run dev

Open http://localhost:3000 in your browser.


🔑 How It Works

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

🤝 Contributing

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 Request

📄 License

This project is licensed under the MIT License.


Made with ❤️ using Next.js, MongoDB & OpenAI

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages