Skip to content

Instantly share code, notes, and snippets.

@BlackDante
Created July 17, 2025 18:08
Show Gist options
  • Save BlackDante/89f85ce288466e2117e87930ae4fb80d to your computer and use it in GitHub Desktop.
Save BlackDante/89f85ce288466e2117e87930ae4fb80d to your computer and use it in GitHub Desktop.
I need to understand the domain architecture of this legacy codebase. Please analyze the following:
1. **Bounded Context Identification:**
- Scan through the codebase and identify distinct business areas based on:
* Package/namespace organization
* Class naming patterns and responsibilities
* Data model clusters (entities that frequently interact)
* Business logic concentration points
- For each potential bounded context, explain:
* What business capability it seems to handle
* Key entities and value objects within it
* Main business rules you can identify
* Level of coupling with other areas
2. **Context Relationships Analysis:**
- Map how different contexts interact:
* Shared databases or data structures
* Direct code dependencies between contexts
* API calls or service boundaries
* Event publishing/subscribing patterns
- Identify potential relationship patterns (Customer-Supplier, Shared Kernel, etc.)
- Flag any concerning tight coupling or circular dependencies
3. **Domain Language Extraction:**
- List domain-specific terms used in each context
- Identify where the same term means different things in different contexts
- Point out inconsistent naming or concepts that might indicate unclear boundaries
4. **Technical Debt Hotspots:**
- Highlight areas where business logic is scattered across multiple layers
- Identify anemic domain models or transaction script patterns
- Flag complex interdependencies that might indicate missing abstractions
5. **Context Map Visualization:**
- Create a Mermaid diagram showing the relationships between bounded contexts
- Use exact names from the codebase (package names, module names, service names)
- Show relationship types with appropriate arrows and labels
- Include shared kernels, databases, or external systems
Please provide your analysis in a structured format with specific code references where possible. I'll use this as a starting point for discussions with domain experts to validate and refine the understanding.
Focus on /src directory and prioritize business logic over infrastructure code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment