This guide walks you through cloning the repository, installing dependencies, wiring up your environment variables, and creating your first account — all in about five minutes. You will need Node.js 18+, a MongoDB Atlas cluster (or any MongoDB connection string), a Brevo account for transactional email, and a Google AI Studio API key for the Gemini suggestions feature.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/dev0302/nextjs-project-1/llms.txt
Use this file to discover all available pages before exploring further.
Configure environment variables
Create a The minimum required variables are
.env.local file in the project root and populate it with the required values. See the Environment Variables reference for a full description of every variable..env.local
DATABASE_URL, NEXTAUTH_SECRET, NEXTAUTH_URL, SENDER_EMAIL, BREVO_API_KEY, and GOOGLE_API_KEY. GEMINI_MODEL is optional and defaults to gemini-1.5-flash if omitted.Run the development server
Start the Next.js development server:Open http://localhost:3000 in your browser. The app uses Next.js 16’s App Router, so all pages and API routes under
src/app/ are available immediately with hot-reload enabled.Create your first account
Follow the sign-up flow to register and verify your account:
- Navigate to http://localhost:3000/sign-up.
- Enter a username (2–20 characters, letters/numbers/underscores only), your email address, and a password. The username field performs a live uniqueness check as you type.
- Click Send OTP. AnonMessage calls
POST /api/send-otp, which generates a 6-digit code, stores it in MongoDB with a 5-minute TTL, and sends it to your email via Brevo. - You are redirected to http://localhost:3000/verify-otp. Enter the 6-digit code from your inbox and click Create Account.
- On success you are redirected to
/sign-in. Sign in with your email and password to land on your Dashboard at http://localhost:3000/dashboard. - Copy your shareable link from the dashboard and open it in a private browser window to send yourself an anonymous test message at
/u/[your-username].