This document serves as the detailed answer to item 9.2, consolidating architectural insights, data flows, and operability guidance for the AISystems FireFlies CRM automation backend.
The application is a Spring Boot backend that orchestrates OpenAI and HubSpot APIs. Core packages include:
OpenAIService for completions, HubSpotTaskService for CRM operations, and ActionItemExtractorService for parsing transcripts.Receives CLI/HTTP prompts, routes them to services, and exposes endpoints for creation, extraction, random transcripts, and metadata reporting.
Calls gpt-4o-mini chat completions, handles retries, and surfaces execution timestamp/duration for diagnostics.
Creates deals, batches action items, and offers a deleteAllHubSpotDeals() flow that fetches paginated IDs and deletes each, returning structured report DTOs.
Bridges controllers and services, invoking OpenAI completions and converting results into HubSpot-ready payloads.
Refer to the PlantUML diagrams in the plantuml/ folder for visualization:
All UML files have matching HTML docs under plantuml/behavior and plantuml/structure describing their purpose, highlights, and source.
OPENAI_API_KEY and HUBSPOT_API_KEY before running./swagger-ui/ once the app is running (custom controller serves the UI).HubSpotDealDeletionReport detailing total found/deleted/failed entries.Run Gradle tests (if available) or manually hit endpoints using HTTP clients. Confirm the generated diagrams match current code for accuracy.
Always validate HubSpot API interactions in a sandbox account, especially the delete-all flow—it cannot be undone.