CampusZen is a student-focused social platform for Indian colleges. The app combines verified sign-in, campus communities, posts, clips, chats, resources, events, notifications, and admin moderation in one Next.js application.
- Verified student accounts: college email auto-verify (
@iitb.ac.in→ instant) + ID-card review queue (/admin/verifications), JWT HTTP-only cookies, Google OTP. - Verified-boosted feed:
FEED_WEIGHTS.verified8 points +?verifiedOnly=truefilter (app/api/posts/cursor-feed). - College communities: verified member counts, verified ratio bar, college-gated discovery (
/community/[college]+VerifiedCommunityHeader). - Study Rooms (new): college-gated LiveKit rooms (
/study-rooms),requiresVerifieddefault,max 50, realtime via Socket.IO (CHAT_BACKEND_URL). - Real-time DMs + group chats with typing/read, LiveKit voice, notification bell with push (
/api/notifications+emitToUser). - Admin queue + user management with ban/verify/pro actions.
- Email/password login and signup
- Google OAuth sign-in
- OTP verification and password reset flows
- Student verification via dedicated verification pages and admin review paths
- Secure session handling with HTTP-only cookies and JWT-based auth helpers
- Smart cursor-based feed with ranking heuristics
- Post creation with rich media support
- Post detail pages with comments, reactions, sharing, and reporting
- Hashtag pages and trending endpoints
- Bookmarks and post saving
- Clips for short-form content
- Community pages for college-specific discovery
- Direct messages + group chats (Socket.IO
CHAT_BACKEND_URL, not Pusher) - Study Rooms — college-gated LiveKit voice (
/study-rooms) - Typing indicators and read receipts
- Realtime updates via
lib/realtime.js→emitToUser/emitToGroup - Notification bell and push (
Web Push+emitRealtime)
- College communities with verified counts (
VerifiedCommunityHeader) - Community join + post count tracking
- Study Rooms discovery by college/topic
- User profiles with avatar, banner, follow counts, and activity views
- Follow and follower management
- Settings, customization, billing, and account deletion flows
- Login history and security-related account controls
- Search for posts, users, and trending content
- Leaderboard views
- Analytics dashboards for platform usage and moderation activity
- Founder-specific broadcasts and roadmap utilities
- Admin dashboard for users, verifications, content, resources, DMs, promo codes, logs, and security
- Blocked content review and reported content review
- User bans, IP bans, suspicious activity review, and moderation actions
- Rate limiting and sanitization utilities
- Push subscription management and web push support
- Role-based access control helpers
CampusZen also includes a public tools section with utilities such as:
- Text tools like case conversion, slug generation, whitespace cleanup, reading time, delimiters, and compression
- SEO tools like meta tag generation, broken-link checking, social share previews, and alt-text checks
- Color tools like picker, contrast, gradient, blindness simulation, and relationship checks
- Developer tools like UUID, ULID, QR, JWT, hash, regex, query conversion, HTML preview, PHP serialization, and more
How to Earn XP : Users gain XP for:
- Creating posts: +20 XP
- Following users: +10 XP
- Liking content: +5 XP
- Commenting: +10 XP
- Daily login: +50 XP
- RSVPing to events: +15 XP
- Uploading resources: +30 XP
| Layer | Technology |
|---|---|
| Framework | Next.js 16 App Router |
| UI | React 19 |
| Styling | Tailwind CSS 4, shadcn/ui, Radix UI |
| Database | MongoDB + Mongoose |
| Realtime | Pusher Channels |
| Cache and rate limiting | Redis / Upstash |
| File uploads | Appwrite Storage |
| Auth | Better Auth, JWT, bcryptjs, jose |
| Notifications | Web Push, Nodemailer |
| Motion and visuals | Framer Motion, GSAP, motion |
| Analytics | Vercel Analytics, Speed Insights |
app/
(auth)/ Authentication flows
(main)/ Main product surfaces
(public)/ Public legal and marketing pages
api/ Route handlers and backend endpoints
components/
admin/ Admin console UI
auth/ Authentication UI
chat/ DM and group chat UI
feed/ Feed utilities and widgets
landing/ Homepage sections
notifications/ Notification UI
post/ Post composer and post actions
resources/ Resource cards and uploads
shared/ Shared primitives and helpers
tools/ Public tools layouts
hooks/ Reusable client hooks
lib/ Auth, db, realtime, moderation, caching, and utilities
models/ Mongoose models
/public landing page/login,/signup,/verify-student/feed,/community,/chats,/notifications,/search/events,/resources,/clips,/bookmarks,/leaderboard/settings,/billing,/customize,/analytics/admin,/admin/resources/toolsand the nested public utility pages
- Node.js 18 or newer
- MongoDB Atlas or another MongoDB instance
- Pusher account
- Redis / Upstash for cache and rate limiting features
git clone https://github.com/user-synax/campusX.git
cd campusx
npm installMONGODB_URI
JWT_SECRET
JWT_EXPIRES_IN
NEXT_PUBLIC_APP_URL
NEXT_PUBLIC_FOUNDER_USERNAME
NEXT_PUBLIC_APP_LAUNCH_DATE
CLOUDINARY_CLOUD_NAME
CLOUDINARY_API_KEY
CLOUDINARY_API_SECRET
EMAIL_HOST
EMAIL_PORT
GMAIL_USER
GMAIL_APP_PASS
ADMIN_NOTIFY_EMAIL
NEXT_PUBLIC_PUSHER_KEY
NEXT_PUBLIC_PUSHER_CLUSTER
PUSHER_APP_ID
PUSHER_SECRET
LIVEKIT_API_KEY
LIVEKIT_API_SECRET
NEXT_PUBLIC_LIVEKIT_URL
NEXT_PUBLIC_VAPID_PUBLIC_KEY
VAPID_PRIVATE_KEY
VAPID_SUBJECT
NEXT_PUBLIC_YT_API_KEY
NEXT_PUBLIC_TLDRAW_LICENSE
NEXT_PUBLIC_GIPHY_API_KEY
NEXT_PUBLIC_APK_DOWNLOAD_URL
NEXT_PUBLIC_CONTACT_DEVELOPER_URL
NEXT_PUBLIC_ADMIN_EMAIL
GOOGLE_CLIENT_ID
GOOGLE_CLIENT_SECRET
GOOGLE_REDIRECT_URI
OPENROUTER_API_KEY
CRON_SECRET
APPWRITE_ENDPOINT
NEXT_PUBLIC_APPWRITE_ENDPOINT
APPWRITE_PROJECT_ID
NEXT_PUBLIC_APPWRITE_PROJECT_ID
APPWRITE_API_KEY
NEXT_PUBLIC_APPWRITE_CLIPS_BUCKET_ID
APPWRITE_DATABASE_ID
NEXT_PUBLIC_APPWRITE_DATABASE_ID
NEXT_PUBLIC_APPWRITE_USER_MEDIA_BUCKET_ID
NEXT_PUBLIC_APPWRITE_RESOURCES_BUCKET_IDDepending on the features you enable, you may also need the Redis, Cloudinary, Web Push, Google OAuth, and email-related values used by the corresponding libraries in lib/.
npm run devOpen http://localhost:3000.
npm run dev- start the development servernpm run build- build for productionnpm run start- start the production servernpm run lint- run the linternpm run test- run the Jest test suitenpm run seed- seed the databasenpm run seed:global-group- seed the global chat group
- HTTP-only cookies are used for session safety.
- Input sanitization and route-level guards are used across the API surface.
- Rate limiting and IP banning are implemented for abusive behavior.
- Admin routes are protected through role-based access checks.
- Sensitive integrations are handled server-side.
MIT License. See LICENSE for details.