Skip to content

Vishwaspatel2401/WeHack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

91 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

WeHack πŸš€

A comprehensive hackathon management platform that enables organizers to create, manage, and run hackathons while providing participants with tools to submit projects, form teams, and engage with the community.

WeHack Platform Frontend Backend Database

✨ Features

πŸ† Core Functionality

  • Hackathon Management: Create, edit, and manage hackathons with detailed information
  • User Authentication: Secure login/signup system with role-based access
  • Project Submission: Advanced submission system with file uploads and validation
  • Team Management: Form teams, invite members, and collaborate
  • Judging System: Comprehensive judge management and scoring system
  • Real-time Comments: Nested comment system with reply functionality

🎯 User Roles

  • Organizers: Create hackathons, manage participants, oversee judging
  • Participants: Join hackathons, submit projects, form teams
  • Judges: Evaluate submissions, provide scores and feedback

πŸ”₯ Advanced Features

  • Leaderboard: Real-time ranking and scoring
  • File Management: Secure file upload and storage
  • Responsive Design: Mobile-friendly interface
  • Dark/Light Theme: Customizable UI experience
  • Search & Filter: Advanced hackathon and project discovery

πŸ› οΈ Tech Stack

Frontend

  • React 18 with TypeScript
  • Vite for fast development and building
  • Material-UI (MUI) for component library
  • React Router for navigation
  • Axios for API communication

Backend

  • Spring Boot 3 with Java
  • Spring Security for authentication
  • Spring Data JPA for database operations
  • MySQL database
  • Maven for dependency management

Design Patterns

This project implements 15 different design patterns to ensure maintainable, scalable, and well-structured code:

Backend Design Patterns (13 patterns)

  • Builder Pattern - Submission creation with step-by-step construction
  • Chain of Responsibility - Validation chain for submissions (title, description, file size)
  • Decorator Pattern - Enhanced notification system with email and Slack decorators
  • Factory Pattern - Hackathon role creation and mail service adapter factory
  • Observer Pattern - Real-time hackathon notifications and updates
  • State Pattern - Hackathon lifecycle management (draft, published, judging, completed)
  • Strategy Pattern - Flexible scoring strategies (simple average, weighted average)
  • Template Method - Scoreboard generation for different phases
  • Visitor Pattern - Analytics collection and data processing
  • Iterator Pattern - Custom collections for hackathons, submissions, and teams
  • Adapter Pattern - Mail service integration (Mailgun, organizer SMTP)
  • Bridge Pattern - Score evaluation abstraction
  • Proxy Pattern - Submission service with access control and caching
  • Memento Pattern - Submission history and undo functionality

Frontend Design Patterns (2 patterns)

  • Factory Pattern - UI component creation and role-based interfaces
  • Builder Pattern - Dynamic form building and submission construction

πŸš€ Quick Start

Prerequisites

  • Node.js (v18+ recommended)
  • Java (v17+ required)
  • MySQL (v8.0+ recommended)
  • Maven (v3.6+ recommended)

1. Clone the Repository

git clone https://github.com/your-username/wehack.git
cd wehack

2. Frontend Build

# Navigate to frontend directory
cd frontend

# Install dependencies
npm install

# Build the frontend for production
npm run build

3. Backend Setup & Run

# Navigate to backend directory
cd backend

# Configure database in application.properties
# Update database URL, username, and password

# Install dependencies and run (serves both frontend and backend)
./mvnw spring-boot:run

4. Access the Application

Note: The Spring Boot backend serves the built React frontend, so the entire application runs on a single port (8080).

Development Mode (Optional)

For development with hot reload:

# Terminal 1 - Frontend development server
cd frontend
npm run dev     # Runs on localhost:5173

# Terminal 2 - Backend server
cd backend
./mvnw spring-boot:run     # Runs on localhost:8080

πŸ“ Project Structure

WeHack/
β”œβ”€β”€ frontend/                 # React TypeScript frontend
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/      # Reusable UI components
β”‚   β”‚   β”œβ”€β”€ pages/          # Main application pages
β”‚   β”‚   β”œβ”€β”€ contexts/       # React contexts
β”‚   β”‚   β”œβ”€β”€ services/       # API service layers
β”‚   β”‚   β”œβ”€β”€ types/          # TypeScript type definitions
β”‚   β”‚   └── utils/          # Utility functions
β”‚   β”œβ”€β”€ public/             # Static assets
β”‚   └── package.json
β”œβ”€β”€ backend/                 # Spring Boot backend
β”‚   β”œβ”€β”€ src/main/java/
β”‚   β”‚   └── com/we/hack/
β”‚   β”‚       β”œβ”€β”€ controller/ # REST controllers
β”‚   β”‚       β”œβ”€β”€ service/    # Business logic
β”‚   β”‚       β”œβ”€β”€ model/      # JPA entities
β”‚   β”‚       β”œβ”€β”€ repository/ # Data access layer
β”‚   β”‚       └── config/     # Configuration classes
β”‚   β”œβ”€β”€ src/main/resources/
β”‚   β”‚   └── application.properties
β”‚   └── pom.xml
└── README.md

πŸ”§ Configuration

Database Configuration

Update backend/src/main/resources/application.properties:

# Database Configuration
spring.datasource.url=jdbc:mysql://localhost:3306/wehack
spring.datasource.username=your_username
spring.datasource.password=your_password

# JPA Configuration
spring.jpa.hibernate.ddl-auto=update
spring.jpa.show-sql=true

Environment Variables

Create .env file in frontend directory:

VITE_API_BASE_URL=http://localhost:8080
VITE_APP_NAME=WeHack

🌟 Key Components

Submission System

  • Advanced project submission with validation
  • File upload support (ZIP, PDF, docs)
  • Draft saving functionality
  • Builder pattern implementation

Comment System

  • Hierarchical nested comments
  • Real-time reply functionality
  • Composite pattern for comment tree structure
  • Modern dark theme UI

Team Management

  • Team creation and invitation system
  • Member role management
  • Collaborative project submission

Judge Dashboard

  • Comprehensive scoring interface
  • Submission evaluation tools
  • Real-time feedback system

πŸ“š API Documentation

Authentication Endpoints

POST /auth/login          # User login
POST /auth/signup         # User registration
POST /auth/logout         # User logout

Hackathon Endpoints

GET    /hackathons        # Get all hackathons
POST   /hackathons        # Create hackathon
GET    /hackathons/{id}   # Get hackathon details
PUT    /hackathons/{id}   # Update hackathon
DELETE /hackathons/{id}   # Delete hackathon

Submission Endpoints

POST /submissions         # Submit project
GET  /submissions/{id}    # Get submission details
PUT  /submissions/{id}    # Update submission

Comment Endpoints

GET  /comments/{hackathonId}  # Get comments
POST /comments                # Add comment/reply

πŸ”’ Security Features

  • JWT Authentication: Secure token-based authentication
  • Role-based Access Control: Different permissions for users
  • Input Validation: Comprehensive server-side validation
  • File Upload Security: Safe file handling and storage
  • SQL Injection Prevention: Parameterized queries

πŸ§ͺ Testing

Frontend Testing

cd frontend
npm run test

Backend Testing

cd backend
./mvnw test

πŸš€ Deployment

Production Build

# Frontend
cd frontend
npm run build

# Backend
cd backend
./mvnw clean package

🀝 Contributing

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

Code Style

  • Follow TypeScript/React best practices
  • Use consistent naming conventions
  • Write comprehensive comments
  • Include unit tests for new features

πŸ“„ License

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

πŸ™ Acknowledgments

  • Material-UI for the excellent React components
  • Spring Boot for the robust backend framework
  • React Community for inspiration and best practices
  • Open Source Contributors who made this project possible

πŸ“ž Support

For support, email support@wehack.com or join our Slack channel.

πŸ—ΊοΈ Roadmap

  • Mobile App - React Native implementation
  • Real-time Chat - WebSocket integration
  • Advanced Analytics - Detailed hackathon insights
  • API Gateway - Microservices architecture
  • CI/CD Pipeline - Automated deployment
  • Multi-language Support - Internationalization

Made with ❀️ by the WeHack Team

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages