HackHub is a dual-interface application designed to streamline the process of managing and participating in hackathons for a college community. It bridges the communication gap between faculty coordinators and students by providing a single, organized platform for all hackathon-related activities.
HackHub/
βββ server/ # Backend API (Node.js + Express)
β βββ index.js # Server entry point
β βββ package.json # Backend dependencies
β βββ models/ # MongoDB schemas
β β βββ User.js
β β βββ Hackathon.js
β βββ routes/ # API routes
β β βββ auth.js
β β βββ hackathons.js
β β βββ students.js
β β βββ analytics.js
β βββ middleware/ # Custom middleware
β β βββ auth.js
β βββ services/ # Business logic
β βββ googleAuth.js
βββ client/ # Frontend (React + Tailwind CSS)
β βββ public/ # Static assets
β βββ src/
β β βββ components/ # React components
β β βββ contexts/ # React contexts
β β βββ services/ # API services
β β βββ App.js # Main app component
β β βββ index.js # React entry point
β βββ package.json # Frontend dependencies
β βββ tailwind.config.js
βββ package.json # Root workspace manager
βββ README.md
- Hackathon Management: Create, edit, and delete hackathon posts
- Dynamic Content Control: Full control over hackathon information
- Detailed Analytics: Track impressions, registrations, and student engagement
- Registration Data: View all registered students with their details
- Visual Analytics: Graphical representations of engagement trends
- Personalized Profiles: Create accounts with essential information
- Curated Hackathon List: View all available hackathons in real-time
- Engagement Tracking: Automatic impression counting
- Automated Registration: Monitor email confirmations via Google OAuth
- New Update Highlights: Special highlighting for new hackathon updates
- Runtime: Node.js with Express.js
- Database: MongoDB with Mongoose ODM
- Authentication: JWT tokens with bcryptjs
- Email Integration: Google APIs for Gmail monitoring
- Security: Helmet, CORS, rate limiting
- Validation: Express-validator
- Framework: React.js with modern hooks
- Styling: Tailwind CSS with custom components
- Icons: Lucide React
- Charts: Recharts for analytics
- Forms: React Hook Form
- Notifications: React Hot Toast
- HTTP Client: Axios with interceptors
- Node.js >= 16.0.0
- npm >= 8.0.0
- MongoDB (local or cloud)
git clone <repository-url>
cd HackHub
npm run install-all
Create .env
files in both server/
and client/
directories:
Server Environment (server/.env
):
MONGODB_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret_key
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
GOOGLE_REDIRECT_URI=http://localhost:3000/auth/google/callback
PORT=5000
NODE_ENV=development
Client Environment (client/.env
):
REACT_APP_API_URL=http://localhost:5000/api
REACT_APP_GOOGLE_CLIENT_ID=your_google_client_id
# Start both backend and frontend
npm run dev
# Or start individually:
npm run server # Backend only (port 5000)
npm run client # Frontend only (port 3000)
- Frontend: http://localhost:3000
- Backend API: http://localhost:5000
- API Health Check: http://localhost:5000/api/health
npm run dev # Start both servers
npm run install-all # Install all dependencies
npm run test # Run tests for both
npm run lint # Lint both projects
cd server
npm run dev # Start with nodemon
npm run start # Start production server
npm test # Run backend tests
npm run lint # Lint backend code
cd client
npm start # Start development server
npm run build # Build for production
npm test # Run frontend tests
npm run lint # Lint frontend code
POST /api/auth/register
- User registrationPOST /api/auth/login
- User loginGET /api/auth/profile
- Get user profilePUT /api/auth/profile
- Update user profile
POST /api/hackathons
- Create hackathonGET /api/hackathons
- Get all hackathonsPUT /api/hackathons/:id
- Update hackathonDELETE /api/hackathons/:id
- Delete hackathon
GET /api/hackathons/student
- Get hackathons for studentsPOST /api/hackathons/:id/register
- Register for hackathonGET /api/students/profile
- Get student profilePUT /api/students/profile
- Update student profile
GET /api/analytics/hackathon/:id
- Get hackathon analyticsGET /api/analytics/overview
- Get faculty overviewGET /api/analytics/student-engagement
- Get student engagement data
cd server
npm install --production
npm start
cd client
npm run build
# Serve the build folder with your preferred server
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request