Skip to content

LibraryBookingSystem/analytics-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

analytics-service

Utilization metrics, peak-hour reporting, and centralized audit logs for the Library Booking System. Serves admin analytics over HTTP and ingests booking and audit streams from RabbitMQ.

Role in the system

flowchart TB
  BOOK[booking.events] --> ANA[analytics-service]
  AUD[audit.events] --> ANA
  ANA --> PG[(analytics_db)]
  Admin --> GW[api-gateway] --> ANA
Loading

API (via gateway)

Base path Audience Purpose
http://localhost:8080/api/analytics Admin Utilization, peak hours, overall stats
http://localhost:8080/api/audit-logs Admin Searchable audit trail (paging, failed attempts)

Booking lifecycle listeners record operational metrics without blocking the booking API.

Stack

  • Java 17, Spring Boot 3.5
  • JPA (PostgreSQL), AMQP, Spring Security, AOP, JJWT
  • common-aspects (audit events published from controller AOP in other services)

Configuration

Variable Purpose
DB_* PostgreSQL (analytics_db in Compose)
RABBITMQ_* Booking and audit consumers
JWT_SECRET, JWT_EXPIRATION Admin-only HTTP APIs

HTTP port 3007.

Run locally

cd docker-compose
docker compose up -d analytics-service

Related repositories

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors