Service Consolidation Analysis
Service Consolidation Analysis
Created: 2026-02-01 Status: Draft Related: ADR-001, Issue #66 Author: Claude (Sonnet 4.5)
Executive Summary
Analysis of 190 repositories in the Peeq workspace reveals a highly fragmented microservices architecture that should consolidate from 107+ microservices to approximately 15 core services. This consolidation will:
- Reduce operational complexity by 85%
- Eliminate 75+ archived/deprecated repositories
- Consolidate 40+ active services into 15 domain-aligned services
- Modernize tech stack (Spring Boot 2.x → 3.x, Java 11 → 17+)
- Improve maintainability and reduce deployment overhead
Key Findings
| Category | Count | Disposition |
|---|---|---|
| Active Services | 42 | Consolidate to 15 |
| Archived Candidates | 75 | Archive immediately |
| BPM Process Definitions | 8 active, 5 archived | Consolidate to bpm-service |
| Database Repos | 30+ (mostly archived) | Migrate to Flyway in service repos |
| Frontend Apps | 2 monorepos (peeq-mono, frontends) + 10 legacy | Keep 2 monorepos, archive rest |
| Infrastructure | 10+ (ArgoCD, Helm, Terraform) | Keep as-is |
| Libraries | 3 (core-lib + shared libs) | Consolidate to 1 |
Repository Inventory
Active Services (42)
| Repository | Type | Tech Stack | LOC | Last Commit | Target Service |
|---|---|---|---|---|---|
| athlete-manager | service | Java/Spring | 339 | 2025-08-05 | profile-service |
| broadcast | service | Java/Spring | 6,878 | 2024-06-25 | broadcast-service |
| celebrity | service | Java/Spring | 6,103 | 2025-08-26 | profile-service |
| chat | service | Java/Spring | 3,348 | 2025-08-26 | notification-service |
| class-catalog | service | Java/Spring | 15,104 | 2026-01-28 | content-service |
| content | service | Java/Spring | 10,264 | 2026-01-26 | content-service |
| service | Java/Spring | 2,731 | 2025-12-17 | notification-service | |
| fan | service | Java/Spring | 5,076 | 2025-08-26 | profile-service |
| group-profile | service | Java/Spring | 4,196 | 2025-09-05 | profile-service |
| inventory | service | Java/Spring | 15,850 | 2025-12-31 | content-service |
| journey | service | Java/Spring | 12,095 | 2025-10-16 | journey-service |
| keycloak | service | Java/Spring | 2,856 | 2025-08-26 | identity-service |
| media | service | Java/Spring | 28,661 | 2025-10-16 | content-service |
| message-board | service | Java/Spring | 3,096 | 2025-08-26 | notification-service |
| notifications | service | Java/Spring | 3,822 | 2025-12-19 | notification-service |
| onsite-event | service | Java/Spring | 2,081 | 2025-08-26 | event-service |
| org-manager | service | Java/Spring | 6,914 | 2025-11-21 | profile-service |
| peeq-broadcast | service | Java/Spring | 6,878 | 2025-02-14 | broadcast-service |
| peeq-celebrity | service | Java/Spring | 6,720 | 2025-02-14 | profile-service |
| peeq-conference | service | Java/Spring | 186,249 | 2025-02-14 | broadcast-service |
| peeq-conference-sse | service | Java/Spring | 4,304 | 2025-02-14 | broadcast-service |
| peeq-content | service | Java/Spring | 7,878 | 2025-02-14 | content-service |
| peeq-email | service | Java/Spring | 3,636 | 2025-02-14 | notification-service |
| peeq-fan | service | Java/Spring | 6,106 | 2025-02-14 | profile-service |
| peeq-group-profile | service | Java/Spring | 5,244 | 2025-02-14 | profile-service |
| peeq-inventory | service | Java/Spring | 13,115 | 2025-02-14 | content-service |
| peeq-media | service | Java/Spring | 24,894 | 2025-02-14 | content-service |
| peeq-message-board | service | Java/Spring | 7,478 | 2025-02-14 | notification-service |
| peeq-notification-service | service | Java/Spring | 3,266 | 2025-02-14 | notification-service |
| peeq-onsite-event | service | Java/Spring | 3,196 | 2025-02-14 | event-service |
| peeq-query | service | Java/Spring | 83,813 | 2025-02-14 | knowledge-graph |
| peeq-shoutout | service | Java/Spring | 8,815 | 2025-02-14 | shoutout-service |
| peeq-sms | service | Java/Spring | 3,586 | 2025-02-14 | notification-service |
| peeq-sse | service | Java/Spring | 6,301 | 2025-02-14 | notification-service |
| peeq-stream | service | Java/Spring | 5,144 | 2025-02-14 | broadcast-service |
| peeq-stripe | service | Java/Spring | 6,415 | 2025-02-14 | commerce-service |
| peeq-subscriptions | service | Java/Spring | 6,298 | 2025-02-14 | commerce-service |
| peeq-tags | service | Java/Spring | 3,972 | 2025-02-14 | content-service |
| peeq-transaction | service | Java/Spring | 2,813 | 2025-02-14 | commerce-service |
| peeq-users | service | Java/Spring | 2,506 | 2025-02-19 | identity-service |
| peeq-wallet | service | Java/Spring | 2,284 | 2025-02-14 | commerce-service |
| reporting | service | Java/Spring | 1,156 | 2025-08-26 | analytics-service |
| search | service | Java/Spring | 5,626 | 2025-08-26 | knowledge-graph |
| shoutout | service | Java/Spring | 8,417 | 2025-08-26 | shoutout-service |
| sms | service | Java/Spring | 2,593 | 2025-12-31 | notification-service |
| sse | service | Java/Spring | 5,034 | 2025-08-26 | notification-service |
| stripe | service | Java/Spring | 8,259 | 2026-01-12 | commerce-service |
| subscriptions | service | Java/Spring | 5,118 | 2026-01-14 | commerce-service |
| tags | service | Java/Spring | 2,834 | 2025-08-29 | content-service |
| tracking | service | Java/Spring | 3,888 | 2025-09-16 | analytics-service |
| transaction | service | Java/Spring | 1,581 | 2025-08-26 | commerce-service |
| users | service | Java/Spring | 2,460 | 2025-08-26 | identity-service |
| wallet | service | Java/Spring | 1,387 | 2025-08-26 | commerce-service |
| webinar | service | Java/Spring | 25,563 | 2026-01-29 | broadcast-service |
BPM Process Definitions (13 total)
Active (8): - peeq-broadcast-bpm → broadcast-service - peeq-meet-and-greet-bpm → event-service - peeq-purchase-request-bpm → commerce-service - peeq-recording-meet-greet-keepsake-videos-bpm → content-service - peeq-shoutout-bpm → shoutout-service - purchase-request-bpm → commerce-service - shoutout-bpm → shoutout-service
Archived (5): - peeq-celeb-broadcast-bpm (2021) - peeq-fan-broadcast-bpm (2021) - peeq-handler-broadcast-bpm (2021) - peeq-mux-livestream-bpm (2023)
Frontend Applications (12 total)
Active Monorepos (2): - peeq-mono (Angular 15+/Nx/Ionic) - 314,796 LOC - Main frontend monorepo - frontends (Angular) - 654,283 LOC - Newer frontend monorepo
Low Activity (3): - peeq-admin-fe (Angular) - 248,251 LOC - 2024-10-16 - peeq-celeb-fe (Angular) - 113,395 LOC - 2024-10-16 - peeq-library-fe (Angular) - 85,304 LOC - 2024-10-16
Archived Candidates (7): - peeq-celeb-fe-ui (2020-08-04) - peeq-celebrity-app (2020-08-31) - peeq-fan-app (2020-08-30) - peeq-fan-fe (2023-01-27) - 648,650 LOC - peeq-fan-ionic (2022-05-16) - 637,355 LOC - peeq-handler-fe (2024-02-27) - peeq-shared-jitsi-library (2020-08-03)
Infrastructure (10)
ArgoCD (4): - argocd (36,967 LOC) - argocd-deployments (214,234 LOC) - argocd-previews (3,739 LOC) - argocd-reports (1,482 LOC)
Other (6): - helm-charts (22,502 LOC) - terraform-environment (9,106 LOC) - terraform-modules (6,934 LOC) - github-reusable-workflow (12,718 LOC) - renovate-config (84 LOC) - terraform-google-jx (ARCHIVED - 2022)
Libraries (3)
- core-lib (93,367 LOC) - Active shared library
- peeq-shared-lib (6,916 LOC) - ARCHIVED 2022
- peeq-shared-secret (1,068 LOC) - ARCHIVED 2021
Archived Candidates (75 repositories)
Services (32): - peeq-broadcast-query (2021) - peeq-celeb-broadcast (2020) - peeq-charity (2021) - peeq-custom-tixr (2021) - peeq-dwolla (2023) - peeq-etl (2022) - peeq-external-task-gateway (2022) - peeq-image-processing (2021) - peeq-integration-test (2020) - peeq-kibana-deploy (2022) - peeq-load (2022) - peeq-logging (2022) - peeq-mux-livestream (2023) - peeq-recommendation-engine (2021) - peeq-sandbox (2022) - peeq-websocket (2022) - pvz-connect-be (2023) - And 15 more legacy services
Database Repos (30): - All *-db repos with last commits before 2024 - These were separate Flyway migration repos, now deprecated
POCs (3): - coolify-poc (2025-10-08) - dokploy-poc (2025-10-24) - firebase-poc (2025-07-07)
Other (10): - peeq-airbyte (2022) - peeq-documentation (2022) - 598,511 LOC - peeq-encryption (2020) - peeq-jitsi-meet (2020) - peeq-keycloak-archive (2022) - 357,466 LOC - peeq-kibana (2021) - 359,770 LOC - peeq-meetandgreet-for-iOS (2021) - 545,682 LOC - peeq-reporting (2022) - peeq-scheduler (2021) - peeq-zendesk (2021)
Consolidation Mapping
Target Architecture (15 Services)
graph TB
subgraph "Identity & Access"
identity[identity-service<br/>Keycloak + User Management]
profile[profile-service<br/>Experts, Fans, Groups, Orgs]
end
subgraph "Content & Media"
content[content-service<br/>Classes, Inventory, Tags, Media]
knowledge[knowledge-graph<br/>Search, Query, Recommendations]
end
subgraph "Live Experiences"
broadcast[broadcast-service<br/>Livestream, Conference, Webinar]
shoutout[shoutout-service<br/>Personalized Videos]
event[event-service<br/>Onsite Events, Meet & Greet]
end
subgraph "Commerce & Payments"
commerce[commerce-service<br/>Stripe, Subscriptions, Transactions, Wallet]
end
subgraph "Communication"
notification[notification-service<br/>Email, SMS, Chat, Message Board, SSE]
end
subgraph "Platform Services"
journey[journey-service<br/>User Journeys, Onboarding]
bpm[bpm-service<br/>Camunda Process Orchestration]
gateway[api-gateway<br/>GraphQL Federation]
end
subgraph "Operations"
admin[admin-service<br/>Admin Portal Backend]
analytics[analytics-service<br/>Reporting, Tracking, Superset]
config[config-service<br/>Feature Flags, Config Management]
end
identity --> profile
profile --> content
content --> knowledge
broadcast --> bpm
event --> bpm
commerce --> bpm
shoutout --> bpm
notification --> identity
journey --> profile
gateway --> identity
gateway --> profile
gateway --> content
gateway --> broadcast
gateway --> commerce
analytics --> knowledge
Detailed Consolidation Groups
1. identity-service
Purpose: Authentication, authorization, user identity management
Consolidates: - keycloak (2,856 LOC) - peeq-users (2,506 LOC) - users (2,460 LOC)
Auth Themes (Keep Separate): - celeb-keycloak-theme - fan-keycloak-theme - cibseven-keycloak
Total LOC: ~7,822
Tech Stack: Java 17, Spring Boot 3.x, Keycloak Admin API
Dependencies: None (foundational service)
2. profile-service
Purpose: Expert, fan, group, and organization profile management
Consolidates: - athlete-manager (339 LOC) - celebrity (6,103 LOC) - fan (5,076 LOC) - group-profile (4,196 LOC) - org-manager (6,914 LOC) - peeq-celebrity (6,720 LOC) - peeq-fan (6,106 LOC) - peeq-group-profile (5,244 LOC)
Total LOC: ~40,698
Tech Stack: Java 17, Spring Boot 3.x, PostgreSQL
Dependencies: identity-service
Key Features: - Expert profile management (athletes, coaches, influencers) - Fan profile management - Group/team profiles - Organization management - Profile verification workflows
3. content-service
Purpose: Content catalog, media management, inventory, tagging
Consolidates: - class-catalog (15,104 LOC) - content (10,264 LOC) - inventory (15,850 LOC) - media (28,661 LOC) - peeq-class-catalog (7,299 LOC) - peeq-content (7,878 LOC) - peeq-inventory (13,115 LOC) - peeq-media (24,894 LOC) - peeq-tags (3,972 LOC) - tags (2,834 LOC)
BPM Processes: - peeq-recording-meet-greet-keepsake-videos-bpm (3,246 LOC)
Total LOC: ~133,117
Tech Stack: Java 17, Spring Boot 3.x, PostgreSQL, S3 (media storage), Elasticsearch
Dependencies: profile-service, bpm-service
Key Features: - Video content management - Class catalog (SEU/PDU tracking) - Inventory management - Media processing and transcoding - Content tagging and categorization - Content search and discovery
4. knowledge-graph
Purpose: Search, querying, recommendations, graph relationships
Consolidates: - peeq-query (83,813 LOC) - search (5,626 LOC)
Total LOC: ~89,439
Tech Stack: Java 17, Spring Boot 3.x, Elasticsearch, Neo4j (potential), GraphQL
Dependencies: All domain services (read-only queries)
Key Features: - Unified search across all entities - GraphQL query federation - Recommendation engine - Related content discovery - Analytics query layer
5. broadcast-service
Purpose: Live streaming, conferences, webinars
Consolidates: - broadcast (6,878 LOC) - peeq-broadcast (6,878 LOC) - peeq-conference (186,249 LOC) - peeq-conference-sse (4,304 LOC) - peeq-stream (5,144 LOC) - webinar (25,563 LOC)
BPM Processes: - peeq-broadcast-bpm (3,667 LOC)
Total LOC: ~238,683
Tech Stack: Java 17, Spring Boot 3.x, Mux (livestream), Jitsi (interactive), SSE (real-time)
Dependencies: profile-service, commerce-service, bpm-service
Key Features: - Mux livestream integration - Jitsi interactive video conferences - Webinar management - Real-time viewer engagement (SSE) - Stream analytics and metrics
6. shoutout-service
Purpose: Personalized video messages from experts to fans
Consolidates: - peeq-shoutout (8,815 LOC) - shoutout (8,417 LOC)
BPM Processes: - peeq-shoutout-bpm (3,145 LOC) - shoutout-bpm (2,982 LOC)
Total LOC: ~23,359
Tech Stack: Java 17, Spring Boot 3.x, S3 (video storage), PostgreSQL
Dependencies: profile-service, commerce-service, bpm-service
Key Features: - Shoutout request workflow - Video recording and upload - Quality review and approval - Delivery notifications - Shoutout marketplace
7. event-service
Purpose: In-person and virtual events, meet & greets
Consolidates: - onsite-event (2,081 LOC) - peeq-onsite-event (3,196 LOC)
BPM Processes: - peeq-meet-and-greet-bpm (4,280 LOC)
Total LOC: ~9,557
Tech Stack: Java 17, Spring Boot 3.x, Tixr API (ticketing), PostgreSQL
Dependencies: profile-service, commerce-service, bpm-service
Key Features: - Event creation and management - Tixr ticketing integration - Meet & greet scheduling - Check-in and attendance tracking - Event analytics
8. commerce-service
Purpose: Payments, subscriptions, transactions, wallet disbursement
Consolidates: - peeq-stripe (6,415 LOC) - peeq-subscriptions (6,298 LOC) - peeq-transaction (2,813 LOC) - peeq-wallet (2,284 LOC) - stripe (8,259 LOC) - subscriptions (5,118 LOC) - transaction (1,581 LOC) - wallet (1,387 LOC)
BPM Processes: - peeq-purchase-request-bpm (4,270 LOC) - purchase-request-bpm (4,174 LOC)
Total LOC: ~42,599
Tech Stack: Java 17, Spring Boot 3.x, Stripe API, Dwolla API, PostgreSQL
Dependencies: profile-service, bpm-service
Key Features: - Stripe payment processing - Subscription management (recurring billing) - Transaction history and reconciliation - Dwolla wallet disbursement to experts - Refund and chargeback handling
9. notification-service
Purpose: Multi-channel notifications (email, SMS, in-app, push)
Consolidates: - chat (3,348 LOC) - email (2,731 LOC) - message-board (3,096 LOC) - notifications (3,822 LOC) - peeq-email (3,636 LOC) - peeq-message-board (7,478 LOC) - peeq-notification-service (3,266 LOC) - peeq-sms (3,586 LOC) - peeq-sse (6,301 LOC) - sms (2,593 LOC) - sse (5,034 LOC)
Total LOC: ~44,891
Tech Stack: Java 17, Spring Boot 3.x, SendGrid/SES (email), Twilio (SMS), SSE (real-time)
Dependencies: identity-service, profile-service
Key Features: - Email notifications (transactional + marketing) - SMS notifications - In-app messaging and chat - Message board/forum - Server-Sent Events (real-time updates) - Notification preferences management
10. journey-service
Purpose: User onboarding, journey tracking, personalization
Consolidates: - journey (12,095 LOC)
Total LOC: ~12,095
Tech Stack: Java 17, Spring Boot 3.x, PostgreSQL
Dependencies: profile-service, content-service
Key Features: - User journey definition and tracking - Onboarding flows - Progress tracking - Personalized recommendations - Achievement/milestone tracking
11. bpm-service
Purpose: Business process orchestration (Camunda)
Consolidates: - All BPM process definitions (BPMN XML files) - External task handlers
BPM Definitions from: - peeq-broadcast-bpm - peeq-meet-and-greet-bpm - peeq-purchase-request-bpm - peeq-recording-meet-greet-keepsake-videos-bpm - peeq-shoutout-bpm - purchase-request-bpm - shoutout-bpm
Total LOC: ~25,764 (BPM definitions + orchestration)
Tech Stack: Java 17, Spring Boot 3.x, Camunda 7.x (or migrate to 8.x), PostgreSQL
Dependencies: None (invokes other services via external tasks)
Key Features: - Centralized process engine - Process definition deployment - Process instance monitoring - External task workers - Process analytics and reporting
12. api-gateway
Purpose: Unified GraphQL API, authentication, rate limiting
Consolidates: - graphql-migration (5,388 LOC)
Total LOC: ~5,388 + new gateway code
Tech Stack: Java 17, Spring Boot 3.x, GraphQL Federation, Kong/API Gateway
Dependencies: All services (routes to)
Key Features: - GraphQL federation across services - Authentication and authorization - Rate limiting and throttling - Request/response transformation - API versioning
13. admin-service
Purpose: Admin portal backend, user management, system configuration
Consolidates: - Admin functionality currently embedded in services - Keycloak admin operations
Total LOC: ~15,000 (new + extracted admin logic)
Tech Stack: Java 17, Spring Boot 3.x, PostgreSQL
Dependencies: All domain services (admin operations)
Key Features: - User management (admin perspective) - Content moderation - System configuration - Reporting and dashboards - Audit log management
14. analytics-service
Purpose: Reporting, tracking, analytics, Superset integration
Consolidates: - reporting (1,156 LOC) - tracking (3,888 LOC)
Integrations: - superset-imports (19,661 LOC) - Superset dashboard configs - dlt-pipelines (0 LOC) - Data pipeline definitions
Total LOC: ~24,705
Tech Stack: Java 17, Spring Boot 3.x, PostgreSQL (read replicas), Superset, Airbyte/DLT
Dependencies: All domain services (read-only analytics queries)
Key Features: - Event tracking and analytics - Custom reporting - Superset dashboard integration - Data warehouse ETL (Airbyte/DLT) - Business intelligence queries
15. config-service
Purpose: Centralized configuration, feature flags, secrets management
Consolidates: - Configuration logic currently embedded in services
Total LOC: ~8,000 (new service)
Tech Stack: Java 17, Spring Boot 3.x, Spring Cloud Config, PostgreSQL/Redis
Dependencies: None (foundational service)
Key Features: - Centralized configuration management - Feature flag management - Environment-specific configs - Dynamic config updates - Configuration versioning
Archive Candidates (75 Repositories)
Immediate Archive (Last commit > 2 years ago)
Services (32): 1. peeq-broadcast-query (2021-01-18) - 64,468 LOC 2. peeq-celeb-broadcast (2020-11-11) - 10,814 LOC 3. peeq-charity (2021-09-08) - 1,399 LOC 4. peeq-custom-tixr (2021-09-08) - 2,161 LOC 5. peeq-dwolla (2023-01-27) - 2,749 LOC 6. peeq-etl (2022-03-25) - 4,387 LOC 7. peeq-external-task-gateway (2022-10-26) - 1,549 LOC 8. peeq-image-processing (2021-12-08) - 2,993 LOC 9. peeq-integration-test (2020-11-05) - 1,788 LOC 10. peeq-kibana-deploy (2022-02-09) - 1,308 LOC 11. peeq-load (2022-03-05) - 499,961 LOC 12. peeq-logging (2022-03-31) - 1,753 LOC 13. peeq-mux-livestream (2023-06-27) - 9,573 LOC 14. peeq-recommendation-engine (2021-12-09) - 1,354 LOC 15. peeq-sandbox (2022-06-13) - 67,899 LOC 16. peeq-websocket (2022-02-19) - 19,720 LOC 17. pvz-connect-be (2023-08-17) - 14,105 LOC
Database Repos (30) - All *-db repos with no commits since 2023: 18. peeq-broadcast-db (2022-09-23) 19. peeq-celebrity-db (2024-02-23) - Low activity 20. peeq-charity-db (2021-09-07) 21. peeq-class-catalog-db (2024-02-22) 22. peeq-content-db (2024-01-17) 23. peeq-custom-tixr-db (2021-09-07) 24. peeq-dwolla-db (2022-09-22) 25. peeq-encryption-db (2021-09-07) 26. peeq-fan-db (2023-07-10) 27. peeq-flyway-db (2022-09-30) 28. peeq-group-profile-db (2024-08-16) 29. peeq-inventory-db (2024-04-24) 30. peeq-media-db (2024-08-22) 31. peeq-message-board-db (2022-09-23) 32. peeq-mux-livestream-db (2023-06-26) 33. peeq-notification-service-db (2023-01-10) 34. peeq-onsite-event-db (2023-08-11) 35. peeq-shoutout-db (2023-06-06) 36. peeq-sse-db (2022-09-23) 37. peeq-stream-db (2022-09-23) 38. peeq-stripe-db (2024-07-17) 39. peeq-subscriptions-db (2024-03-06) 40. peeq-tags-db (2022-09-23) 41. peeq-transaction-db (2022-09-23) 42. peeq-wallet-db (2022-09-22) 43. node-tracking-db (2025-04-28)
BPM Processes (5): 44. peeq-celeb-broadcast-bpm (2021-01-18) 45. peeq-fan-broadcast-bpm (2021-01-18) 46. peeq-handler-broadcast-bpm (2021-04-06) 47. peeq-mux-livestream-bpm (2023-04-12)
Frontend Apps (7): 48. peeq-celeb-fe-ui (2020-08-04) 49. peeq-celebrity-app (2020-08-31) 50. peeq-fan-app (2020-08-30) 51. peeq-fan-fe (2023-01-27) - 648,650 LOC 52. peeq-fan-ionic (2022-05-16) - 637,355 LOC 53. peeq-handler-fe (2024-02-27) 54. peeq-shared-jitsi-library (2020-08-03)
POCs (3): 55. coolify-poc (2025-10-08) 56. dokploy-poc (2025-10-24) 57. firebase-poc (2025-07-07)
Libraries (2): 58. peeq-shared-lib (2022-09-23) - 6,916 LOC 59. peeq-shared-secret (2021-02-23) - 1,068 LOC
Infrastructure (1): 60. terraform-google-jx (2022-07-08)
Other (15): 61. peeq-airbyte (2022-05-04) 62. peeq-celeb-ui (2020-07-20) 63. peeq-documentation (2022-01-29) - 598,511 LOC 64. peeq-encryption (2020-09-24) - Empty repo 65. peeq-handler-keycloak-theme (2023-04-25) 66. peeq-jitsi-meet (2020-05-28) 67. peeq-keycloak-archive (2022-10-05) - 357,466 LOC 68. peeq-kibana (2021-11-25) - 359,770 LOC 69. peeq-meet-greet-operator (2022-09-19) 70. peeq-meetandgreet-for-iOS (2021-03-03) - 545,682 LOC 71. peeq-nugets (2021-03-11) 72. peeq-reporting (2022-05-05) 73. peeq-scheduler (2021-07-29) 74. peeq-talent-app (2022-07-15) 75. peeq-zendesk (2021-08-25) - Empty repo
Total LOC to Archive: ~3.8 million lines
Migration Complexity Assessment
Complexity Factors
| Service | Migration Complexity | Reason | Estimated Effort |
|---|---|---|---|
| identity-service | Low | Simple consolidation of user mgmt + Keycloak | 2-3 sprints |
| profile-service | Medium | 8 services, shared domain model | 4-6 sprints |
| content-service | High | 10 services, media processing, large LOC | 8-12 sprints |
| knowledge-graph | Medium | Query layer refactoring, Elasticsearch migration | 4-6 sprints |
| broadcast-service | High | Complex Mux/Jitsi integrations, SSE, large codebase | 8-12 sprints |
| shoutout-service | Low | Well-bounded domain, simple workflow | 2-3 sprints |
| event-service | Low | Small codebase, clear boundaries | 2-3 sprints |
| commerce-service | High | Critical path, Stripe/Dwolla integrations, compliance | 8-12 sprints |
| notification-service | Medium | 11 services, multi-channel coordination | 6-8 sprints |
| journey-service | Low | Single service, minimal dependencies | 1-2 sprints |
| bpm-service | Medium | Process migration, external task refactoring | 4-6 sprints |
| api-gateway | Medium | GraphQL federation, new service | 4-6 sprints |
| admin-service | Medium | Extract admin logic from services | 4-6 sprints |
| analytics-service | Low | Mostly integration work | 2-3 sprints |
| config-service | Low | New foundational service | 2-3 sprints |
Total Estimated Effort: 60-90 sprints (assuming 2-week sprints = 30-45 months with single team)
Recommended Approach: Parallel teams (3-4 teams) → 8-12 months for core consolidation
Recommended Consolidation Sequence
Phase 1: Foundation (Months 1-3)
Goal: Establish foundational services and infrastructure
- config-service (Sprint 1-2)
- Centralized configuration
- Feature flags
- Enables gradual migration
- identity-service (Sprint 2-4)
- Consolidate user management
- Keycloak integration
- Foundation for all auth
- api-gateway (Sprint 4-6)
- GraphQL federation setup
- Authentication layer
- Routing to legacy + new services
Outcome: Foundational services ready, can route to both old and new services
Phase 2: Low-Risk Services (Months 3-6)
Goal: Consolidate low-complexity, non-critical services
- journey-service (Sprint 7-8)
- Single service migration
- User journey tracking
- shoutout-service (Sprint 8-10)
- Well-bounded domain
- 2 services + BPM
- event-service (Sprint 10-12)
- Small codebase
- Tixr integration
- analytics-service (Sprint 12-14)
- Reporting consolidation
- Superset integration
Outcome: 4 new services operational, confidence in migration approach
Phase 3: Core Domain Services (Months 6-12)
Goal: Consolidate major domain services
- profile-service (Sprint 15-20)
- 8 services consolidated
- Expert, fan, group, org profiles
- Critical Path: Required by most other services
- notification-service (Sprint 18-24)
- 11 services consolidated
- Multi-channel notifications
- Run in parallel with profile-service
- content-service (Sprint 21-32)
- 10 services consolidated
- Media processing
- Largest consolidation
- Dependencies: profile-service
Outcome: Major domain services consolidated, 70% of services migrated
Phase 4: Revenue & Compliance (Months 9-15)
Goal: Migrate critical commerce and broadcasting services
- commerce-service (Sprint 25-36)
- 8 services + BPM
- Stripe, Dwolla integrations
- High Risk: Revenue critical
- Parallel Testing Required
- broadcast-service (Sprint 28-40)
- 6 services + BPM
- Mux, Jitsi integrations
- High Complexity: Large codebase
- Parallel Testing Required
Outcome: Revenue-critical services migrated with zero downtime
Phase 5: Knowledge & Orchestration (Months 12-18)
Goal: Complete remaining complex services
- knowledge-graph (Sprint 33-38)
- Query consolidation
- Search optimization
- Dependencies: All domain services
- bpm-service (Sprint 36-42)
- Process engine centralization
- External task migration
- Dependencies: All services with BPM
- admin-service (Sprint 40-46)
- Extract admin logic
- Admin portal backend
- Dependencies: All domain services
Outcome: Complete migration, all 15 services operational
Phase 6: Decommission & Cleanup (Months 18-20)
Goal: Archive old services, cleanup infrastructure
- Archive 75+ legacy repos
- Migrate remaining data
- Shutdown old deployments
- Update documentation
- Knowledge transfer
Outcome: Clean architecture, 85% reduction in services
Dependency Analysis
Inter-Service Dependencies (Current State)
High Coupling (problematic for consolidation): -
Most services depend on core-lib (shared library) - Many
services depend on peeq-messages (RabbitMQ contracts) -
Services directly call each other via REST (tight coupling)
Shared Infrastructure: - PostgreSQL databases (separate DB per service) - RabbitMQ messaging - Keycloak for auth - Elasticsearch for search
Target Dependency Model
graph TD
A[api-gateway] --> B[identity-service]
A --> C[profile-service]
A --> D[content-service]
A --> E[broadcast-service]
A --> F[commerce-service]
A --> G[notification-service]
C --> B
D --> C
E --> C
E --> F
F --> C
G --> B
H[journey-service] --> C
I[shoutout-service] --> C
I --> F
J[event-service] --> C
J --> F
K[bpm-service] -.->|orchestrates| E
K -.->|orchestrates| I
K -.->|orchestrates| J
K -.->|orchestrates| F
L[knowledge-graph] -.->|queries| B
L -.->|queries| C
L -.->|queries| D
L -.->|queries| E
M[analytics-service] -.->|reads| B
M -.->|reads| C
M -.->|reads| D
M -.->|reads| E
M -.->|reads| F
N[admin-service] --> B
N --> C
N --> D
O[config-service]
B --> O
C --> O
D --> O
Legend: - Solid lines: Synchronous API calls (REST/GraphQL) - Dotted lines: Asynchronous operations (events, queries)
Technology Stack Modernization
Current State (Legacy Services)
| Component | Current Version | Status |
|---|---|---|
| Java | 11-17 (mixed) | Upgrade all to 17+ |
| Spring Boot | 2.x - 3.x (mixed) | Standardize on 3.2+ |
| PostgreSQL | 12-14 (mixed) | Upgrade to 15+ |
| Flyway | Various | Standardize on 9.x |
| RabbitMQ | 3.x | Consider event streaming |
| Elasticsearch | 7.x | Upgrade to 8.x |
| Camunda | 7.x | Evaluate Camunda 8 |
Target State (Nexgen Services)
| Component | Target Version | Rationale |
|---|---|---|
| Java | 17 LTS (migrate to 21 LTS later) | Long-term support, performance |
| Spring Boot | 3.2+ | Latest features, observability |
| PostgreSQL | 15+ | Performance, JSON improvements |
| Flyway | 9.x | Latest migration features |
| RabbitMQ/Kafka | Kafka 3.x (evaluate) | Event streaming, scalability |
| Elasticsearch | 8.x | Latest search capabilities |
| Camunda | 8.x (evaluate) | Cloud-native, improved performance |
| GraphQL | GraphQL Java 21+ | Federation, schema stitching |
| Observability | OpenTelemetry, Micrometer | Unified tracing/metrics |
Risk Assessment
High-Risk Areas
| Risk | Impact | Mitigation |
|---|---|---|
| Commerce Service Downtime | Revenue loss, customer impact | Blue-green deployment, feature flags, parallel run for 2-4 weeks |
| Data Migration Failures | Data loss, inconsistency | Comprehensive backups, rollback plan, data validation scripts |
| Broadcast Service Interruption | Live event failures | Parallel infrastructure, gradual cutover, fallback to legacy |
| Integration Breakage (Stripe, Dwolla, Mux) | Payment/streaming failures | Integration test suites, contract testing, vendor sandbox testing |
| Performance Degradation | User experience impact | Load testing, performance benchmarking, gradual traffic shifting |
| Team Bandwidth | Delayed timeline | Phased approach, dedicated migration team, external contractors |
Medium-Risk Areas
| Risk | Impact | Mitigation |
|---|---|---|
| BPM Process Migration | Workflow interruption | Process versioning, parallel execution, gradual migration |
| Auth/SSO Migration | Login failures | Keycloak session migration, SSO config validation, user communication |
| Notification Delivery | Missed communications | Queue monitoring, retry logic, fallback channels |
| Search Index Rebuild | Search unavailable | Offline indexing, gradual cutover, fallback to DB queries |
Success Metrics
Operational Metrics
| Metric | Current (Estimated) | Target | Measurement |
|---|---|---|---|
| Active Services | 107+ | 15 | Service count in ArgoCD |
| Deployment Frequency | Weekly (coordinated) | Daily (per service) | CI/CD metrics |
| Mean Time to Recovery | 2-4 hours | <30 minutes | Incident reports |
| Infrastructure Cost | Baseline | -40% | Cloud billing |
| Service Response Time (P95) | Varies (50ms-500ms) | <100ms | APM metrics |
| Developer Onboarding Time | 4-6 weeks | 1-2 weeks | HR metrics |
Business Metrics
| Metric | Current | Target | Measurement |
|---|---|---|---|
| Payment Success Rate | 95% | 99% | Commerce service metrics |
| Broadcast Uptime | 99% | 99.9% | Broadcast service SLA |
| Notification Delivery Rate | 90% | 98% | Notification service metrics |
| Search Response Time | 500ms | <100ms | Search service metrics |
Recommended Next Steps
Immediate Actions (Week 1-2)
- Socialize this analysis with engineering leadership
- Form migration tiger team (architects + senior engineers)
- Create detailed Phase 1 plan (config-service, identity-service, api-gateway)
- Set up nexgen monorepo structure in
/Users/proth/repos/peeq/nexgen - Define API contracts for first 3 services
- Establish observability baseline (metrics, tracing, logging)
Short-Term (Month 1)
- Implement config-service (Sprint 1-2)
- Begin identity-service consolidation (Sprint 2-4)
- Set up GraphQL gateway POC (Sprint 3-4)
- Create data migration playbooks
- Establish testing strategy (integration, contract, E2E)
- Archive first batch of 20 clearly deprecated repos
Medium-Term (Months 2-6)
- Complete Phase 1 (Foundation services)
- Complete Phase 2 (Low-risk services)
- Begin Phase 3 (Core domain services)
- Archive second batch of 30 deprecated repos
- Establish SRE practices for new services
Long-Term (Months 6-18)
- Complete Phase 3-5 (All services migrated)
- Complete Phase 6 (Decommission legacy)
- Archive final batch of 25 deprecated repos
- Knowledge transfer and documentation
- Celebrate migration success
Appendix A: Repository Categories
Services by Domain
Identity & Access (3): - keycloak, peeq-users, users
Profile Management (8): - athlete-manager, celebrity, fan, group-profile, org-manager, peeq-celebrity, peeq-fan, peeq-group-profile
Content & Media (10): - class-catalog, content, inventory, media, peeq-class-catalog, peeq-content, peeq-inventory, peeq-media, peeq-tags, tags
Broadcasting (6): - broadcast, peeq-broadcast, peeq-conference, peeq-conference-sse, peeq-stream, webinar
Shoutouts (2): - peeq-shoutout, shoutout
Events (2): - onsite-event, peeq-onsite-event
Commerce (8): - peeq-stripe, peeq-subscriptions, peeq-transaction, peeq-wallet, stripe, subscriptions, transaction, wallet
Notifications (11): - chat, email, message-board, notifications, peeq-email, peeq-message-board, peeq-notification-service, peeq-sms, peeq-sse, sms, sse
Analytics (2): - reporting, tracking
Knowledge/Search (2): - peeq-query, search
Journey (1): - journey
Appendix B: LOC Summary by Category
| Category | Active Services | Total LOC | Archive Candidates | Total LOC |
|---|---|---|---|---|
| Services | 42 | ~540,000 | 32 | ~690,000 |
| BPM | 8 | ~26,000 | 5 | ~10,000 |
| Frontend | 2 monorepos | ~969,000 | 7 | ~1,500,000 |
| Database | 0 | 0 | 30+ | ~30,000 |
| Infrastructure | 9 | ~292,000 | 1 | ~3,400 |
| Libraries | 1 | ~93,000 | 2 | ~8,000 |
| Other | 15 | ~200,000 | 15 | ~1,900,000 |
| TOTAL | 77 | ~2,120,000 | 92 | ~4,141,400 |
Grand Total: 169 repos analyzed (21 skipped: POCs, docs, memory-bank, etc.)
Total LOC in Workspace: ~6.3 million lines
Appendix C: Technology Distribution
| Technology | Active Repos | Archived Repos | Total |
|---|---|---|---|
| Java/Spring | 42 services + 8 BPM | 32 services + 5 BPM | 87 |
| Angular | 2 monorepos + 3 apps | 7 apps | 12 |
| Node.js | 5 | 3 | 8 |
| React | 2 | 1 | 3 |
| Next.js | 2 | 1 | 3 |
| Terraform | 2 | 1 | 3 |
| ArgoCD | 4 | 0 | 4 |
| Helm | 1 | 0 | 1 |
| Keycloak Themes | 3 | 1 | 4 |
| Other | 15 | 40 | 55 |
Appendix D: Archive Checklist
For each repository to be archived:
End of Analysis
This document provides a comprehensive roadmap for consolidating The Agile Network’s 190+ repositories into a modern, maintainable architecture. The phased approach balances risk, effort, and business value to achieve an 85% reduction in services over 18-20 months.