Anonymous Social Messaging Platform - Connect with others through thoughtful, anonymous conversations with a beautiful, modern interface.
π Live Demo: ghost-note.vercel.app
- Secure User Registration with email verification
- OTP-based Password Reset with 10-minute expiry
- Last Login Tracking for user analytics
- Session Management with NextAuth.js
- Password Hashing with bcrypt
- Username Uniqueness Validation
- AI-Powered Message Suggestions using Google Gemini 2.5 Pro
- Anonymous Message Sending to any user
- Message Management (view, delete messages)
- Message Acceptance Toggle (enable/disable receiving messages)
- Real-time Message Updates
- Smart Fallback System when AI limits are exceeded
- Message Sentiment Analysis (positive, negative, neutral)
- Emotion Detection (joy, sadness, anger, surprise, fear, disgust)
- Topic Extraction from message content
- Timing Analytics (peak hours, days, weekly patterns)
- Sentiment Trends over time
- Message Statistics (length, question ratio, exclamation ratio)
- Beautiful Gradient Design with glassmorphism effects
- Responsive Design optimized for all devices
- Smooth Animations and transitions
- Toast Notifications for user feedback
- Loading States with modern spinners
- Error Handling with contextual messages
- Form Validation with Zod schemas
- Accessibility Features for inclusive design
- Smart Message Suggestions that are engaging and conversation-worthy
- Diverse Question Themes: personal reflection, hypothetical scenarios, creativity
- Context-Aware Prompts for better message quality
- Intelligent Fallback System with curated default messages
- Real-time AI Processing with error handling
- Frontend: Next.js 14 (App Router), React 18, TypeScript
- Styling: Tailwind CSS, shadcn/ui components, Lucide React icons
- Backend: Next.js API Routes, MongoDB with Mongoose
- Authentication: NextAuth.js with Credentials provider
- AI: Google Generative AI (Gemini 2.5 Flash)
- Email: Nodemailer with Gmail SMTP
- Validation: Zod schemas with React Hook Form
- Deployment: Vercel
- Database: MongoDB Atlas
- Node.js 18+
- MongoDB Atlas account
- Google Cloud account (for Gemini AI)
- Gmail account (for email sending)
-
Clone the repository
git clone <repository-url> cd ghost-note
-
Install dependencies
npm install
-
Environment Variables Create a
.env.localfile:# Database MONGODB_URI=your_mongodb_atlas_connection_string # NextAuth NEXTAUTH_SECRET=your_nextauth_secret NEXTAUTH_URL=http://localhost:3000 # Email (Gmail) GHOST_NOTE_EMAIL=[email protected] GHOST_NOTE_PASS=your_gmail_app_password # AI (Google Gemini) GOOGLE_GENERATIVE_AI_API_KEY=your_gemini_api_key
-
Run the development server
npm run dev
-
Open your browser Navigate to http://localhost:3000
- Create a MongoDB Atlas cluster
- Get your connection string
- Add it to
MONGODB_URIin.env.local
- Enable 2-factor authentication on your Gmail account
- Generate an App Password
- Use the app password in
GHOST_NOTE_PASS
- Go to Google AI Studio
- Create an API key
- Add it to
GOOGLE_GENERATIVE_AI_API_KEY
- Sign Up: Create an account with email verification
- Get Your Link: Copy your unique profile link from the dashboard
- Share: Share your link with friends or on social media
- Receive Messages: Get anonymous messages from others
- Manage: View, delete, and control message acceptance
- Analytics: View insights about your messages
- Visit Profile: Go to any user's Ghost Note profile
- Get Suggestions: Click "Suggest Messages" for AI-generated ideas
- Send Message: Write your own message or use a suggestion
- Stay Anonymous: Your identity remains hidden
src/
βββ app/ # Next.js 14 app directory
β βββ (auth)/ # Authentication pages (sign-in, sign-up, forgot-pass, verify)
β βββ (app)/ # Protected app pages (dashboard, analytics, user profiles)
β βββ api/ # API routes (auth, messages, analytics, AI suggestions)
β βββ globals.css # Global styles with custom background
βββ components/ # Reusable UI components
β βββ ui/ # shadcn/ui components
β βββ User.tsx # User profile component
β βββ Navbar.tsx # Navigation component
β βββ ... # Status components (Not, NotFound, Verified, etc.)
βββ context/ # React context providers (AuthProvider)
βββ helpers/ # Email utility functions
βββ lib/ # Database connection and utilities
βββ models/ # MongoDB schemas (User model)
βββ schemas/ # Zod validation schemas
βββ types/ # TypeScript type definitions
- Primary: Stone gradient (stone-50 to stone-100)
- Text: Stone-800 to stone-600 gradients
- Cards: White with 70% opacity and backdrop blur
- Accents: Consistent stone color variations
- Glassmorphism Cards: Modern translucent design
- Gradient Backgrounds: Subtle stone gradients
- Responsive Grid: Adaptive layouts for all devices
- Modern Icons: Lucide React icon set
- Smooth Transitions: CSS transitions and animations
- Password Hashing: bcrypt with salt rounds
- Email Verification: OTP-based account verification
- Session Management: Secure session handling with NextAuth.js
- Input Validation: Zod schema validation on all forms
- Rate Limiting: Built-in Next.js protection
- CORS Protection: Configured for production
- Environment Variables: Secure configuration management
- Push your code to GitHub
- Connect your repository to Vercel
- Add environment variables in Vercel dashboard
- Deploy automatically with zero configuration
MONGODB_URI=your_production_mongodb_uri
NEXTAUTH_SECRET=your_production_secret
NEXTAUTH_URL=https://your-domain.vercel.app
GHOST_NOTE_EMAIL=your_production_email
GHOST_NOTE_PASS=your_production_email_password
GOOGLE_GENERATIVE_AI_API_KEY=your_production_ai_keyThe application is production-ready with:
- Type Safety: Full TypeScript coverage
- Form Validation: Comprehensive Zod schemas
- Error Handling: Graceful error states
- Loading States: User-friendly loading indicators
- Responsive Design: Tested across devices
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add 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.
- Next.js for the amazing React framework
- shadcn/ui for beautiful UI components
- Google Gemini for AI-powered message suggestions
- MongoDB for reliable database storage
- Vercel for seamless deployment
- Tailwind CSS for utility-first styling
- Lucide React for beautiful icons
- Live Demo: ghost-note.vercel.app
- Issues: GitHub Issues
- Email: [email protected]
Made with β€οΈ for anonymous conversations
Ghost Note - Where thoughts flow freely, identities stay hidden.