AgentSkillsCN

overview-repository-structure

仓储结构概览——解决方案的组织方式(Src、Test、Docker、Docs)、项目依赖关系、文件夹约定以及代码库的导航方式。若想深入了解仓储的布局结构,可从这里开始。关键词:仓储结构、解决方案组织、项目组织、代码库导航、文件夹结构、项目依赖、技能、概览、DRN、框架、测试、DDD、架构

SKILL.md
--- frontmatter
name: overview-repository-structure
description: Repository structure overview - Solution organization (Src, Test, Docker, Docs), project dependencies, folder conventions, and codebase navigation. Start here for understanding the repository layout. Keywords: repository-structure, solution-organization, project-organization, codebase-navigation, folder-structure, project-dependencies, skills, overview, drn, framework, testing, ddd, architecture

DRN-Project Repository Structure

Complete reference for repository organization, solution structure, and project dependencies.

When to Apply

  • Navigating the codebase for the first time
  • Understanding project relationships and dependencies
  • Locating specific functionality across the repository
  • Setting up development environment

Repository Layout (Physical)

The physical directory structure separates source code, documentation, and agent resources.

code
DRN-Project/
├── .agent/                    # Agent skills and workflows
│   ├── rules/                 # DiSCOS rules
│   └── skills/                # Expert skills (this directory)
├── .github/workflows/         # CI/CD workflows
├── DiSCOS/                    # Distinguished Secure Cognitive OS documentation
├── Docker/                    # Container definitions (Postgre, Graylog, RabbitMQ)
│
├── DRN.Framework.*/           # Framework packages (Physical folders in root)
├── DRN.Nexus.*/               # Nexus microservice hub (Physical folders in root)
├── Sample.*/                  # Sample DDD application (Physical folders in root)
├── DRN.Test.*/                # Test projects (Physical folders in root)
│
├── DRN.slnx                   # Solution file (defines logical structure)
├── docker-compose.yml         # Global compose for all services
└── README.md                  # Project documentation

Solution Structure (Logical)

The .slnx solution file organizes the flat physical project list into logical Solution Folders for better navigation in IDEs.

Solution FolderPurposeContains Projects
/Src/Framework/Reusable packagesDRN.Framework.* (SharedKernel, Utils, Hosting, etc.)
/Src/Nexus/Service mesh hubDRN.Nexus.* (Application, Domain, Hosted, etc.)
/Src/Sample/Reference implementationSample.* (Application, Domain, Hosted, etc.)
/Test/All test projectsDRN.Test.* (Unit, Integration, Performance)
/Docker/InfrastructureCompose files for Postgre, Graylog, RabbitMQ
/Docs/DocumentationLICENSE, README, ROADMAP, SECURITY
/Items/Configuration.gitignore, .agent rules, GitHub workflows

Framework Package Hierarchy

mermaid
graph TD
    SK[DRN.Framework.SharedKernel] --> U[DRN.Framework.Utils]
    U --> H[DRN.Framework.Hosting]
    U --> EF[DRN.Framework.EntityFramework]
    H --> T[DRN.Framework.Testing]
    EF --> T
    U --> J[DRN.Framework.Jobs]
    U --> MT[DRN.Framework.MassTransit]
    
    style SK fill:#e1f5fe
    style U fill:#b3e5fc
    style H fill:#4fc3f7
    style EF fill:#4fc3f7
    style T fill:#0288d1

Dependency Order (bottom to top):

  1. SharedKernel - No external DRN dependencies (lightweight)
  2. Utils - Depends on SharedKernel
  3. Hosting / EntityFramework - Depend on Utils
  4. Testing - Depends on Hosting + EntityFramework

Sample Application Tiers

LayerProjectResponsibility
PresentationSample.HostedRazor Pages, Controllers, API, Frontend build
ApplicationSample.ApplicationUse cases, orchestration, DTOs
DomainSample.DomainEntities, Aggregates, Domain Events
InfrastructureSample.InfraDbContexts, Repositories, External services
ContractSample.ContractShared DTOs, Events, API contracts
UtilsSample.UtilsCross-cutting utilities

See: overview-ddd-architecture.md


Project Dependencies (Sample)

code
Sample.Hosted
├── Sample.Application
├── Sample.Infra
│   ├── Sample.Domain (entities, aggregates)
│   └── Sample.Contract (DTOs, events)
└── DRN.Framework.Hosting
    └── DRN.Framework.Utils
        └── DRN.Framework.SharedKernel

Key Configuration Files

FilePurposeLocation
appsettings.jsonRuntime configuration*/appsettings.json
vite.config.jsFrontend buildSample.Hosted/
tsconfig.jsonTypeScript configSample.Hosted/
docker-compose.ymlLocal dependenciesRoot + Docker/*/
DRN.slnxSolution definitionRoot

CI/CD Workflows

WorkflowTriggerActions
develop.ymlPush to developBuild, Test, SonarCloud
master.ymlPush to masterBuild, Test, SonarCloud
release.ymlTag pushBuild, Test, NuGet publish, Docker push
release-preview.ymlPreview tagPreview NuGet publish

Common Development Commands

bash
# Build solution
dotnet build DRN.slnx

# Run tests
dotnet test DRN.slnx

# Run Sample.Hosted
dotnet run --project Sample.Hosted

# Start dependencies
docker compose -f Docker/Postgre/docker-compose.yml up -d

# Frontend build (Sample.Hosted)
cd Sample.Hosted && npm run build

Related Skills