Skip to content

muhammadnavas/LinkUp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

47 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ LinkUp - Coding Challenge Platform

LinkUp is a comprehensive platform that connects talented students with innovative companies through coding challenges. Students can showcase their programming skills and earn recognition, while companies can discover and recruit top talent through structured technical assessments.

✨ Features Overview

πŸ‘¨β€πŸŽ“ For Students

  • πŸ” Browse Challenges - Explore coding challenges from top companies across various difficulty levels
  • πŸ’» Submit Solutions - Submit code solutions via GitHub repositories with automated tracking
  • πŸ† Earn Points & Recognition - Get scored by company reviewers and earn points for achievements
  • πŸ“Š Performance Analytics - Monitor your progress with detailed statistics and performance metrics
  • πŸ₯‡ Competitive Leaderboard - Compete with peers globally and climb the rankings
  • πŸ‘€ Professional Profile - Showcase your skills, achievements, and coding portfolio
  • πŸ“± Social Sharing - Share challenges and achievements on social media platforms
  • 🎯 Challenge Filtering - Filter challenges by difficulty, company, or technology stack

🏒 For Companies

  • βž• Create Custom Challenges - Design coding challenges tailored to your hiring needs
  • πŸ‘€ Review & Score Submissions - Evaluate student solutions with detailed feedback system
  • πŸ“ˆ Advanced Analytics Dashboard - Track challenge performance, engagement metrics, and candidate quality
  • πŸ” Talent Discovery - Find and filter skilled developers based on performance and skills
  • πŸ“ Challenge Management - Edit, update, or deactivate challenges with version control
  • πŸ“Š Submission Analytics - View submission statistics and candidate funnel metrics
  • 🎯 Targeted Recruitment - Identify top performers for direct recruitment opportunities

🌐 Public Features

  • πŸ”— Public Challenge Sharing - Anyone can view challenge details via shareable links
  • πŸ“Š Public Leaderboards - View top performers without registration
  • πŸ“ˆ Platform Statistics - Access platform-wide metrics and activity data
  • πŸ’‘ No-Registration Preview - Explore challenges before creating an account

πŸ› οΈ Technology Stack

Frontend Technologies

Technology Version Purpose
React 19.1.1 Modern UI library for building interactive interfaces
React Router DOM 7.8.2 Client-side routing and navigation
Tailwind CSS 3.4.18 Utility-first CSS framework for rapid styling
Framer Motion 12.23.12 Advanced animations and micro-interactions
Axios 1.11.0 HTTP client for API communication
Lucide React 0.542.0 Beautiful and consistent icon library
Heroicons 2.2.0 Additional icon set for UI elements

Backend Technologies

Technology Version Purpose
Node.js Latest LTS JavaScript runtime environment
Express.js 4.21.2 Fast and minimal web application framework
MongoDB Latest NoSQL database for flexible data storage
Mongoose 8.18.0 MongoDB ODM for data modeling
JWT 9.0.2 Secure authentication and authorization
bcryptjs 3.0.2 Password hashing and security
Express Rate Limit 8.0.1 API rate limiting and DDoS protection
Express Validator 7.2.1 Input validation and sanitization
Helmet 8.1.0 Security middleware for Express
Nodemailer 7.0.5 Email service integration
UUID 11.1.0 Unique identifier generation

Development & Testing

Technology Purpose
Jest Unit and integration testing
React Testing Library React component testing
ESLint Code linting and quality enforcement
PostCSS CSS processing and optimization

πŸ“‹ Prerequisites

Before setting up LinkUp, ensure you have:

  • Node.js (v18.0.0 or higher) - Download here
  • npm (v8.0.0 or higher) or yarn (v1.22.0 or higher)
  • MongoDB (v5.0 or higher) - Local installation or MongoDB Atlas account
  • Git (v2.0 or higher) - Download here
  • GitHub Account - For repository hosting and collaboration

πŸš€ Quick Start Guide

1. Repository Setup

# Clone the repository
git clone https://github.com/muhammadnavas/UpLink.git
cd LinkUp

# Verify Node.js installation
node --version
npm --version

2. Backend Configuration

# Navigate to backend directory
cd backend

# Install all dependencies
npm install

# Create environment file
touch .env

Configure your .env file:

# ==============================================
# SERVER CONFIGURATION
# ==============================================
PORT=5000
NODE_ENV=development

# ==============================================
# DATABASE CONFIGURATION
# ==============================================
# Local MongoDB
MONGODB_URI=mongodb://localhost:27017/linkup

# Or MongoDB Atlas (recommended for production)
# MONGODB_URI=mongodb+srv://<username>:<password>@cluster0.xxxxx.mongodb.net/linkup?retryWrites=true&w=majority

# ==============================================
# AUTHENTICATION & SECURITY
# ==============================================
JWT_SECRET=your_super_secure_jwt_secret_key_here_make_it_long_and_random
JWT_EXPIRE=30d

# ==============================================
# CORS CONFIGURATION
# ==============================================
FRONTEND_URL=http://localhost:3000

# ==============================================
# EMAIL CONFIGURATION (Optional)
# ==============================================
EMAIL_HOST=smtp.gmail.com
EMAIL_PORT=587
EMAIL_SECURE=false
EMAIL_USER=your_email@gmail.com
EMAIL_PASS=your_email_app_password

# ==============================================
# RATE LIMITING
# ==============================================
RATE_LIMIT_WINDOW_MS=900000
RATE_LIMIT_MAX_REQUESTS=100

Start the backend server:

# Development mode with hot reload
npm run dev

# Or production mode
npm start

Backend will be available at: http://localhost:5000

3. Frontend Configuration

# Navigate to frontend directory (from project root)
cd ../frontend

# Install all dependencies
npm install

# Create environment file
touch .env

Configure your .env file:

# ==============================================
# API CONFIGURATION
# ==============================================
REACT_APP_API_URL=http://localhost:5000/api

# ==============================================
# APPLICATION CONFIGURATION
# ==============================================
REACT_APP_APP_NAME=LinkUp
REACT_APP_VERSION=1.0.0

# ==============================================
# FEATURE FLAGS (Optional)
# ==============================================
REACT_APP_ENABLE_ANALYTICS=false
REACT_APP_ENABLE_CHAT=false

Start the frontend development server:

# Start development server
npm start

# Build for production
npm run build

# Run tests
npm test

Frontend will be available at: http://localhost:3000

πŸ“ Detailed Project Architecture

LinkUp/
β”œβ”€β”€ πŸ“‚ backend/                     # Node.js/Express Backend
β”‚   β”œβ”€β”€ πŸ“‚ config/
β”‚   β”‚   └── πŸ“„ db.js               # MongoDB connection configuration
β”‚   β”œβ”€β”€ πŸ“‚ controllers/
β”‚   β”‚   β”œβ”€β”€ πŸ“„ authController.js   # Authentication business logic
β”‚   β”‚   β”œβ”€β”€ πŸ“„ leaderboardController.js # Leaderboard calculations
β”‚   β”‚   └── πŸ“„ submissions.js      # Submission handling logic
β”‚   β”œβ”€β”€ πŸ“‚ middleware/
β”‚   β”‚   └── πŸ“„ authMiddleware.js   # JWT verification & authorization
β”‚   β”œβ”€β”€ πŸ“‚ models/
β”‚   β”‚   β”œβ”€β”€ πŸ“„ Activity.js         # User activity tracking schema
β”‚   β”‚   β”œβ”€β”€ πŸ“„ Challenge.js        # Challenge data model
β”‚   β”‚   β”œβ”€β”€ πŸ“„ Submission.js       # Solution submission schema
β”‚   β”‚   └── πŸ“„ User.js             # User profile and authentication
β”‚   β”œβ”€β”€ πŸ“‚ routes/
β”‚   β”‚   β”œβ”€β”€ πŸ“„ admin.js            # Admin panel endpoints
β”‚   β”‚   β”œβ”€β”€ πŸ“„ auth.js             # Authentication routes
β”‚   β”‚   β”œβ”€β”€ πŸ“„ challenges.js       # Challenge CRUD operations
β”‚   β”‚   β”œβ”€β”€ πŸ“„ dashboard.js        # Dashboard data endpoints
β”‚   β”‚   β”œβ”€β”€ πŸ“„ leaderboard.js      # Ranking and statistics
β”‚   β”‚   β”œβ”€β”€ πŸ“„ public.js           # Public API endpoints
β”‚   β”‚   └── πŸ“„ submissions.js      # Submission management
β”‚   β”œβ”€β”€ πŸ“‚ scripts/
β”‚   β”‚   β”œβ”€β”€ πŸ“„ addLeaderboardFields.js
β”‚   β”‚   β”œβ”€β”€ πŸ“„ addUsernameField.js
β”‚   β”‚   β”œβ”€β”€ πŸ“„ cleanupCompanyPoints.js
β”‚   β”‚   └── πŸ“„ initializeLeaderboardFields.js
β”‚   β”œβ”€β”€ πŸ“‚ utils/
β”‚   β”‚   β”œβ”€β”€ πŸ“„ database.js         # Database utilities and helpers
β”‚   β”‚   β”œβ”€β”€ πŸ“„ emailService.js     # Email notification service
β”‚   β”‚   β”œβ”€β”€ πŸ“„ statsUpdater.js     # Statistics calculation utilities
β”‚   β”‚   └── πŸ“„ validators.js       # Input validation schemas
β”‚   β”œβ”€β”€ πŸ“„ .env                    # Environment variables
β”‚   β”œβ”€β”€ πŸ“„ .gitignore             # Git ignore rules
β”‚   β”œβ”€β”€ πŸ“„ package.json           # Dependencies and scripts
β”‚   └── πŸ“„ server.js              # Application entry point
β”‚
β”œβ”€β”€ πŸ“‚ frontend/                   # React Frontend Application
β”‚   β”œβ”€β”€ πŸ“‚ public/
β”‚   β”‚   β”œβ”€β”€ πŸ“„ index.html         # HTML template
β”‚   β”‚   β”œβ”€β”€ πŸ“„ manifest.json      # PWA configuration
β”‚   β”‚   └── πŸ“„ robots.txt         # SEO crawler instructions
β”‚   β”œβ”€β”€ πŸ“‚ src/
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ components/
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“„ AppRoutes.js   # Application routing logic
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“„ CompanyRoom.js # Company dashboard components
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“„ Header.js      # Navigation header component
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“„ LoadingSpinner.js # Loading UI component
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“„ LoginForm.js   # User authentication form
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“„ ProtectedRoute.js # Route protection wrapper
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“„ RegisterForm.js # User registration form
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“„ RoleSwitcher.js # Role selection component
β”‚   β”‚   β”‚   └── πŸ“„ StudentRoom.js # Student dashboard components
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ contexts/
β”‚   β”‚   β”‚   └── πŸ“„ AuthContext.js # Global authentication state
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ pages/
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“„ ChallengePage.js # Individual challenge view
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“„ ChallengesManagePage.js # Company challenge management
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“„ ChallengesPage.js # Challenge browsing interface
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“„ CompanyDashboard.js # Company analytics dashboard
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“„ CompanySubmissionsPage.js # Submission review interface
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“„ CreateChallengePage.js # Challenge creation form
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“„ Dashboard.js    # Main dashboard router
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“„ EditChallengePage.js # Challenge editing interface
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“„ Home.js         # Landing page
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“„ LeaderboardPage.js # Global rankings display
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“„ ProfilePage.js  # User profile management
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“„ PublicChallengePage.js # Public challenge view
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“„ StudentDashboard.js # Student analytics dashboard
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“„ SubmissionsPage.js # User submissions history
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“„ SubmissionsReviewPage.js # Submission evaluation
β”‚   β”‚   β”‚   └── πŸ“„ UserProfilePage.js # Public user profiles
β”‚   β”‚   β”œβ”€β”€ πŸ“„ api.js              # API service layer
β”‚   β”‚   β”œβ”€β”€ πŸ“„ App.css             # Global styles
β”‚   β”‚   β”œβ”€β”€ πŸ“„ App.js              # Root application component
β”‚   β”‚   β”œβ”€β”€ πŸ“„ App.test.js         # Application tests
β”‚   β”‚   β”œβ”€β”€ πŸ“„ index.css           # Global CSS imports
β”‚   β”‚   β”œβ”€β”€ πŸ“„ index.js            # React application entry point
β”‚   β”‚   β”œβ”€β”€ πŸ“„ input.css           # Tailwind CSS input file
β”‚   β”‚   β”œβ”€β”€ πŸ“„ reportWebVitals.js  # Performance monitoring
β”‚   β”‚   └── πŸ“„ setupTests.js       # Test configuration
β”‚   β”œβ”€β”€ πŸ“„ .env                    # Environment variables
β”‚   β”œβ”€β”€ πŸ“„ .gitignore             # Git ignore rules
β”‚   β”œβ”€β”€ πŸ“„ package.json           # Dependencies and scripts
β”‚   β”œβ”€β”€ πŸ“„ postcss.config.js      # PostCSS configuration
β”‚   └── πŸ“„ tailwind.config.js     # Tailwind CSS configuration
β”‚
β”œβ”€β”€ πŸ“„ .gitignore                  # Root Git ignore file
└── πŸ“„ README.md                   # Project documentation

πŸ”— API Documentation

Authentication Endpoints

Method Endpoint Description Auth Required
POST /api/auth/register Register new user account ❌
POST /api/auth/login Authenticate user credentials ❌
GET /api/auth/me Get current user profile βœ…
PUT /api/auth/profile Update user profile information βœ…
POST /api/auth/logout Invalidate user session βœ…

Challenge Management

Method Endpoint Description Auth Required
GET /api/challenges Retrieve all active challenges βœ…
GET /api/challenges/:id Get detailed challenge information βœ…
POST /api/challenges Create new challenge (Company only) βœ…
PUT /api/challenges/:id Update challenge details βœ…
DELETE /api/challenges/:id Deactivate challenge βœ…
GET /api/challenges/:id/submissions Get challenge submissions βœ…

Submission System

Method Endpoint Description Auth Required
POST /api/submissions Submit solution to challenge βœ…
GET /api/submissions Get user's submission history βœ…
GET /api/submissions/:id Get specific submission details βœ…
PUT /api/submissions/:id/review Review and score submission βœ…

Leaderboard & Analytics

Method Endpoint Description Auth Required
GET /api/leaderboard Get global user rankings βœ…
GET /api/leaderboard/rank/:userId Get specific user rank βœ…
GET /api/dashboard/student-stats Student performance metrics βœ…
GET /api/dashboard/company-stats Company analytics dashboard βœ…

Public Access APIs

Method Endpoint Description Auth Required
GET /api/public/leaderboard Public leaderboard view ❌
GET /api/public/stats Platform statistics ❌
GET /api/public/challenge/:id Public challenge details ❌

πŸ§ͺ Testing Strategy

Backend Testing

cd backend

# Run all tests
npm test

# Run tests with coverage
npm run test:coverage

# Run specific test file
npm test -- --grep "auth"

Frontend Testing

cd frontend

# Run all tests
npm test

# Run tests in watch mode
npm test -- --watch

# Run tests with coverage report
npm test -- --coverage --watchAll=false

End-to-End Testing

# Install Cypress (optional)
npm install -g cypress

# Run E2E tests
npx cypress open

πŸ”§ Development Guidelines

Code Style & Standards

  • ESLint configuration for consistent code style
  • Prettier for automatic code formatting
  • Conventional Commits for git commit messages
  • Component-based architecture for React development
  • RESTful API design principles for backend

Git Workflow

# Feature development
git checkout -b feature/new-feature-name
git commit -m "feat: add new feature description"
git push origin feature/new-feature-name

# Bug fixes
git checkout -b fix/bug-description
git commit -m "fix: resolve issue with specific component"
git push origin fix/bug-description

πŸš€ Deployment Guide

Backend Deployment (Render.com)

  1. Prepare for Deployment:
# Ensure all dependencies are listed in package.json
npm install --production
  1. Environment Setup:

    • Create account on Render.com
    • Connect your GitHub repository
    • Set environment variables in Render dashboard
  2. Deploy:

    • Select "Web Service"
    • Choose your repository
    • Set build command: npm install
    • Set start command: npm start

Frontend Deployment (Vercel)

  1. Prepare for Deployment:
# Build the application
npm run build

# Test the build locally
npx serve -s build
  1. Deploy to Vercel:
    • Create account on Vercel.com
    • Import your GitHub repository
    • Set environment variables
    • Deploy automatically on push to main branch

Database Setup (MongoDB Atlas)

  1. Create MongoDB Atlas Cluster:

    • Sign up at MongoDB Atlas
    • Create a new cluster
    • Set up database user and network access
    • Get connection string
  2. Update Environment Variables:

MONGODB_URI=mongodb+srv://username:password@cluster0.xxxxx.mongodb.net/linkup

πŸ“Š Performance Optimization

Frontend Optimizations

  • Code Splitting with React.lazy()
  • Image Optimization with next-gen formats
  • Bundle Analysis with webpack-bundle-analyzer
  • Caching Strategies for API responses
  • Lazy Loading for non-critical components

Backend Optimizations

  • Database Indexing for frequently queried fields
  • API Response Caching with Redis
  • Rate Limiting to prevent abuse
  • Compression for response payloads
  • Connection Pooling for database connections

πŸ” Security Features

Authentication & Authorization

  • JWT-based authentication with secure token storage
  • Role-based access control (Student/Company/Admin)
  • Password hashing with bcrypt and salt rounds
  • Session management with automatic token refresh

API Security

  • Rate limiting to prevent DDoS attacks
  • Input validation and sanitization
  • CORS configuration for cross-origin requests
  • Helmet.js for security headers
  • MongoDB injection prevention

Data Protection

  • Environment variable management
  • Sensitive data encryption for database storage
  • Secure HTTP headers implementation
  • API endpoint protection with authentication middleware

πŸ› Common Issues & Solutions

Setup Issues

Node.js Version Compatibility

# Check Node.js version
node --version

# Use Node Version Manager (nvm)
nvm install 18
nvm use 18

Port Already in Use

# Kill process on port 3000
npx kill-port 3000

# Kill process on port 5000
npx kill-port 5000

MongoDB Connection Issues

# Check MongoDB service status (Windows)
net start MongoDB

# Check MongoDB service status (macOS/Linux)
brew services start mongodb-community

Development Issues

CORS Errors

  • Verify REACT_APP_API_URL in frontend .env
  • Check FRONTEND_URL in backend .env
  • Restart both development servers

Authentication Problems

  • Clear browser localStorage and cookies
  • Check JWT_SECRET configuration
  • Verify token expiration settings

Database Connection Timeout

  • Check MongoDB Atlas network access settings
  • Verify connection string format
  • Ensure database user permissions

Production Issues

Build Failures

# Clear npm cache
npm cache clean --force

# Delete node_modules and reinstall
rm -rf node_modules package-lock.json
npm install

Performance Issues

  • Enable compression in Express
  • Optimize database queries
  • Implement caching strategies
  • Use CDN for static assets

🀝 Contributing

We welcome contributions to LinkUp! Here's how you can help:

Getting Started

  1. Fork the repository on GitHub
  2. Clone your fork locally
  3. Create a feature branch from main
  4. Make your changes following our coding standards
  5. Test your changes thoroughly
  6. Submit a pull request with a clear description

Contribution Guidelines

  • Follow the existing code style and conventions
  • Write clear, concise commit messages
  • Include tests for new features
  • Update documentation as needed
  • Ensure all tests pass before submitting

Areas for Contribution

  • πŸ› Bug Fixes - Help us identify and fix issues
  • ✨ New Features - Propose and implement new functionality
  • πŸ“š Documentation - Improve guides and API documentation
  • 🎨 UI/UX Improvements - Enhance user interface and experience
  • ⚑ Performance - Optimize application performance
  • πŸ§ͺ Testing - Increase test coverage

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

Special thanks to:

  • React Team for the amazing framework
  • MongoDB for the flexible database solution
  • Tailwind CSS for the utility-first CSS framework
  • Express.js community for the robust backend framework
  • Open Source Community for inspiration and contributions

πŸ‘¨β€πŸ’» Author & Maintainer

Muhammad Navas

πŸ“ž Support & Contact

Getting Help

Community

  • ⭐ Star this repository if you find it helpful
  • 🍴 Fork the project to contribute
  • πŸ‘₯ Follow for updates and new projects

Made with ❀️ by Muhammad Navas

Bridging the gap between talent and opportunity through technology

GitHub Stars GitHub Forks GitHub Issues GitHub License

About

LinkUp is a platform that bridges the gap between talented students and innovative companies. Students can showcase their programming skills through coding challenges, while companies can discover and recruit top talent.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages