An anonymous social platform designed exclusively for college students to share experiences, confessions, and connect with peers in a safe, judgment-free space.
- Features
- Tech Stack
- Architecture
- AI Content Moderation
- Getting Started
- Environment Variables
- API Endpoints
- Security Features
- Contributing
- License
- Share thoughts, experiences, and confessions completely anonymously
- Auto-generated unique aliases using intelligent name combinations (e.g., "Silent Panda", "Mystic Tiger")
- No personal information ever exposed to other users
- Choose from 6 categories: General, Hostel, Exams, Gossip, Placements, Confessions
Leveraging Google Gemini 3 Flash AI, every confession is automatically analyzed through our intelligent Traffic Light System:
- π’ GREEN (Auto-Approve): Wholesome content, funny experiences, harmless confessions, study tips
- π‘ YELLOW (Manual Review): Borderline content, sarcasm, controversial opinions requiring human judgment
- π΄ RED (Auto-Reject): Hate speech, harassment, explicit content, threats, bullying, violence
AI Advantages:
- Real-time content analysis
- Context-aware moderation
- Reduces manual moderation workload by 80%
- Protects community safety 24/7
- College Email Verification: Restricted to verified college emails (@nith.ac.in)
- 6-Digit OTP System:
- Sent via Nodemailer email service
- 10-minute validity period
- Required for signup and password reset
- JWT Token Authentication: 30-day secure sessions
- Password Requirements:
- Minimum 12 characters
- Bcrypt hashing with salt rounds
- Forgot Password Flow: Complete OTP-based password reset
- Image Uploads:
- Automatic optimization
- Multiple format support (JPG, PNG, GIF)
- Cloudinary CDN for fast delivery
- Video Uploads:
- Automatic transcoding
- Streaming optimization
- Storage Management:
- Automatic cleanup of unused media
- Efficient CDN-based delivery
- Top contributors ranked by:
- Total posts created
- Total likes received
- Community engagement score
- Anonymous competition without revealing identities
- Dark mode optimized design
- Fully responsive layout (mobile, tablet, desktop)
- Smooth animations and transitions
- Real-time search functionality
- Category-based filtering
- Infinite scroll feed
- Like/Dislike system
- Comment on posts
- User profiles with statistics
- Visitor counter
- Real-time notifications
| Technology | Purpose |
|---|---|
| Next.js 14 | React framework with App Router |
| TailwindCSS | Utility-first CSS framework |
| Shadcn/ui | Beautiful component library |
| Lucide Icons | Modern icon set |
| Sonner | Toast notifications |
| Context API | State management |
| Technology | Purpose |
|---|---|
| Node.js & Express.js | Server framework |
| MongoDB & Mongoose | Database & ODM |
| JWT | Token-based authentication |
| Bcrypt.js | Password hashing |
| Multer | File upload middleware |
| Cloudinary SDK | Media storage & optimization |
| Nodemailer | Email service for OTP |
| Google Gemini AI | AI content moderation |
ZeroVerse/
β
βββ client/ # Frontend (Next.js)
β βββ src/
β β βββ app/ # App Router pages
β β β βββ page.js # Home feed
β β β βββ login/ # Login page
β β β βββ signup/ # Signup + OTP verification
β β β βββ forgot-password/ # Password reset with OTP
β β β βββ create/ # Create post with media
β β β βββ confess/ # Anonymous confession
β β β βββ confessions/ # Confessions feed
β β β βββ post/[id]/ # Single post view
β β β βββ profile/ # User profile & stats
β β β βββ settings/ # Account settings
β β β βββ about/ # About & guidelines
β β β
β β βββ components/
β β β βββ ui/ # Shadcn components
β β β βββ Navbar.jsx # Navigation bar
β β β βββ Sidebar.jsx # Side navigation
β β β βββ Leaderboard.jsx # Top users
β β β βββ ConfessionCard.jsx # Post card component
β β β βββ Footer.jsx # Footer component
β β β βββ VisitorCounter.jsx # Analytics
β β β
β β βββ contexts/
β β β βββ AuthContext.js # Authentication state
β β β βββ SearchContext.js # Search state
β β β
β β βββ lib/
β β βββ api.js # API client
β β βββ utils.js # Utility functions
β β
β βββ public/ # Static assets
β
βββ server/ # Backend (Node.js)
β βββ server.js # Express app entry
β β
β βββ config/
β β βββ cloudinary.js # Cloudinary configuration
β β
β βββ controllers/
β β βββ authController.js # Auth logic (OTP, JWT)
β β βββ postController.js # Post CRUD operations
β β βββ confessionController.js # AI moderation logic
β β
β βββ middleware/
β β βββ authMiddleware.js # JWT verification
β β
β βββ models/
β β βββ User.js # User schema
β β βββ Post.js # Post schema
β β
β βββ routes/
β β βββ authRoutes.js # Auth endpoints
β β βββ postRoutes.js # Post endpoints
β β βββ confessionRoutes.js # Confession endpoints
β β
β βββ utils/
β βββ aliasGenerator.js # Anonymous name generator
β βββ emailService.js # OTP email sender
β
βββ README.md
ZeroVerse uses Google Gemini 3 Flash AI to automatically moderate all confessions before they go live.
- User submits confession β AI analysis triggered
- Gemini AI analyzes content for:
- Hate speech & discrimination
- Explicit content
- Harassment & bullying
- Violence & threats
- Context & intent
- Classification:
π’ GREEN β Auto-approve & publish π‘ YELLOW β Queue for manual review π΄ RED β Auto-reject with feedback
π’ GREEN Examples:
- "I finally aced my data structures exam!"
- "Anyone else think the hostel food is getting better?"
- "Shoutout to the library staff for being awesome"
π‘ YELLOW Examples:
- "The new attendance policy is ridiculous"
- "Why do some professors have favorites?"
- "Controversial opinion: [borderline topic]"
π΄ RED Examples:
- Any content containing hate speech
- Explicit sexual content
- Personal attacks or doxxing
- Threats or violence
- β‘ Instant moderation - No waiting for manual approval
- π‘οΈ 24/7 protection - AI never sleeps
- π― Accuracy - Context-aware decisions
- π Scalable - Handles unlimited submissions
- Node.js 18+ and npm
- MongoDB (local or Atlas)
- Cloudinary account
- Gmail account (for OTP emails)
- Google AI Studio API key (Gemini)
- Clone the repository
git clone https://github.com/yourusername/zeroverse.git
cd zeroverse- Install dependencies
For the client:
cd client
npm installFor the server:
cd server
npm install-
Set up environment variables (see next section)
-
Start MongoDB
# If using local MongoDB
mongod- Run the development servers
Terminal 1 (Backend):
cd server
npm startTerminal 2 (Frontend):
cd client
npm run dev- Access the application
- Frontend: http://localhost:3000
- Backend API: http://localhost:5000
Create client/.env.local:
NEXT_PUBLIC_API_URL=http://localhost:5000Create server/.env:
# MongoDB
MONGODB_URI=mongodb://localhost:27017/zeroverse
# or MongoDB Atlas:
# MONGODB_URI=mongodb+srv://username:password@cluster.mongodb.net/zeroverse
# JWT Secret
JWT_SECRET=your-super-secret-jwt-key-change-this-in-production
# Email Service (Nodemailer with Gmail)
EMAIL_USER=your-email@gmail.com
EMAIL_PASS=your-app-specific-password
# Get app password: https://myaccount.google.com/apppasswords
# Cloudinary
CLOUDINARY_CLOUD_NAME=your-cloud-name
CLOUDINARY_API_KEY=your-api-key
CLOUDINARY_API_SECRET=your-api-secret
# Get from: https://cloudinary.com/console
# Google Gemini AI
GEMINI_API_KEY=your-gemini-api-key
# Get from: https://aistudio.google.com/app/apikey
# Server
PORT=5000
NODE_ENV=development
# College Email Domain (for validation)
ALLOWED_EMAIL_DOMAIN=@nith.ac.inCloudinary:
- Sign up at https://cloudinary.com
- Go to Dashboard β API Keys
- Copy Cloud Name, API Key, and API Secret
Gmail App Password:
- Enable 2-Step Verification on your Google account
- Go to https://myaccount.google.com/apppasswords
- Generate an app password for "Mail"
- Use this password (not your regular password)
Google Gemini AI:
- Visit https://aistudio.google.com/app/apikey
- Create a new API key
- Copy the key to your .env file
POST /api/auth/signup # Register with email
POST /api/auth/verify-otp # Verify OTP code
POST /api/auth/login # Login
POST /api/auth/forgot-password # Request password reset OTP
POST /api/auth/reset-password # Reset password with OTP
GET /api/auth/me # Get current user
PUT /api/auth/update-profile # Update profile
GET /api/posts # Get all posts (with pagination)
GET /api/posts/:id # Get single post
POST /api/posts # Create post (with media)
PUT /api/posts/:id # Update post
DELETE /api/posts/:id # Delete post
POST /api/posts/:id/like # Like post
POST /api/posts/:id/comment # Comment on post
GET /api/posts/category/:category # Get posts by category
GET /api/posts/search # Search posts
POST /api/confessions # Submit confession (AI moderation)
GET /api/confessions/pending # Get pending confessions (admin)
PUT /api/confessions/:id/approve # Approve confession (admin)
PUT /api/confessions/:id/reject # Reject confession (admin)
GET /api/leaderboard # Get top users
- Bcrypt Password Hashing: Passwords hashed with 10 salt rounds
- JWT Tokens: 30-day expiration with secure signing
- OTP Verification: 10-minute expiry, one-time use
- Email Validation: College email domain restriction
- Rate Limiting: Prevents brute force attacks
- MongoDB Sanitization: Prevents NoSQL injection
- CORS Configuration: Restricted origins in production
- Helmet.js: Security headers (recommended)
- Input Validation: Server-side validation for all inputs
- Anonymous Posting: No personal info in posts
- Alias System: Random generated names
- No IP Tracking: Users remain anonymous
- Secure File Upload: Cloudinary handles media securely
The OTP system ensures only verified college students can join:
- User enters college email
- 6-digit OTP generated and sent via Nodemailer
- OTP stored in database with 10-minute expiry
- User verifies OTP within time limit
- Account activated, JWT token issued
Email Template: Professional HTML emails with OTP code
Media uploads are seamlessly handled:
- User selects image/video
- Multer processes upload
- File sent to Cloudinary
- Cloudinary returns optimized URL
- URL stored in MongoDB
- CDN delivers media globally
Benefits: Fast loading, automatic optimization, unlimited storage
Every confession goes through:
- Text submitted to Gemini AI API
- AI analyzes sentiment, intent, and content
- Returns classification: GREEN/YELLOW/RED
- Backend processes based on classification
- User receives instant feedback
Response Time: <2 seconds average
{
name: String,
email: String (unique, college domain only),
password: String (hashed),
otp: String,
otpExpiry: Date,
isVerified: Boolean,
alias: String (auto-generated),
posts: [ObjectId],
createdAt: Date,
updatedAt: Date
}{
title: String,
content: String,
category: Enum [General, Hostel, Exams, Gossip, Placements, Confessions],
author: ObjectId (User),
authorAlias: String,
media: {
url: String (Cloudinary URL),
type: Enum [image, video]
},
likes: [ObjectId],
dislikes: [ObjectId],
comments: [{
user: ObjectId,
text: String,
createdAt: Date
}],
isConfession: Boolean,
moderationStatus: Enum [pending, approved, rejected],
aiClassification: Enum [green, yellow, red],
createdAt: Date,
updatedAt: Date
}We welcome contributions! Here's how you can help:
- Fork the repository
- Create a feature branch
git checkout -b feature/AmazingFeature
- Commit your changes
git commit -m 'Add some AmazingFeature' - Push to the branch
git push origin feature/AmazingFeature
- Open a Pull Request
- Follow existing code style
- Write meaningful commit messages
- Test your changes thoroughly
- Update documentation as needed
OTP emails not sending:
- Verify Gmail app password is correct
- Check 2-step verification is enabled
- Ensure EMAIL_USER and EMAIL_PASS are set
Cloudinary uploads failing:
- Verify API credentials
- Check file size limits
- Ensure Cloudinary account is active
AI moderation not working:
- Verify GEMINI_API_KEY is valid
- Check API quota limits
- Ensure network connectivity
MongoDB connection errors:
- Check MongoDB is running
- Verify MONGODB_URI format
- Check network/firewall settings
This project is licensed under the MIT License - see the LICENSE file for details.
- Abhinav Rajput - LinkedIn
- Google Gemini AI for content moderation
- Cloudinary for media management
- The open-source community
- All contributors and users
For questions or support, reach out:
- Email: abh1nav.rj02@gmail.com
- GitHub Issues: Create an issue
Star β this repo if you find it useful!