Skip to content

satvik-sharma-05/HackTrack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

59 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ HackTrack

AI-Powered Hackathon Discovery & Team Formation Platform

License: MIT Node.js React MongoDB Python

🌐 Live Demo β€’ πŸ“– Deployment Guide β€’ πŸ”— Backend API β€’ πŸ€– AI Service


🎯 Discover β€’ Connect β€’ Build β€’ Win

The ultimate platform for hackathon enthusiasts to find events, form dream teams, and build award-winning projects


🌟 Live Deployment

🎨 Frontend

hacktrack-frontend.vercel.app

Deployed on Vercel

βœ… Auto-deploys from main branch

βš™οΈ Backend

hacktrack-server-674s.onrender.com

Deployed on Render

Auto-deploys from main branch

πŸ€– AI Service

hacktrack-embedding.onrender.com

Deployed on Render

βœ… Sentence-Transformers


✨ Key Features

πŸŽͺ For Participants

  • πŸ” 500+ Hackathons - Real-time aggregation from Devpost, MLH, and Clist
  • 🏷️ Smart Status Labels - See ONGOING, UPCOMING, or FINISHED at a glance
  • πŸ€– AI Teammate Matching - Sentence-transformers powered recommendations (384-dim embeddings)
  • πŸ’¬ Real-time Chat - Socket.io for instant team communication
  • πŸ“š Smart Bookmarks - Save and organize favorite events
  • πŸ” Advanced Filters - Filter by platform, status, location, timeframe, and more
  • πŸ“Š Personal Dashboard - Track your hackathon journey
  • πŸ† Portfolio Building - Showcase your achievements

🎯 For Organizers

  • πŸ“… Event Management - Create and manage hackathons
  • πŸ“ˆ Analytics Dashboard - Track engagement and registrations
  • πŸ‘₯ Participant Management - Review submissions and teams
  • πŸ“’ Promotion Tools - Reach thousands of developers
  • πŸ’Ό Professional Profile - Build your organizer brand

🎨 How It Works

Event Discovery

  1. Real-time Aggregation: Backend fetches events from multiple sources every 6 hours
  2. Smart Caching: Events are cached to reduce API load and improve performance
  3. Status Calculation: Real-time calculation of event status (ongoing/upcoming/finished)
  4. Advanced Filtering: 7 filter categories with instant results
  5. Pagination: Smooth pagination with 24/48/96 events per page

Event Status System

Events are automatically labeled based on their dates:

  • 🟒 ONGOING - Event has started but not ended (with pulse animation)
  • πŸ”΅ UPCOMING - Event hasn't started yet
  • πŸ”΄ FINISHED - Event has ended

AI Teammate Matching

  1. Profile Embedding: User profiles are converted to 384-dimensional vectors using sentence-transformers
  2. Similarity Calculation: Cosine similarity computed between user embeddings
  3. Smart Filtering: Results filtered by location, college, skills, graduation year
  4. Ranking: Top 15 matches returned based on similarity score
  5. Real-time Updates: Recommendations update as profiles change

Real-time Chat

  1. Socket.io Connection: Persistent WebSocket connection for instant messaging
  2. Room-based Chat: Each team/event has its own chat room
  3. Message History: All messages stored in MongoDB
  4. Typing Indicators: See when teammates are typing
  5. Online Status: See who's currently online

πŸ—οΈ Tech Stack

Frontend

  • React 18 - UI library with hooks
  • Vite 5 - Lightning-fast build tool
  • TailwindCSS 3 - Utility-first CSS framework
  • shadcn/ui - Beautiful component library
  • React Router 6 - Client-side routing
  • Axios - HTTP client with interceptors
  • Socket.io Client - Real-time communication

Backend

  • Node.js 18 - JavaScript runtime
  • Express 4 - Web framework
  • MongoDB Atlas - Cloud database (M0 free tier)
  • Mongoose 8 - MongoDB ODM
  • Passport.js - Authentication middleware
    • Google OAuth 2.0
    • GitHub OAuth
    • LinkedIn OAuth
  • JWT - Token-based authentication
  • Socket.io - WebSocket server
  • Express Session - Session management with MongoDB store
  • Bcrypt - Password hashing
  • Helmet - Security headers
  • CORS - Cross-origin resource sharing

AI Service

  • Python 3.12.8 - Latest stable Python
  • Flask 3 - Lightweight web framework
  • Sentence-Transformers 3.3 - State-of-the-art embeddings
    • Model: all-MiniLM-L6-v2
    • Dimensions: 384
    • Speed: ~50ms per embedding
  • PyTorch 2.5 - ML framework (CPU-only for efficiency)
  • NumPy 2.2 - Numerical computing
  • Flask-CORS - CORS support

Event Sources

  • Clist API v4 - Programming contests and competitions
  • Devpost API - Hackathon platform
  • MLH API - Major League Hacking events
  • Custom Events - User-created hackathons

πŸš€ Quick Start

Prerequisites

βœ… Node.js 18+ (LTS recommended)
βœ… MongoDB (local or Atlas account)
βœ… Python 3.12+ (for AI features)
βœ… Git

Installation

# 1. Clone repository
git clone https://github.com/satvik-sharma-05/SE.git
cd SE

# 2. Install backend dependencies
cd server
npm install

# 3. Install frontend dependencies
cd ../client
npm install

# 4. Install AI service dependencies
cd ../embedding-service
pip install -r requirements.txt

Configuration

Backend - Create server/.env:

# Database
MONGO_URI=mongodb://localhost:27017/hacktrack
# Or use MongoDB Atlas:
# MONGO_URI=mongodb+srv://username:password@cluster.mongodb.net/HackTrack

# Authentication
JWT_SECRET=your_super_secret_jwt_key_min_32_chars_long
SESSION_SECRET=your_session_secret_key_also_32_chars

# Service URLs
FRONTEND_URL=http://localhost:5173
EMBEDDING_URL=http://localhost:5002

# OAuth (Optional - for social login)
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
GOOGLE_CALLBACK_URL=http://localhost:5000/api/auth/google/callback

GITHUB_CLIENT_ID=your_github_client_id
GITHUB_CLIENT_SECRET=your_github_client_secret
GITHUB_CALLBACK_URL=http://localhost:5000/api/auth/github/callback

LINKEDIN_CLIENT_ID=your_linkedin_client_id
LINKEDIN_CLIENT_SECRET=your_linkedin_client_secret
LINKEDIN_CALLBACK_URL=http://localhost:5000/api/auth/linkedin/callback

# Event Sources (Required for event aggregation)
CLIST_USERNAME=your_clist_username
CLIST_API_KEY=your_clist_api_key

# Email (Optional - for password reset)
EMAIL_USER=your_email@gmail.com
EMAIL_PASS=your_app_password

# Environment
NODE_ENV=development
PORT=5000

Frontend - Create client/.env:

VITE_API_BASE_URL=http://localhost:5000/api

Run Development

# Terminal 1 - AI Service (Port 5002)
cd embedding-service
python app.py

# Terminal 2 - Backend (Port 5000)
cd server
npm run dev

# Terminal 3 - Frontend (Port 5173)
cd client
npm run dev

Visit http://localhost:5173 πŸŽ‰


πŸ“ Project Structure

hacktrack/
β”œβ”€β”€ client/                    # React frontend
β”‚   β”œβ”€β”€ public/               # Static assets
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ api/              # API clients
β”‚   β”‚   β”œβ”€β”€ components/       # React components
β”‚   β”‚   β”‚   β”œβ”€β”€ events/       # Event-related components
β”‚   β”‚   β”‚   β”œβ”€β”€ layout/       # Layout components
β”‚   β”‚   β”‚   └── ui/           # Reusable UI components
β”‚   β”‚   β”œβ”€β”€ context/          # React context (Auth)
β”‚   β”‚   β”œβ”€β”€ pages/            # Page components (30+)
β”‚   β”‚   β”œβ”€β”€ services/         # API services
β”‚   β”‚   └── utils/            # Utility functions
β”‚   β”œβ”€β”€ .env                  # Environment variables
β”‚   β”œβ”€β”€ .env.production       # Production env vars
β”‚   └── package.json
β”‚
β”œβ”€β”€ server/                    # Node.js backend
β”‚   β”œβ”€β”€ data/                 # Cache files
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ cache/            # API cache
β”‚   β”‚   β”œβ”€β”€ config/           # Configuration
β”‚   β”‚   β”‚   β”œβ”€β”€ db.js         # MongoDB connection
β”‚   β”‚   β”‚   β”œβ”€β”€ passport.js   # OAuth strategies
β”‚   β”‚   β”‚   └── env.js        # Environment config
β”‚   β”‚   β”œβ”€β”€ controllers/      # Business logic
β”‚   β”‚   β”‚   β”œβ”€β”€ auth.controller.js
β”‚   β”‚   β”‚   β”œβ”€β”€ events.controller.js
β”‚   β”‚   β”‚   └── user.controller.js
β”‚   β”‚   β”œβ”€β”€ middleware/       # Express middleware
β”‚   β”‚   β”‚   β”œβ”€β”€ auth.js       # JWT authentication
β”‚   β”‚   β”‚   β”œβ”€β”€ rateLimiter.js # Rate limiting
β”‚   β”‚   β”‚   └── validation.js  # Input validation
β”‚   β”‚   β”œβ”€β”€ models/           # MongoDB schemas
β”‚   β”‚   β”‚   β”œβ”€β”€ User.js
β”‚   β”‚   β”‚   β”œβ”€β”€ Event.js
β”‚   β”‚   β”‚   β”œβ”€β”€ Chat.js
β”‚   β”‚   β”‚   └── Message.js
β”‚   β”‚   β”œβ”€β”€ routes/           # API routes
β”‚   β”‚   β”œβ”€β”€ services/         # External API services
β”‚   β”‚   β”‚   β”œβ”€β”€ clist.js      # Clist API
β”‚   β”‚   β”‚   β”œβ”€β”€ devpost.service.js # Devpost API
β”‚   β”‚   β”‚   └── mlhService.js  # MLH API
β”‚   β”‚   └── utils/            # Utility functions
β”‚   β”œβ”€β”€ .env                  # Environment variables (gitignored)
β”‚   β”œβ”€β”€ .env.example          # Example env file
β”‚   └── package.json
β”‚
β”œβ”€β”€ embedding-service/         # Python AI service
β”‚   β”œβ”€β”€ app.py                # Flask application
β”‚   β”œβ”€β”€ requirements.txt      # Python dependencies
β”‚   └── runtime.txt           # Python version
β”‚
β”œβ”€β”€ README.md                 # This file
β”œβ”€β”€ DEPLOY.md                 # Deployment guide
└── CHANGES.md                # Recent changes log

🎯 API Endpoints

Authentication

POST   /api/auth/register          # Register new user
POST   /api/auth/login             # Login with email/password
GET    /api/auth/logout            # Logout user
GET    /api/auth/me                # Get current user
GET    /api/auth/google            # Google OAuth login
GET    /api/auth/github            # GitHub OAuth login
GET    /api/auth/linkedin          # LinkedIn OAuth login
POST   /api/auth/forgot-password   # Request password reset
POST   /api/auth/reset-password    # Reset password with token

Events

GET    /api/events/live            # Get live events (all sources)
GET    /api/events/mlh             # Get MLH events only
GET    /api/events/devpost         # Get Devpost events only
GET    /api/events/:id             # Get event by ID
POST   /api/events/:id/bookmark    # Toggle bookmark
GET    /api/events/me/bookmarks    # Get user's bookmarks
GET    /api/events/statistics      # Get event statistics

AI Teammates

POST   /api/teammates/find         # Search teammates with AI
POST   /api/teammates/recommend    # Get AI recommendations
GET    /api/teammates/form-teams   # Auto team formation

Users

GET    /api/users/profile          # Get current user profile
PUT    /api/users/profile          # Update profile
GET    /api/users/:id              # Get public user profile

Chat

GET    /api/chats                  # Get user's chats
POST   /api/chats                  # Create new chat
GET    /api/chats/:id/messages     # Get chat messages
POST   /api/chats/:id/messages     # Send message

Health

GET    /api/health                 # Backend health check
GET    /health                     # AI service health check

πŸš€ Deployment

Production URLs

Deployment Process

All services auto-deploy on push to main branch:

git add .
git commit -m "your changes"
git push origin main

Deployment Times:

  • Frontend (Vercel): 1-2 minutes
  • Backend (Render): 2-3 minutes
  • AI Service (Render): 2-3 minutes

Environment Variables (Production)

Render Dashboard β†’ hacktrack-server-674s β†’ Environment:

# Required
MONGO_URI=mongodb+srv://username:password@cluster.mongodb.net/HackTrack
JWT_SECRET=your_production_jwt_secret
SESSION_SECRET=your_production_session_secret
EMBEDDING_URL=https://hacktrack-embedding.onrender.com
FRONTEND_URL=https://hacktrack-frontend.vercel.app

# OAuth Callbacks
GOOGLE_CALLBACK_URL=https://hacktrack-server-674s.onrender.com/api/auth/google/callback
GITHUB_CALLBACK_URL=https://hacktrack-server-674s.onrender.com/api/auth/github/callback
LINKEDIN_CALLBACK_URL=https://hacktrack-server-674s.onrender.com/api/auth/linkedin/callback

# Event Sources
CLIST_USERNAME=your_username
CLIST_API_KEY=your_api_key

# Environment
NODE_ENV=production

Vercel Dashboard β†’ hacktrack-frontend β†’ Settings β†’ Environment Variables:

VITE_API_BASE_URL=https://hacktrack-server-674s.onrender.com/api

See DEPLOY.md for detailed deployment instructions and troubleshooting.


πŸ€– AI Features Deep Dive

Sentence-Transformers Model

We use all-MiniLM-L6-v2 for high-quality embeddings:

  • Model Size: 80MB (lightweight)
  • Dimensions: 384 (compact yet powerful)
  • Speed: ~50ms per embedding on CPU
  • Quality: State-of-the-art semantic similarity
  • No GPU Required: Optimized for CPU inference

How Teammate Matching Works

  1. Profile Embedding Generation:

    # Combine user data
    profile_text = f"{bio} {skills} {interests} {domain}"
    
    # Generate embedding
    embedding = model.encode(profile_text)  # 384-dim vector
  2. Similarity Calculation:

    # Cosine similarity
    similarity = dot(vec1, vec2) / (norm(vec1) * norm(vec2))
  3. Filtering & Ranking:

    • Filter by location, college, graduation year
    • Sort by similarity score (0-1)
    • Return top 15 matches
  4. Real-time Updates:

    • Embeddings regenerated when profile changes
    • Background job updates all embeddings nightly

API Endpoints

# Generate embedding
POST /embed
{
  "text": "Full-stack developer interested in AI and blockchain"
}
# Returns: {"embedding": [0.123, -0.456, ...]}  # 384 numbers

# Calculate similarity
POST /similarity
{
  "vec1": [0.123, ...],
  "vec2": [0.456, ...]
}
# Returns: {"similarity": 0.87}  # 0-1 score

πŸ“Š Performance & Optimization

Backend Performance

  • API Response Time: < 100ms average
  • Event Caching: 6-hour cache reduces API calls by 95%
  • Database Queries: Indexed for fast lookups
  • Rate Limiting: Prevents abuse and ensures fair usage
  • Compression: Gzip compression reduces payload size by 70%

Frontend Performance

  • Page Load: < 1.5s on 3G
  • Code Splitting: Lazy loading reduces initial bundle
  • Image Optimization: WebP format with fallbacks
  • Caching: Service worker caches static assets
  • Pagination: Only loads 24 events at a time

AI Service Performance

  • Inference Time: < 500ms per request
  • Memory Usage: ~150MB
  • Concurrent Requests: Handles 10+ simultaneous requests
  • Cold Start: < 5s (Render free tier)

Caching Strategy

Event Sources β†’ 6-hour cache β†’ Background refresh
User Profiles β†’ Real-time β†’ Nightly embedding update
Static Assets β†’ CDN β†’ Browser cache
API Responses β†’ Redis (future) β†’ Client cache

πŸ”’ Security Features

  • βœ… JWT Authentication: Secure token-based auth
  • βœ… Password Hashing: Bcrypt with salt rounds
  • βœ… HTTPS Only: All production traffic encrypted
  • βœ… CORS Protection: Whitelist of allowed origins
  • βœ… Rate Limiting: Prevents brute force attacks
  • βœ… Input Validation: Sanitizes all user input
  • βœ… SQL Injection Protection: MongoDB prevents SQL injection
  • βœ… XSS Protection: React escapes all output
  • βœ… CSRF Protection: SameSite cookies
  • βœ… Helmet.js: Security headers
  • βœ… Session Security: Encrypted session store

🀝 Contributing

Contributions are welcome! Here's how:

  1. Fork the repository
  2. Create a feature branch:
    git checkout -b feature/AmazingFeature
  3. Commit your changes:
    git commit -m 'Add some AmazingFeature'
  4. Push to the branch:
    git push origin feature/AmazingFeature
  5. Open a Pull Request

Development Guidelines

  • Follow existing code style
  • Write meaningful commit messages
  • Add tests for new features
  • Update documentation
  • Ensure all tests pass

πŸ“œ License

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


πŸ™ Acknowledgments

  • Clist API - Programming contest aggregation
  • Devpost - Hackathon platform and API
  • MLH - Major League Hacking events
  • Shadcn/ui - Beautiful component library
  • Vercel - Frontend hosting
  • Render - Backend and AI service hosting
  • MongoDB Atlas - Database hosting
  • Sentence-Transformers - State-of-the-art embeddings
  • Hugging Face - Model hosting

πŸ“ž Contact & Support

Developer: Satvik Sharma

GitHub: @satvik-sharma-05

Repository: https://github.com/satvik-sharma-05/SE

Issues: Report a bug

Discussions: Ask a question


πŸ“ˆ Project Stats

GitHub stars GitHub forks GitHub issues GitHub pull requests GitHub last commit


πŸ—ΊοΈ Roadmap

Current Features βœ…

  • Event aggregation from multiple sources
  • AI-powered teammate matching
  • Real-time chat
  • Event status labels (ongoing/upcoming/finished)
  • Advanced filtering system
  • OAuth authentication
  • Bookmark system
  • Personal dashboard

Upcoming Features 🚧

  • Event reminders and notifications
  • Calendar integration (Google Calendar, iCal)
  • Team formation wizard
  • Project showcase gallery
  • Skill endorsements
  • Hackathon ratings and reviews
  • Mobile app (React Native)
  • Email notifications
  • Advanced analytics for organizers
  • Sponsor matching for events

πŸ’– Support the Project

If you find HackTrack helpful, please consider:

⭐ Starring the repository

πŸ› Reporting bugs and issues

πŸ’‘ Suggesting new features

🀝 Contributing code

πŸ“’ Sharing with friends


⭐ Star History

Star History Chart


Made with ❀️ by developers, for developers

⬆ Back to Top

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors