Nexus is a comprehensive social networking platform designed specifically for students and alumni of KIIT University. It provides a secure, feature-rich environment for networking, messaging, professional development, mentorship, and community building.
- Registration document-based registration (submit document URLs)
- JWT-based Authentication with domain-specific email validation (@kiit.ac.in)
- Role-based Access Control (Student, Alumni, Administrator)
- Secure Password Hashing using bcrypt
- Profile Management with skills, interests, location, and bio
- File Upload System with Google Drive integration
- Connection System - Send, accept, reject, and manage connection requests
- User Search & Discovery with advanced filtering
- Connection Suggestions based on mutual connections and interests
- Professional Networking tools for career development
- WebSocket-based Messaging with Socket.IO
- Real-time Chat with typing indicators
- Message Notifications with browser notifications
- Unread Message Tracking with visual indicators
- Message History with pagination
- Post System with likes, comments, and voting
- Sub-communities for specialized groups
- Event Management and RSVP system
- Showcase/Portfolio system for projects and achievements
- File Sharing and collaboration tools
- Mentorship System with mentor-mentee matching
- Mentorship Applications and request management
- Goal Setting and progress tracking
- Meeting Scheduling and management
- Feedback System for mentorship quality
- Badge System for achievements
- Points and Rewards for platform engagement
- Leaderboards and ranking system
- Engagement Tracking and analytics
- Email Notifications via SendGrid
- In-app Notifications system
- Real-time Updates for all platform activities
- Notification Preferences and settings
- NestJS - Progressive Node.js framework with TypeScript
- Prisma - Next-generation ORM with PostgreSQL
- PostgreSQL - Robust relational database
- Socket.IO - Real-time bidirectional communication
- JWT - Secure token-based authentication
- Bcrypt - Password hashing
- SendGrid - Email service integration
- SendGrid - Email service integration
- Google APIs - Google Drive integration
- Multer - File upload handling
- Swagger - API documentation
- React 18 - Modern UI library with hooks
- TypeScript - Type-safe JavaScript
- Material-UI (MUI) - React component library
- Tailwind-CSS - CSS Framework
- Framer Motion - Animation library
- React Router - Client-side routing
- Axios - HTTP client for API calls
- Socket.IO Client - Real-time communication
- Vite - Fast build tool and dev server
- Date-fns - Date utility library
- JWT Decode - JWT token handling
- ESLint - Code linting and quality
- Prettier - Code formatting
- Jest - Testing framework
- Husky - Git hooks
- Commitlint - Commit message linting
- Node.js (v16 or higher)
- npm or yarn
- PostgreSQL (v12 or higher)
- Git
git clone https://github.com/techySPHINX/Nexus.git
cd Nexus# Install backend dependencies
cd backend
npm install
# Install frontend dependencies
cd ../frontend
npm installCreate environment files for both backend and frontend:
# Backend environment
cd backend
cp .env.example .envConfigure backend/.env:
# Database Configuration
DATABASE_URL="postgresql://username:password@localhost:5432/nexus_db"
# JWT Configuration
JWT_SECRET="your-super-secret-and-long-string-here"
JWT_EXPIRES_IN="7d"
# Application Configuration
PORT=3000
NODE_ENV=development
# Email Configuration (SendGrid)
SENDGRID_API_KEY="SG.your-sendgrid-api-key"
SENDGRID_FROM_EMAIL="noreply@nexus.kiit.ac.in"
# Google Drive Configuration
GOOGLE_DRIVE_CLIENT_ID="your-google-client-id"
GOOGLE_DRIVE_CLIENT_SECRET="your-google-client-secret"
GOOGLE_DRIVE_REDIRECT_URI="http://localhost:3000/auth/google/callback"# Create PostgreSQL database
createdb nexus_db
# Run Prisma migrations
cd backend
npx prisma migrate dev --name init
# Generate Prisma client
npx prisma generate
# Seed the database (optional)
npm run seed# Start backend server (Terminal 1)
cd backend
npm run start:dev
# Start frontend application (Terminal 2)
cd frontend
npm run devThe application will be available at:
- Frontend: http://localhost:3002
- Backend API: http://localhost:3000
- API Documentation: http://localhost:3000/api
Nexus/
βββ backend/ # NestJS Backend
β βββ src/
β β βββ auth/ # Authentication module
β β β βββ auth.controller.ts # Auth endpoints
β β β βββ auth.service.ts # Auth business logic
β β β βββ guards/ # JWT guards
β β β βββ strategies/ # Passport strategies
β β β βββ dto/ # Auth DTOs
β β βββ user/ # User management
β β βββ connection/ # Connection system
β β βββ messaging/ # Real-time messaging
β β β βββ messaging.controller.ts
β β β βββ messaging.service.ts
β β β βββ messaging.gateway.improved.ts # WebSocket gateway
β β βββ post/ # Post system
β β βββ sub-community/ # Sub-community management
β β βββ mentorship/ # Mentorship system
β β βββ showcase/ # Project showcase
β β βββ gamification/ # Badges and points
β β βββ notification/ # Notification system
β β βββ email/ # Email service
β β βββ admin/ # Admin controllers (document verification)
β β βββ test/ # Test utilities and scripts
β β βββ files/ # File upload/management
β β βββ events/ # Event management
β β βββ engagement/ # Engagement tracking
β β βββ referral/ # Referral system
β β βββ prisma/ # Prisma service
β β βββ common/ # Shared utilities
β βββ prisma/
β β βββ schema.prisma # Database schema
β βββ data/ # Seed scripts
β βββ uploads/ # Uploaded files
βββ frontend/ # React Frontend
β βββ src/
β β βββ components/ # Reusable components
β β β βββ ChatBox.tsx # Chat interface
β β β βββ MessageList.tsx # Message display
β β β βββ MessageInput.tsx # Message input
β β β βββ Navbar.tsx # Navigation
β β βββ pages/ # Page components
β β β βββ Dashboard.tsx # Main dashboard
β β β βββ Admin/ # Admin pages (document verification)
β β β βββ ChatPage.tsx # Chat page
β β β βββ Connections.tsx # Connections page
β β β βββ Profile.tsx # User profile
β β β βββ Posts/ # Post-related pages
β β βββ contexts/ # React contexts
β β β βββ AuthContext.tsx # Authentication
β β β βββ ThemeContext.tsx # Theme management
β β β βββ NotificationContext.tsx
β β βββ hooks/ # Custom hooks
β β β βββ useConnections.ts # Connections logic
β β βββ services/ # API services
β β β βββ api.ts # Axios configuration
β β β βββ websocket.improved.ts # WebSocket service
β β βββ types/ # TypeScript types
β β βββ utils/ # Utility functions
β β βββ App.tsx # Main app component
β βββ public/ # Static assets
βββ README.md # This file
- Prettier - Consistent code formatting
- ESLint - Code quality and style enforcement
- Husky - Git hooks for pre-commit checks
- lint-staged - Run linters on staged files
- Commitlint - Conventional commit message enforcement
# Create feature branch
git checkout -b feature/your-feature-name
# Make changes and commit
git add .
git commit -m "feat: add new feature"
# Push and create PR
git push origin feature/your-feature-nameFollow Conventional Commits:
feat:- New featuresfix:- Bug fixesdocs:- Documentation changesstyle:- Code style changesrefactor:- Code refactoringtest:- Test additions/changeschore:- Build/tooling changes
# Backend tests
cd backend
npm run test # Unit tests
npm run test:e2e # End-to-end tests
npm run test:cov # Coverage report
# Frontend tests
cd frontend
npm run test # Run tests
npm run test:coverage # Coverage reportThe API is documented using Swagger/OpenAPI. Access the interactive documentation at:
- Development: http://localhost:3000/api
- Production: https://your-domain.com/api
POST /auth/login- User loginPOST /auth/register- User registrationPOST /auth/refresh- Refresh JWT token
GET /users- Get all users (paginated)GET /users/:id- Get user by IDPUT /users/:id- Update user profileGET /users/search- Search users
GET /connection- Get user connectionsPOST /connection/send- Send connection requestPATCH /connection/status- Accept/reject connectionGET /connection/suggestions- Get connection suggestions
GET /messages/conversations/all- Get all conversationsGET /messages/conversation/:userId- Get conversation with userPOST /messages- Send messageWebSocket /ws- Real-time messaging
- JWT Authentication with secure token handling
- Password Hashing using bcrypt with salt rounds
- Domain Validation restricting emails to @kiit.ac.in
- CORS Protection with configurable origins
- Input Validation using class-validator DTOs
- Role-based Access Control with guards and decorators
- SQL Injection Prevention via Prisma ORM
- XSS Protection with proper input sanitization
# Build for production
cd backend
npm run build
# Start production server
npm run start:prod# Build for production
cd frontend
npm run build
# Serve static files
npm run previewEnsure all environment variables are properly configured for production:
- Database connection strings
- JWT secrets
- Email service credentials
- Google API credentials
- CORS origins
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'feat: add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow TypeScript best practices
- Write meaningful commit messages
- Add tests for new features
- Update documentation as needed
- Follow the existing code style
This project is licensed under the UNLICENSED license - see the LICENSE file for details.
- Documentation: Check this README and inline code comments
- Issues: Open an issue on GitHub for bugs or feature requests
- Discussions: Use GitHub Discussions for questions and ideas
- KIIT University for providing the platform requirements
- All contributors who have helped build this platform
- Open source libraries and frameworks used in this project
Built with β€οΈ for the KIIT Community