Most student projects are static. DevShelf is dynamic. I engineered a User Behavior Analytics system that creates a “Data Flywheel.”

The Architecture

The system is composed of three distinct stages:

  1. Capture (LoggingService): Every time a user clicks a book or downloads a PDF, the event is serialized into logs.json. This is a low-latency append-only operation to ensure the UI never freezes.

  2. Analyze (LogAnalyzerMain): I separated the analytics into an Offline Batch Process. This module reads the raw logs, aggregates click counts, and normalizes them into a score between 0.0 and 1.0.

    Output: popularity.json

  3. Adapt (ReRanker): The next time a user searches, the ranking formula injects this data:

    $$Score = (0.6 \times \text{Relevance}) + (0.2 \times \text{Popularity}) + \dots$$

Why This Matters

This is how modern recommendation systems work (Netflix, YouTube). By decoupling Capture (Online) from Analysis (Offline), DevShelf scales without impacting user experience.