How gurummang/file-repo works
Project Type and Purpose
• This is a standalone Spring Boot microservice (“FileHistory”) that exposes REST endpoints for file scanning, history tracking, and dashboard reporting.
• It integrates with external systems: AWS S3 for file storage, RabbitMQ for event-driven processing, Slack for notifications, and a relational database for persistence.
File‐Structure Analysis
• Top-level artifacts: build.gradle, Dockerfile, AWS task definition (config/FileTaskDefinition.json)
• src/main/java/com/GASB/file: a layered package structure following Controller → Service → Repository → Entity.
• Config packages: aws (S3), rabbitmq (message broker), slack (notification), cors, and annotation (JWT security).
• Services break down by concern: filescan, history, dashboard, tlsh (fuzzy hashing), rabbitmq listener.
• Repositories under file, org, user implement Spring Data JPA interfaces.
Key Architectural Patterns
• Layered architecture: HTTP Controllers delegate to Service classes, which in turn call Repositories or external APIs.
• Aspect-Oriented programming for JWT validation and input validation.
• Event-driven message consumption via RabbitMQListener.
• Integration modules for external systems: AWS SDK for S3, Slack API client, RabbitMQ AMQP client.
• Dockerized for container deployment, with AWS ECS task definition and Gradle build.