How shaky-ground/earthquake-be works
Main Components
a. Client Layer
• Web Browsers/API Clients
• HTTP GET requests to /earthquakes endpoint
b. Application Layer (Spring Boot Application)
• Controllers (EventsResource)
• Services (EventsService)
• Configuration (WebClientConfig)
• DTOs Package (showing data models)
c. External Services
• USGS Earthquake API
• API endpoint integration
Component Relationships
• Client → EventsResource → EventsService → WebClient → USGS API
• ↓
• DTO Models
Specific Elements
a. Components:
• Use rectangles for main components
• Use rounded rectangles for services
• Blue: Client-facing components (REST controllers)
• Green: Service layer components
• Yellow: Configuration components
• Gray: External services
• Orange: Data models/DTOs
Important Details to Highlight
a. Data Flow:
• Request/response cycle
• JSON response format
• 24-hour time window filter
b. Key Classes:
• EarthquakeDto
• FeatureDto
• GeometryDto
• MetaDataDto
• PropertiesDto
Technical Specifications
• Java 17
• Spring Boot
• Maven
• WebClient for HTTP calls
• Port 8080 for local deployment