🔗 Truth Link Live Link
Anonymous Messaging Platform Built with Next.js
Truth Link is a modern, secure anonymous messaging platform that enables authentic conversations without revealing identities. Connect with others through honest, judgment-free communication.
- Send and receive messages without revealing your identity
- Privacy-first architecture with no personal data exposure
- Secure message handling and storage
- Frontend: Next.js 15 with App Router
- Styling: Tailwind CSS with custom yellow-themed UI
- Authentication: NextAuth.js with JWT sessions
- Database: MongoDB with Mongoose ODM
- Email: Resend for verification emails
- AI Integration: Google Gemini for message suggestions
- Form Handling: React Hook Form with Zod validation
- Secure email verification with 6-digit OTP
- Beautiful HTML email templates using React Email
- Automatic code expiration for security
- Smart message suggestions using Google Gemini
- Context-aware conversation starters
- Personalized message recommendations
- Mobile-first approach with perfect responsive design
- Dark mode support
- Elegant yellow-themed UI with smooth animations
- Accessibility-focused components
- Password hashing with bcryptjs
- JWT-based authentication
- Protected routes with middleware
- Input validation and sanitization
- CSRF protection
- Node.js 18+ and npm/yarn/pnpm
- MongoDB database (Atlas or local)
- Resend account for email services
- Google AI API key for message suggestions
git clone https://github.com/skp3214/truth-link.git
cd truth-linknpm install
# or
yarn install
# or
pnpm installCreate a .env.local file in the root directory:
# Database
MONGODB_URI=your-mongodb-connection-string
# Authentication
NEXTAUTH_SECRET=your-32-character-random-secret-key
NEXTAUTH_URL=http://localhost:3000
# Email Service
RESEND_API_KEY=your-resend-api-key
# AI Features
GOOGLE_GENERATIVE_AI_API_KEY=your-google-ai-api-keynpm run dev
# or
yarn dev
# or
pnpm devOpen http://localhost:3000 in your browser.
truth-link/
├── src/
│ ├── app/ # Next.js App Router
│ │ ├── (auth)/ # Authentication routes
│ │ │ ├── sign-in/
│ │ │ ├── sign-up/
│ │ │ └── verify/
│ │ ├── (app)/ # Protected app routes
│ │ │ └── dashboard/
│ │ ├── api/ # API routes
│ │ │ ├── auth/
│ │ │ ├── send-message/
│ │ │ ├── get-messages/
│ │ │ └── suggest-messages/
│ │ ├── u/[username]/ # Public profile pages
│ │ └── page.tsx # Landing page
│ ├── components/ # Reusable components
│ │ ├── ui/ # Shadcn/ui components
│ │ ├── MessageCard.tsx
│ │ └── Navbar.tsx
│ ├── lib/ # Utilities and configurations
│ │ ├── dbConnect.ts
│ │ └── utils.ts
│ ├── models/ # MongoDB models
│ │ ├── user.model.ts
│ │ └── message.model.ts
│ ├── schemas/ # Zod validation schemas
│ └── types/ # TypeScript type definitions
├── emails/ # Email templates
└── public/ # Static assets
- Sign Up: Create account with email verification
- Sign In: Secure login with username/email
- Verification: 6-digit OTP sent via email
- Session Management: JWT-based sessions with NextAuth.js
- Send Messages: Anonymous message delivery to any user
- Receive Messages: Dashboard to view received messages
- Message Management: Delete unwanted messages
- Toggle Acceptance: Control who can send you messages
- Smart Suggestions: Context-aware message recommendations
- Conversation Starters: General friendly message suggestions
- Personalized Content: AI-generated suggestions based on user input
- Message Overview: View all received messages
- Profile Management: Control message acceptance settings
- Share Profile: Copy unique profile link
- Message Statistics: Track your anonymous conversations
| Variable | Description | Required |
|---|---|---|
MONGODB_URI |
MongoDB connection string | ✅ |
NEXTAUTH_SECRET |
JWT secret key (32+ characters) | ✅ |
NEXTAUTH_URL |
Application URL | ✅ |
RESEND_API_KEY |
Resend email service API key | ✅ |
GOOGLE_GENERATIVE_AI_API_KEY |
Google AI API key | ✅ |
We welcome contributions! Please follow these steps:
- 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
Built with ❤️ by Sachin Prajapati
Connect anonymously. Share honestly. Build genuine relationships.


