Skip to content

user-synax/campusX

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

470 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Banner

Next.js React MongoDB Pusher Tailwind Vercel

The social platform built exclusively for Indian college students

GitHub stars GitHub forks License Contributors


✨ Why CampusZen?

Not LinkedIn. Not Instagram. Not WhatsApp groups.
A dedicated space where students connect, share, and grow — verified college identity only.

Every Indian college student lives across 5 different platforms — WhatsApp for updates, Instagram for photos, LinkedIn for fake achievements, Telegram for notes, and Google Forms for events. None of them are built for students.

CampusZen is a student-only social network where you need a verified college email to join. Real identity. Real campus community. No recruiters, no ads, no noise — just your college, your people, and your content.

🎯 Target 📍 Focus 👨‍💻 Built By
40M+ Indian Students IGNOU & DTU Solo Developer (Ayush)

🚀 Core Features

Verified Identity Smart Feed Real-time Chat
College Email + OTP ✅ AI-ranked posts 📊 Pusher-powered 💬
Admin Panel PWA Ready Dark Theme
Full moderation tools 🛡️ Install on mobile 📱 #0f0f0f optimized 🌙

🎓 Student Verification

College Email → OTP Sent → Verified Badge ✓

Only real students get in. No fake accounts, no outsiders. Verified badge shows on every post and profile.


📰 Smart Feed Algorithm

Posts are ranked by a weighted score — not just chronological order:

Feed Score = (Likes × 1.5) + (Comments × 2) + (Views × 0.5)
           + Recency Boost + Connection Boost

Students see relevant content from their college first, trending content second.


💬 Real-time Features

  • Live notifications — instant alerts for likes, comments, follows
  • Notification sound — toggle on/off
  • Trending sidebar — top posts updating live
  • View counts — see how many students viewed your post

🛡️ Admin Moderation Panel

Full admin dashboard to manage content, users, and reports — keeping the campus feed clean and safe.


🔥 What's Live

Feature Status
Student email verification + OTP
Verified badge on profiles
JWT auth with HTTP-only cookies
Post feed with image upload
Like, comment, share on posts
View count per post
Smart feed algorithm
Real-time notifications (Pusher)
Notification sound toggle
Trending posts sidebar
Community rooms
User profiles + account settings
3-dot post menu (edit/delete/report)
Admin moderation panel
Forgot password flow
PWA (installable on Android)
SEO optimized pages
Mobile responsive
Dark theme (#0f0f0f)

🛠️ Tech Stack

graph LR
    A[Next.js 16] --> B[App Router]
    A --> C[API Routes]
    B --> D[React 19]
    C --> E[MongoDB Atlas]
    C --> F[Pusher]
    C --> G[UploadThing]
Loading
Layer Technology Badge
⚡ Framework Next.js 16 App Router Next.js
⚛️ UI Library React 19 React
🗄️ Database MongoDB + Mongoose MongoDB
🔐 Authentication Better Auth + JWT Auth
⚡ Real-time Pusher Channels Pusher
📦 File Upload UploadThing UploadThing
🎨 Styling Tailwind CSS 4 Tailwind
✨ Animations Framer Motion + GSAP Framer
🎯 Components shadcn/ui + Radix shadcn
☁️ Deployment Vercel Vercel

📁 Project Structure

campusx/
├── app/
│   ├── (auth)/
│   │   ├── login/
│   │   ├── register/
│   │   └── verify/          # OTP verification
│   ├── (main)/
│   │   ├── feed/            # Smart algorithm feed
│   │   ├── communities/     # Community rooms
│   │   ├── notifications/   # Real-time notifications
│   │   └── profile/[id]/    # User profiles
│   ├── admin/               # Moderation panel
│   └── api/                 # All API routes
├── components/
│   ├── ui/                  # shadcn components
│   ├── feed/                # Feed specific components
│   ├── post/                # Post card, actions
│   └── shared/              # Navbar, sidebar, etc.
├── lib/
│   ├── db.js                # MongoDB connection
│   ├── auth.js              # JWT helpers
│   └── utils.js
└── models/                  # Mongoose schemas
    ├── User.js
    ├── Post.js
    ├── Community.js
    └── Notification.js

🚦 Getting Started

Prerequisites

  • Node.js 18+
  • MongoDB Atlas account (free tier)
  • Pusher account (free tier)
  • UploadThing account (free tier)

Setup

# Clone the repo
git clone https://github.com/ayush0x00/campusx.git
cd campusx

# Install dependencies
npm install

# Create environment file
cp .env.example .env.local

Environment Variables

# MongoDB
MONGODB_URI=mongodb+srv://...

# JWT
JWT_SECRET=your_super_secret_key

# Pusher
PUSHER_APP_ID=
PUSHER_KEY=
PUSHER_SECRET=
PUSHER_CLUSTER=
NEXT_PUBLIC_PUSHER_KEY=
NEXT_PUBLIC_PUSHER_CLUSTER=

# UploadThing
UPLOADTHING_SECRET=
UPLOADTHING_APP_ID=

# App
NEXT_PUBLIC_APP_URL=http://localhost:3000
# Start development server
npm run dev

Open http://localhost:3000


🔒 Security

CampusX is built with security as a first principle:

  • HTTP-only cookies — JWT tokens never accessible via JavaScript
  • College email verification — OTP-based, blocks fake signups
  • Rate limiting on auth routes — prevents brute force
  • Input sanitization on all API routes
  • Admin-only routes protected by role middleware
  • No sensitive data in client — all secrets server-side only

🗺️ The Problem We're Solving

Indian college students have no dedicated digital home:

  • WhatsApp groups — chaotic, no content discovery, admin-controlled
  • Instagram — algorithm hides college content, not student-specific
  • LinkedIn — professional pressure, no casual peer connection
  • Telegram — anonymous, unsafe, no verified identity

CampusX gives students a verified, safe, college-first social space.

Target market: 40 million+ college students in India.
Initial focus: IGNOU (4M students) and DTU, Delhi.


📋 Roadmap

  • College-specific sub-feeds
  • Anonymous confession board (verified but anonymous posts)
  • Study group finder
  • Campus events calendar
  • Internship/placement board (student-to-student, not corporate)
  • Notes and resource sharing
  • Push notifications (Web Push API)
  • iOS PWA improvements
  • Multi-college expansion

🌐 Deployment

Live on dual deployment for maximum reliability:

Platform URL Status
Vercel (Primary) campus-x-rho.vercel.app
Netlify (Backup) campus-x-rho.netlify.app

Both deployments pull from the same GitHub repo — if one goes down, the other handles traffic.


🤝 Contributing

CampusX is in active development. If you're a student or developer who wants to contribute:

  1. Fork the repo
  2. Create a branch: git checkout -b feature/your-feature
  3. Commit: git commit -m "add your feature"
  4. Push: git push origin feature/your-feature
  5. Open a Pull Request

📜 License

MIT License — see LICENSE for details.


Built for every student who ever felt lost in college

Made with ❤️ in Delhi, India 🇮🇳

Built by Ayush — self-taught full stack developer. Every line of code, every design decision — solo.

About

An open-source student social network with college communities, anonymous posting, follows, and real-time feeds. Stack: Next.js 15 · MongoDB · shadcn/ui · JWT

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors