Skip to content

HackerSchool/Hacker-League

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

28 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ† Hacker League

Hacker League Logo

Welcome to Hacker League!

A task-gamification system designed to recognize and reward the best contributors of HackerSchool through a structured competitive framework.


πŸ“œ Project History

This noble project, first wrought by the esteemed craftsman JosΓ© Lopes (known throughout the realm as @MIBismuth), was christened in days of yore as "HS-WebApp" and didst flourish under his skilled hand (consult ye the ancient scrolls preserved in the legacy branch for proof of these bygone times).

Verily, this humble creation served as the cornerstone most foundational in the construction of the grand Hacker League project. Through great toil and scholarly pursuit, the project hath been most triumphantly transmuted from the primitive tongue of vanilla JavaScript unto the more refined and courtly language of React, thereby achieving superior maintainability and providing a most pleasant experience for all who venture forth to use it.


βœ… Current Features

🏠 Leaderboard System

  • Interactive Leaderboard with team and individual classifications
  • Multiple Point Types: Total, PJ (Journey Points), and PCC (Community Contribution Points)
  • Dynamic Controls: Inline dropdown menus for classification type and point filtering
  • Medal System: πŸ₯‡πŸ₯ˆπŸ₯‰πŸŽ–️ for top 5 positions with position-specific colors
  • Statistics Dashboard: Total participants, active teams, and total points
  • Expandable History: Click rows to see recent activity with "See more" navigation
  • Real-time Sorting: Sort by Total Points, PJ Points, or PCC Points

πŸ“Š History Page

  • Comprehensive Activity Log: View all point attributions across teams and individuals
  • Advanced Filtering: Filter by entity type (Teams/Individuals), points type (PJ/PCC), and specific entities
  • Pagination: Navigate through large datasets with 10 items per page
  • Expandable Details: Click rows to see full activity descriptions

πŸ‘€ User Profile System

  • Personal Profile Management: Edit user information, upload logos
  • Logo Upload: Local file upload with Base64 storage and persistence
  • Team Selection: Multi-team membership with checkbox interface
  • Profile Data: Display member number, join date, IST ID, roles, and additional info
  • Edit Mode: Toggle between view and edit modes with form validation

πŸ” Authentication System

  • Secure Login/Logout: Cookie and local storage support
  • Mock User System: Available for development testing (admin, alexchen, mariasantos, davidkim)
  • Session Management: Persistent login state
  • Role Management: Admin and user roles with appropriate permissions

πŸ› οΈ Admin Panel

  • User Management: Create, edit, and delete users
  • Search Functionality: Find users by username
  • Mock Data Integration: Realistic user data for testing
  • Form Validation: Complete user information management
  • Error Handling: Proper error messages and loading states

πŸ› οΈ Tech Stack

  • Frontend: React 18 with React Router v6
  • State Management: React Context API with hooks
  • Styling: CSS3 with responsive design and custom color scheme
  • Mock API: Simulated backend with network delays
  • Authentication: JWT-based with localStorage persistence
  • File Handling: FileReader API for local image uploads

πŸ“ Project Structure

src/
β”œβ”€β”€ components/
β”‚   β”œβ”€β”€ Auth/
β”‚   β”‚   β”œβ”€β”€ LoginForm.js
β”‚   β”‚   β”œβ”€β”€ RegisterForm.js
β”‚   β”‚   └── Auth.css
β”‚   β”œβ”€β”€ Layout/
β”‚   β”‚   β”œβ”€β”€ Navbar.js
β”‚   β”‚   └── Navbar.css
β”‚   β”œβ”€β”€ Profile/
β”‚   β”‚   β”œβ”€β”€ UserProfile.js
β”‚   β”‚   └── Profile.css
β”‚   β”œβ”€β”€ Leaderboard/
β”‚   β”‚   β”œβ”€β”€ LeaderboardTable.js
β”‚   β”‚   └── Leaderboard.css
β”‚   β”œβ”€β”€ Admin/
β”‚   β”‚   β”œβ”€β”€ AdminPanel.js
β”‚   β”‚   └── Admin.css
β”‚   └── PrivateRoute.js
β”œβ”€β”€ contexts/
β”‚   └── AuthContext.js
β”œβ”€β”€ pages/
β”‚   β”œβ”€β”€ LoginPage.js
β”‚   β”œβ”€β”€ RegisterPage.js
β”‚   β”œβ”€β”€ ProfilePage.js
β”‚   β”œβ”€β”€ LeaderboardPage.js
β”‚   β”œβ”€β”€ HistoryPage.js
β”‚   └── AdminPage.js
β”œβ”€β”€ services/
β”‚   β”œβ”€β”€ apiService.js
β”‚   └── mockDataService.js
β”œβ”€β”€ App.js
└── index.js

πŸš€ Getting Started

Prerequisites

  • Node.js (v14 or higher)
  • npm or yarn

Installation

  1. Clone the repository

    git clone https://github.com/HackerSchool/Hacker-League.git
    
    cd Hacker-League
  2. Install dependencies

    npm install
  3. Start the development server

    npm start
  4. Open your browser Navigate to http://localhost:3000

Test Users

The application includes mock users for testing:

  • admin (password: admin) - Administrator with full access
  • alexchen - Team leader with member access
  • mariasantos - Regular member
  • davidkim - Team leader with member access

Building for Production

npm run build

🎨 Design System

Color Scheme

  • Primary Dark: #2b2a28 (Dark gray)
  • Primary Green: #6dba76 (Green)
  • Primary Blue: #156082 (Blue)
  • Text: White for contrast
  • Accent: #90EE90 (Light green for username)

πŸ§ͺ Testing

# Run tests
npm test

# Run tests with coverage
npm test -- --coverage

πŸš€ Deployment

Build for Production

npm run build

Deploy to Static Hosting

The build folder contains static files that can be deployed to:

  • Netlify
  • Vercel
  • GitHub Pages
  • AWS S3

🀝 Contributing

Team Structure

  • Decider: GonΓ§alo Fecha
  • Developers: AndrΓ© Caseiro, AndrΓ© Santos, Armando GonΓ§alves, GonΓ§alo Azevedo
  • Technical Expert: JosΓ© Lopes, Filipe PiΓ§arra
  • Game Design: JoΓ£o Rodrigues, Filipe Vaz
  • Logo Design: Francisco GonΓ§alves

How to contribute

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request
  6. Pls Pls Pls remember to update README and rest of documentation, if existing.

πŸ“ License

This project is licensed under the MIT License. Feel free to fork, modify, and share your improvements!

πŸ†˜ Support

If you encounter any issues or have questions:

  1. Check the Issues page
  2. Create a new issue with detailed information
  3. Contact the development team

About

Task-gamification WebApp

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •