DEV Community

Rishabh
Rishabh

Posted on

πŸ§‘πŸ»β€πŸš€My Hacktoberfest 2025 Journey: From Bug Fixes to Full-Stack Features

Hacktoberfest: Contribution Chronicles

An image of @rishabhrawat05's Holopin badges, which is a link to view their full Holopin profile

Introduction

October 2025 marked my active participation in Hacktoberfest, where I contributed to 4 open-source projects spanning Java demonstrations, full-stack web applications, and interactive games. This article chronicles my contribution journey, the technical challenges I faced, and what I learned along the way.

🎯 My Contribution Statistics

  • Total Merged PRs: 6+ in October 2025
  • Languages Used: Java, JavaScript, CSS, HTML
  • Project Types: Backend APIs, Frontend UIs, Game Development
  • Lines Changed: 1,800+ additions, 200+ deletions

Note: I have 42+ total pull requests throughout my GitHub journey. View all my contributions here.


πŸ“ Featured Contributions

1. Admin Menu Management System - The Midnight Brew

Repository: KrishnaSaxena108/The-Midnight-Brew

PR: #56 - feat: Admin Functionality Implemented

Status: βœ… Merged | Changes: +1,867 additions, -5 deletions | Files: 9 files changed

What I Built

I implemented a complete admin panel for a cafe management system with full CRUD (Create, Read, Update, Delete) functionality for menu items and categories.

Technical Implementation

Backend (Node.js/Express):

// Created admin middleware for role-based access control
const requireAdmin = async (req, res, next) => {
    authenticateToken(req, res, async (err) => {
        if(err) return;

        const user = await User.findById(req.user.userId);

        if(user.role !== 'admin'){
            return res.status(403).json({
                success: false,
                message: 'Access denied. Admin role required'
            });
        }

        req.admin = user;
        next();
    });
};
Enter fullscreen mode Exit fullscreen mode

Key Features Implemented:

  1. Database Models:

    • Created Category model with name and description fields
    • Created MenuItem model with name, price, category, image, availability
    • Added role field to existing User model (user/admin enum)
  2. RESTful API Endpoints:

    • GET /api/admin/menu-items - List all menu items
    • POST /api/admin/menu-items - Create new menu item
    • PUT /api/admin/menu-items/:id - Update menu item
    • DELETE /api/admin/menu-items/:id - Delete menu item
    • PATCH /api/admin/menu-items/:id/availability - Toggle availability
    • Similar CRUD endpoints for categories
  3. Frontend (Vanilla JavaScript):

    • Built modal-based UI with glass-morphism design
    • Real-time form validation
    • Success/error notifications with animations
    • Mobile-responsive design
  4. Security Features:

    • Admin-only middleware protection
    • JWT token authentication
    • Input validation and sanitization
    • Category deletion protection (prevents deletion if menu items exist)

Challenges Overcome:

  • Theme Persistence: The admin panel was getting hidden during theme switches. I implemented a MutationObserver to watch for style changes and force visibility.
  • Dropdown Styling: Select elements needed custom styling for both light and dark themes across different browsers.

2. Java 24 Stream Gatherers Demo

Repository: AloisSeckar/demos-java

PR: #83 - feat(java24): add JEP 485 – Stream Gatherers Demo

Status: βœ… Merged | Changes: +131 additions, -1 deletion

What I Implemented

Created a comprehensive demonstration of JEP 485 (Stream Gatherers), a new Java 24 feature that enhances the Stream API with custom intermediate operations.

Technical Deep Dive

Stream Gatherers Methods Demonstrated:

  1. fold() - Building Aggregates:
// Concatenate all numbers into a single string
Optional<String> str = numbers.stream()
    .gather(Gatherers.fold(() -> "", 
        (string, number) -> string + number))
    .findFirst();
// Result: "12345678910"
Enter fullscreen mode Exit fullscreen mode
  1. mapConcurrent() - Parallel Processing:
// Square each number using 4 concurrent threads
numbers.stream()
    .gather(Gatherers.mapConcurrent(4, n -> n * n))
    .forEach(n -> System.out.println("Square: " + n));
Enter fullscreen mode Exit fullscreen mode
  1. scan() - Running Totals:
// Show cumulative concatenation at each step
numbers.stream()
    .gather(Gatherers.scan(() -> "", 
        (string, number) -> string + number))
    .forEach(n -> System.out.println("Running total: " + n));
// Output: "1", "12", "123", "1234", ...
Enter fullscreen mode Exit fullscreen mode
  1. windowFixed() - Fixed-Size Batches:
// Group into windows of 3 elements
numbers.stream()
    .gather(Gatherers.windowFixed(3))
    .forEach(window -> System.out.println("Window: " + window));
// Output: [1,2,3], [4,5,6], [7,8,9], [10]
Enter fullscreen mode Exit fullscreen mode
  1. windowSliding() - Overlapping Windows:
// Create sliding windows of size 3
numbers.stream()
    .gather(Gatherers.windowSliding(3))
    .forEach(window -> System.out.println("Sliding Window: " + window));
// Output: [1,2,3], [2,3,4], [3,4,5], ...
Enter fullscreen mode Exit fullscreen mode

What I Learned:

  • Stream Gatherers bridge the gap between simple stream operations and complex stateful transformations
  • The API provides a cleaner alternative to manual collectors
  • Understanding the lifecycle: initializer β†’ integrator β†’ finisher

3. Hibernate Search Implementation

Repository: Halverson-Jason/webStore

PR: #16 - Implemented Search functionality

Status: βœ… Merged | Changes: +95 additions, -21 deletions

The Problem

The e-commerce web store had no search functionality, making it difficult for users to find specific products.

My Solution

Implemented full-text search using Hibernate Search with Lucene backend.

Technical Implementation:

  1. Added Dependencies (pom.xml):
<dependency>
    <groupId>org.hibernate.search</groupId>
    <artifactId>hibernate-search-mapper-orm</artifactId>
    <version>6.1.7.Final</version>
</dependency>
<dependency>
    <groupId>org.hibernate.search</groupId>
    <artifactId>hibernate-search-backend-lucene</artifactId>
    <version>6.1.7.Final</version>
</dependency>
Enter fullscreen mode Exit fullscreen mode
  1. Annotated Entity for Indexing:
@Entity
@Table(name = "products")
@Indexed  // Enable Hibernate Search indexing
public class Product {
    @FullTextField  // Make searchable
    private String name;

    @FullTextField  // Make searchable
    private String description;

    // ... other fields
}
Enter fullscreen mode Exit fullscreen mode
  1. Created Search Service:
@Service
public class SearchService {
    @PersistenceContext
    private EntityManager entityManager;

    public List<Product> searchProducts(String searchTerm) {
        SearchSession searchSession = Search.session(entityManager);

        return searchSession.search(Product.class)
            .where(f -> f.match()
                .fields("name", "description")
                .matching(searchTerm))
            .fetchHits(20);
    }
}
Enter fullscreen mode Exit fullscreen mode
  1. Created Controller Endpoint:
@Controller
public class SearchController {
    @Autowired
    private SearchService searchService;

    @GetMapping("/api/search/")
    public String search(@RequestParam("q") String q, Model model) {
        List<Product> searchResults = searchService.searchProducts(q);
        model.addAttribute("products", searchResults);
        return "home";
    }
}
Enter fullscreen mode Exit fullscreen mode
  1. Updated Frontend Forms:
<form class="form-inline" th:action="@{/api/search/}" method="get">
    <input class="form-control mr-sm-2" type="search" 
           name="q" placeholder="Search" aria-label="Search">
    <button class="btn btn-outline-success" type="submit">Search</button>
</form>
Enter fullscreen mode Exit fullscreen mode

Key Learnings:

  • Hibernate Search provides powerful full-text search with minimal configuration
  • Lucene indexing happens automatically on entity changes
  • Multi-field searching improves result relevance

4. Game Hint System - Couple Memory

Repository: idna001/Couple-Memory

PR: #142 - feat: Implemented Hint feature

Status: βœ… Merged | Changes: +149 additions, -1 deletion

The Challenge

Players requested a hint system to help when stuck, but it needed to be balanced to maintain game difficulty.

My Implementation

Game Mechanics:

  • Maximum 3 hints per game
  • 5-second cooldown between hints
  • Cards revealed for 2 seconds
  • Randomly selects two unmatched cards with matching pairs
  • Mobile-responsive UI

Code Highlights:

const hintCards = useCallback(() => {
    if (hintActive || hintLockedRef.current) return;
    if (hintCount === 0) return;

    // Decrement hint count
    setHintCount((c) => c - 1);
    hintLockedRef.current = true;

    // Start cooldown timer
    const seconds = Math.floor(HINT_COOLDOWN / 1000);
    setHintCooldown(seconds);

    hintIntervalRef.current = setInterval(() => {
        setHintCooldown((s) => {
            if (s <= 1) {
                clearInterval(hintIntervalRef.current);
                hintLockedRef.current = false;
                return 0;
            }
            return s - 1;
        });
    }, 1000);

    // Get available unmatched cards
    const available = cards.map((c, i) => ({ c, i }))
        .filter(({ c }) => !c.matched);

    // Select two random cards
    const idxA = crypto.getRandomValues(new Uint32Array(1))[0] % available.length;
    let idxB = crypto.getRandomValues(new Uint32Array(1))[0] % (available.length - 1);
    if (idxB >= idxA) idxB += 1;

    // Reveal cards temporarily
    setHintActive(true);
    setDisabled(true);
    setChoiceOne(available[idxA].c);
    setChoiceTwo(available[idxB].c);

    // Hide after 2 seconds
    hintTimeoutRef.current = setTimeout(() => {
        setChoiceOne(null);
        setChoiceTwo(null);
        setHintActive(false);
        setDisabled(false);
    }, REVEAL_DURATION);
}, [cards, hintCount, hintActive]);
Enter fullscreen mode Exit fullscreen mode

UI Components Added:

<div className="button-box">
    <button onClick={handleNewGame}>New Game</button>
    <div className="hint-box">
        <button
            className="hint"
            onClick={hintCards}
            disabled={hintCooldown > 0 || hintCount <= 0 || hintActive}
        >
            {hintCooldown > 0 
                ? `Hint (ready in ${hintCooldown}s)` 
                : "Hint"}
        </button>
        <p className="hint-count">
            {hintCount === 1 ? "Hint Remaining: " : "Hints Remaining: "}
            {hintCount}
        </p>
    </div>
</div>
Enter fullscreen mode Exit fullscreen mode

What I'm Proud Of:

  • Used crypto.getRandomValues() for true randomness instead of Math.random()
  • Proper cleanup of intervals and timeouts to prevent memory leaks
  • Smooth user experience with clear visual feedback

5. Mobile Responsiveness Fix - KrowdKraft

Repository: DarshanKrishna-DK/KrowdKraft

PR: #26 - feat: mobile responsiveness issue fixed

Status: βœ… Merged | Changes: +107 additions, -104 deletions

The Issue

Multiple components were breaking on mobile devices with text overflow, misaligned elements, and non-responsive layouts.

My Fixes

  • Implemented flexible grid layouts that collapse on smaller screens
  • Fixed navbar hamburger menu functionality
  • Adjusted font sizes with CSS clamp() for responsive typography
  • Optimized button sizes for touch-friendly interaction (minimum 44px)
  • Fixed image scaling issues with proper max-width and object-fit

Testing Approach:

  • Tested on Chrome, Firefox, Safari, Edge DevTools
  • Verified on actual mobile devices (iOS and Android)
  • Checked breakpoints: 320px, 375px, 425px, 768px, 1024px

6. Java JEP Documentation Links

Repository: AloisSeckar/demos-java

PR: #130 - feat(java24): Link JEP 492 demo class to JEP 482 and final JEP 513

Status: βœ… Merged | Changes: +26 additions, -43 deletions

What I Did

Updated Java Enhancement Proposal (JEP) documentation to properly link preview features to their final implementations:

  • JEP 447 (Java 22) β†’ JEP 513 (Java 25) - Flexible Constructor Bodies
  • JEP 482 (Java 23) β†’ JEP 513 (Java 25) - Flexible Constructor Bodies
  • JEP 492 (Java 24) β†’ JEP 513 (Java 25) - Flexible Constructor Bodies

Code Changes:

/// Demo for JDK 22 feature **JEP 447 - Statements before super(...)**
///
/// Replaced with [JEP 513](https://openjdk.org/jeps/513)
/// @see org.javademos.java25.jep513.FlexibleConstructorBodiesDemo
Enter fullscreen mode Exit fullscreen mode

This helps developers understand the evolution of preview features through multiple Java versions.


7. Build Fix - Foreign Function & Memory API

Repository: AloisSeckar/demos-java

PR: #80 - fix(java22): JEP 454 - ForeignFunctionMemoryDemo Build Failure

Status: βœ… Merged | Changes: +4 additions, -2 deletions

The Problem

The project wouldn't build due to:

  1. File name and class name mismatch
  2. Use of allocateUtf8String() method not available in JDK 22

My Solution

Implemented manual UTF-8 string allocation compatible with JDK 22's API, fixing the build and making the demo executable.


πŸŽ“ Key Takeaways

Technical Skills Gained

  1. Full-Stack Development:

    • Built complete features from database to UI
    • RESTful API design and implementation
    • Frontend state management without frameworks
  2. Java Modern Features:

    • Deep understanding of Stream Gatherers (JEP 485)
    • Navigation through JEP preview feature evolution
    • Foreign Function & Memory API nuances
  3. Search Technology:

    • Hibernate Search and Lucene integration
    • Full-text indexing strategies
    • Performance considerations for search
  4. Game Development:

    • React hooks for game state management
    • Timer and interval management
    • Random number generation best practices

Soft Skills Developed

  1. Code Review Participation:

    • Responded to reviewer feedback promptly
    • Made requested changes efficiently
    • Learned from maintainer suggestions
  2. Documentation:

    • Wrote clear PR descriptions with screenshots
    • Added meaningful code comments
    • Created comprehensive demo examples
  3. Testing:

    • Cross-browser testing methodology
    • Mobile-first responsive design approach
    • Manual QA before submission

πŸ“ˆ Impact

My contributions have:

  • βœ… Added admin capabilities to a production cafe management system
  • βœ… Provided educational Java 24 examples for the developer community
  • βœ… Enabled product search for an e-commerce platform
  • βœ… Improved user experience with hint system in a memory game
  • βœ… Made applications accessible on mobile devices
  • βœ… Fixed build failures blocking other contributors
  • βœ… Improved documentation for Java version migration

πŸš€ What's Next?

  1. Continue Contributing: I plan to maintain these projects and add more features
  2. Become a Maintainer: Working towards maintainer status on projects I'm passionate about
  3. Start My Own OSS: Planning to create an open-source library for common Java patterns
  4. Mentor Others: Help newcomers with their first Hacktoberfest contributions

πŸ’­ Final Thoughts

Hacktoberfest 2025 was more than just making PRsβ€”it was about:

  • 🀝 Connecting with maintainers and learning from their expertise
  • πŸ“š Understanding real-world codebases and their challenges
  • πŸ”§ Solving actual problems that users face
  • 🌱 Growing as a developer through diverse technical challenges

Every contribution, whether a bug fix or a new feature, made me a better developer. The open-source community's welcoming nature and constructive feedback were invaluable.

To fellow contributors: Don't hesitate to start. Pick a project you use, find an issue, and give it a shot. The community is here to help!


πŸ”— Connect With Me

Top comments (1)

Collapse
 
hitblast profile image
HitBlast

Honestly very hard work! Congratulations on the supercontributor badge after this :3