Skip to content

Service Dependency Map

Overview

This document provides the authoritative dependency map for the SyRF monorepo, detailing all service and library dependencies. This is critical for understanding build requirements, CI/CD workflows, and impact analysis.

Primary Source

The complete dependency map is maintained in YAML format for machine readability:

File: docs/architecture/dependency-map.yaml

Quick Reference

Service Dependencies

Service Direct Library Dependencies Port Type
API SharedKernel, Mongo.Common, AppServices, WebHostConfig, API.Messages, PM.Core, PM.Messages, PM.Mongo.Data 8080 REST API
Project Management SharedKernel, Mongo.Common (via PM.Mongo.Data), AppServices, WebHostConfig, API.Messages, S3FileSavedNotifier.Messages, PM.Core, PM.Messages, PM.Mongo.Data 8081 DDD Service
Quartz WebHostConfig (SharedKernel transitively) 8082 Scheduler
Web None (Angular) 80 Frontend
S3 Notifier SharedKernel, WebHostConfig, PM.Messages, S3FileSavedNotifier.Messages N/A Lambda

Library Impact Analysis

Library Used By Impact of Changes
SharedKernel API, PM, Quartz (via WebHostConfig), Identity, S3-Notifier High - affects ALL .NET services
Mongo.Common API (direct), PM (via PM.Mongo.Data) Medium - database layer
WebHostConfig API, PM, Quartz, S3-Notifier Medium - web configuration
AppServices API, PM (hosts S3 file services since PR #2591) Medium - application layer
API.Messages API, PM Low - contracts only
PM.Messages PM, S3-Notifier Low - contracts only
PM Libraries (Core, Mongo.Data) PM, API (direct) Medium
S3 Messages S3 Notifier, PM Low - contracts only

Key Insights

Critical Libraries

  • SharedKernel is the most critical library - changes affect all .NET services
  • Mongo.Common is used by main services for database operations
  • No circular dependencies exist in the codebase

Independent Services

  • Web service (Angular) has no .NET dependencies
  • S3 Notifier is self-contained with minimal dependencies

Build Requirements

  • All .NET services except S3 Notifier require the full monorepo for Docker builds
  • This is due to MSBuild requirements for project references
  • Web service can build independently

Usage Guidelines

For CI/CD Workflows

Use the workflow_triggers paths from the YAML file to determine when to rebuild services.

For Docker Builds

Reference docker_context.required_paths to understand what files are needed for each service build.

For Impact Analysis

Before modifying a library, check the library_usage section to understand which services will be affected.

Validation

To validate the dependency map:

# Run the validation script
./scripts/validate-dependencies.sh

# Or validate YAML syntax
yamllint docs/architecture/dependency-map.yaml