Skip to content

Latest commit

Β 

History

History
261 lines (184 loc) Β· 7.58 KB

File metadata and controls

261 lines (184 loc) Β· 7.58 KB

HexFeed Documentation Hub

Welcome to the comprehensive documentation for the HexFeed Java Feed System Service. This directory contains all technical documentation, guides, and reference materials.

πŸ“š Documentation Index

πŸš€ Quick Start & Setup

πŸ”§ Technical Fixes & Solutions

πŸ“Š Architecture & Analysis

πŸ§ͺ Testing & Validation

🚒 Deployment & Integration


πŸ“– Documentation by Category

πŸ”΄ Critical Issues & Fixes

v1.7.8 - Kafka Deserialization Fix (Oct 21, 2025)

Issue: Kafka consumer crashing with IllegalStateException: No type information in headers

Solution: Added comprehensive consumer configuration with ErrorHandlingDeserializer

πŸ“„ Read: KAFKA_DESERIALIZATION_FIX.md

πŸ”§ Quick Fix: KAFKA_FIX_QUICK_REFERENCE.md

βœ… Status: STARTUP_SUCCESS_SUMMARY.md


πŸ—οΈ System Architecture

The HexFeed system follows a microservices architecture with:

  • Spring Boot 3.2.x backend
  • PostgreSQL 15 for relational data
  • Redis 7.x for caching
  • Apache Kafka for event streaming
  • H3 Spatial Indexing for location-based features
  • WebSocket for real-time updates

πŸ“„ Read: ClassArchitectureDiagram.md


πŸ§ͺ Testing Documentation

API Testing

  • REST endpoint testing with Postman
  • Authentication flow validation
  • Feed aggregation testing
  • Rate limiting verification

πŸ“„ Read: API_Testing_Status.md

WebSocket Testing

  • Real-time message broadcasting
  • Connection management
  • Subscription handling
  • Heartbeat mechanisms

πŸ“„ Read: ../hexfeed-backend/WEBSOCKET_TESTING_GUIDE.md


πŸš€ Getting Started

First Time Setup

  1. Prerequisites

    - Java 17+
    - Maven 3.8+
    - Docker & Docker Compose
    - PostgreSQL 15
    - Redis 7.x
    - Apache Kafka
  2. Quick Start

    # Clone the repository
    git clone <repository-url>
    cd Java-Feed-System-Service
    
    # Start services
    ./start-hexfeed.sh
  3. Verify Setup

    # Health check
    curl http://localhost:8080/actuator/health

πŸ“„ Full Guide: Project_Startup_Instructions.md


πŸ“Š Key Features

Location-Based Feed System

  • H3 Hexagonal Spatial Indexing - Resolution 7 (~2.5km edge length)
  • K-Way Merge Algorithm - Efficient merging of 7 hexagon feeds
  • Real-time Updates - WebSocket broadcasting for instant notifications
  • Cursor-Based Pagination - Efficient feed scrolling

Performance Optimizations

  • Multi-layer Caching - Redis caching with configurable TTL
  • Parallel Queries - CompletableFuture for concurrent database access
  • Rate Limiting - Token bucket algorithm with Redis
  • Connection Pooling - HikariCP for optimal database performance

Security & Reliability

  • JWT Authentication - Stateless token-based auth
  • Rate Limiting - Prevents abuse and ensures fair usage
  • Error Handling - Comprehensive exception handling with ErrorHandlingDeserializer
  • Manual Acknowledgment - Kafka consumer reliability

πŸ”§ Troubleshooting Guides

Common Issues

Issue: Kafka Consumer Errors

Solution: See KAFKA_DESERIALIZATION_FIX.md

Issue: Database Connection Failures

Solution: Ensure Docker services are running

docker-compose up -d postgres redis kafka

Issue: WebSocket Connection Drops

Solution: See ../hexfeed-backend/WEBSOCKET_TESTING_GUIDE.md


πŸ“ˆ Version History

Current Release: v1.7.8 (Oct 21, 2025)

  • βœ… Fixed Kafka consumer deserialization errors
  • βœ… Added ErrorHandlingDeserializer configuration
  • βœ… Enhanced consumer factory with proper settings
  • βœ… Created comprehensive documentation

Previous Release: v1.7.7 (Oct 11, 2025)

  • βœ… Fixed null user data in feed responses
  • βœ… Enhanced feed aggregation with @EntityGraph
  • βœ… Improved JPQL queries for PostgreSQL JSONB

See ../CHANGELOG.md for complete version history.


πŸ› οΈ Utility Scripts

Located in project root and hexfeed-backend/:

  • start-hexfeed.sh - Automated startup with dependency checking
  • hexfeed-backend/reset-kafka-consumer.sh - Kafka consumer group management
  • hexfeed-backend/test-api.sh - API testing automation
  • hexfeed-backend/test-websocket.sh - WebSocket testing

πŸ“ Development Guidelines

Code Standards

  • Follow SOLID principles
  • Maintain high cohesion and low coupling
  • Use Lombok for boilerplate reduction
  • Constructor injection for dependencies
  • Comprehensive error handling
  • JavaDoc for public methods

Testing Requirements

  • Unit tests for service layer
  • Integration tests for repositories
  • API endpoint testing with Postman
  • 80%+ code coverage target

Git Workflow

  • Feature branches from develop
  • Descriptive commit messages
  • Pull requests for review
  • No direct commits to main

🀝 Contributing

When adding new documentation:

  1. Place in appropriate category
  2. Update this README index
  3. Follow markdown formatting standards
  4. Include code examples where relevant
  5. Add to CHANGELOG.md

πŸ“ž Support

For issues, questions, or contributions:

  • Create an issue in the GitHub repository
  • Tag with appropriate labels
  • Provide detailed context and logs

πŸ“š External Resources

Spring Boot

Technologies


πŸ“Š Quick Stats

  • Total Lines of Code: 10,000+
  • Number of Tests: 100+
  • API Endpoints: 15+
  • Code Coverage: 80%+
  • Documentation Files: 15+

Last Updated: October 21, 2025
Version: 1.7.8
Status: βœ… Production Ready


For the most up-to-date system status, see STARTUP_SUCCESS_SUMMARY.md