0

Proposed Alternative DOTNET Repository Layout

 2 years ago
source link: https://dev.to/sharpninja/proposed-alternative-dotnet-repository-layout-38cm
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Layout for GitHub Repo for Blazor Web App with API and shared Logic layer and server-side Data Layer.

I'm thinking that a directory layout for Solutions that represents the relationship of projects would be good. Also, pairing test projects with their library being tested.

Proposed Layout

๐Ÿ“„ .gitignore                // Global Git Ignore
๐Ÿ“„ README.md                 // README for entire repository
๐Ÿ“„ LICENSE                   // LICENSE for entire repository
๐Ÿ“„ nuget.config              // NuGet Configuration
๐Ÿ“‚ .github                   // Github config
  ๐Ÿ“‚ workflow                // Github Workflows
    ๐Ÿ“„ cd.yml                // Continuous Integration Pipeline
    ๐Ÿ“„ ci.yml                // Continuous Deployment Pipeline
๐Ÿ“‚ .idea                     // (hidden) Rider config
๐Ÿ“‚ .tools                    // Dependent Tooling
  ๐Ÿ“‚ Cake                    // Cake Build Tooling
๐Ÿ“‚ .vs                       // (hidden) Visual Studio Config
๐Ÿ“‚ .vscode                   // VS Code Config
  ๐Ÿ“„ settings.json           // VS Code Solution Settings
  ๐Ÿ“„ tasks.json              // VS Code Task Definitions
  ๐Ÿ“„ launch.json             // VS Code Launch Definitions
  ๐Ÿ“„ extensions.json         // VS Code Extension Recomendations
๐Ÿ“‚ _artifacts                // Built Artifacts
  ๐Ÿ“‚ npm                     // Built NPM Modules
  ๐Ÿ“‚ nuget                   // Built NuGet Packages
  ๐Ÿ“‚ other                   // Other Built Artifacts
๐Ÿ“‚ _build                    // Nuke or Cake
  ๐Ÿ“‚ .nuke                   // Nuke Project
    ๐Ÿ“„ Build.cs              // BUKE Targets
    ๐Ÿ“„ Build.csproj          // NUKE Build Project
๐Ÿ“‚ _cd                       // CD Config
  ๐Ÿ“„ nuke-cd.yml             // CD Config for NUKE
๐Ÿ“‚ _ci                       // CI Config
  ๐Ÿ“„ nuke-ci.yml             // CI Config for NUKE
๐Ÿ“‚ _lib                      // Loose dependencies
๐Ÿ“‚ _requirements             // Loose requirements docs
๐Ÿ“‚ _scripts                  // Loose PowerShell Scripts
  ๐Ÿ“„ publish.ps1             // Push artifacts to repositories
  ๐Ÿ“„ helpers.psm1            // PowerShell Module of helper functions
๐Ÿ“‚ MySolution                // Start of Visual Stduio Solution
  ๐Ÿ“„ Directory.Build.Props   // Global MSBuild Configuration
  ๐Ÿ“„ MySolution.sln          // Visual Studio Solution File
  ๐Ÿ“‚ Data
    ๐Ÿ“„ Directory.Build.Props // Data-Tier MSBuild Configuration
    ๐Ÿ“‚ _integration          // Data-Tier integration tests
    ๐Ÿ“‚ _sql                  // Loose SQL Scripts
    ๐Ÿ“‚ MyProject.Entities    // Project Grouping
      ๐Ÿ“‚ docs                // Markdown based generated and/or manual docs
        ๐Ÿ“‚ Generated         // Generated Documentation
          ๐Ÿ“‚ <metadata folder> // DocFx Generated
          ๐Ÿ“‚ api             // DocFx Generated
            ๐Ÿ“„ <namespace>.yml // DocFx Generated
            ๐Ÿ“„ <class>.yml   // DocFx Generated
          ๐Ÿ“„ toc.yml         // DocFx Generated
          ๐Ÿ“„ index.yml       // DocFx Generated
        ๐Ÿ“‚ Pages             // Hand-created Documentation
          ๐Ÿ“„ page_about.md   // Index for MyProject.Entities Docs
          ๐Ÿ“„ page_support.md // Index for MyProject.Entities Docs
        ๐Ÿ“„ docfx.json        // DocFx Configuration
        ๐Ÿ“„ index.md          // Index for MyProject.Entities Docs
      ๐Ÿ“‚ src                 // Library
        ๐Ÿ“‚ Entities          // POCO Entities
        ๐Ÿ“‚ Migrations        // Database Migrations
        ๐Ÿ“‚ Repositories      // Repositories or DbContexts
        ๐Ÿ“„ MyProject.Entities.csproj
      ๐Ÿ“‚ test                // Library Tests
        ๐Ÿ“‚ Data              // Test Data
        ๐Ÿ“‚ Mocking           // Mocking Objects
        ๐Ÿ“„ MyProject.Entities.Tests.csproj
  ๐Ÿ“‚ Logic
    ๐Ÿ“„ Directory.Build.Props // Logic-Tier MSBuild Configuration
    ๐Ÿ“‚ _integration          // Logic-Tier Integration Tests
    ๐Ÿ“‚ MyProject.Rules
      ๐Ÿ“‚ docs
        ๐Ÿ“‚ Generated         // Generated Documentation
          ๐Ÿ“‚ <metadata folder> // DocFx Generated
          ๐Ÿ“‚ api             // DocFx Generated
            ๐Ÿ“„ <namespace>.yml // DocFx Generated
            ๐Ÿ“„ <class>.yml   // DocFx Generated
          ๐Ÿ“„ toc.yml         // DocFx Generated
          ๐Ÿ“„ index.yml       // DocFx Generated
        ๐Ÿ“‚ Pages             // Hand-created Documentation
          ๐Ÿ“„ page_about.md   // Index for MyProject.Logic Docs
          ๐Ÿ“„ page_support.md // Index for MyProject.Logic Docs
        ๐Ÿ“„ docfx.json        // DocFx Configuration
        ๐Ÿ“„ index.md          // Index for MyProject.Logic Docs
      ๐Ÿ“‚ src
        ๐Ÿ“‚ Mapping           // Entities-to-Domain Models Mappings
        ๐Ÿ“‚ MVC               // Real MVC (see: )
          ๐Ÿ“‚ Controllers     // Controllers
          ๐Ÿ“‚ Models          // POCO Domain Models
        ๐Ÿ“„ MyProject.Rules.csproj
      ๐Ÿ“‚ test
        ๐Ÿ“„ MyProject.Rules.Tests.csproj
  ๐Ÿ“‚ Services
    ๐Ÿ“„ Directory.Build.Props // Services-Tier MSBuild Configuration
    ๐Ÿ“‚ _integration          // Services-Tier Integration Tests
    ๐Ÿ“‚ MyProject.Api
      ๐Ÿ“‚ docs
        ๐Ÿ“‚ Generated         // Generated Documentation
          ๐Ÿ“‚ <metadata folder> // DocFx Generated
          ๐Ÿ“‚ api             // DocFx Generated
            ๐Ÿ“„ <namespace>.yml // DocFx Generated
            ๐Ÿ“„ <class>.yml   // DocFx Generated
          ๐Ÿ“„ toc.yml         // DocFx Generated
          ๐Ÿ“„ index.yml       // DocFx Generated
        ๐Ÿ“‚ Pages             // Hand-created Documentation
          ๐Ÿ“„ page_about.md   // Index for MyProject.Api Docs
          ๐Ÿ“„ page_support.md // Index for MyProject.Api Docs
        ๐Ÿ“„ docfx.json        // DocFx Configuration
        ๐Ÿ“„ index.md          // Index for MyProject.Api Docs
      ๐Ÿ“‚ src
        ๐Ÿ“„ MyProject.Api.csproj
      ๐Ÿ“‚ test
        ๐Ÿ“„ MyProject.Api.Tests.csproj
  ๐Ÿ“‚ UI
    ๐Ÿ“„ Directory.Build.Props // UI-Tier MSBuild Configuration
    ๐Ÿ“‚ _assets               // Shared UI assets
      ๐Ÿ“‚ css                 // Shared Styling
      ๐Ÿ“‚ fonts               // Shared Fonts
      ๐Ÿ“‚ images              // Shared Images
      ๐Ÿ“‚ resources           // Shared Resource files
    ๐Ÿ“‚ _integration          // UI-Tier Integration Tests
    ๐Ÿ“‚ MyProject.Blazor
      ๐Ÿ“‚ docs
        ๐Ÿ“‚ Generated         // Generated Documentation
          ๐Ÿ“‚ <metadata folder> // DocFx Generated
          ๐Ÿ“‚ api             // DocFx Generated
            ๐Ÿ“„ <namespace>.yml // DocFx Generated
            ๐Ÿ“„ <class>.yml   // DocFx Generated
          ๐Ÿ“„ toc.yml         // DocFx Generated
          ๐Ÿ“„ index.yml       // DocFx Generated
        ๐Ÿ“‚ Pages             // Hand-created Documentation
          ๐Ÿ“„ page_about.md   // Index for MyProject.UI Docs
          ๐Ÿ“„ page_support.md // Index for MyProject.UI Docs
        ๐Ÿ“„ docfx.json        // DocFx Configuration
        ๐Ÿ“„ index.md          // Index for MyProject.UI Docs
      ๐Ÿ“‚ src
        ๐Ÿ“‚ wwwroot
        ๐Ÿ“„ MyProject.Blazor.csproj
      ๐Ÿ“‚ test
        ๐Ÿ“„ MyProject.Blazor.Test.csproj

Enter fullscreen mode

Exit fullscreen mode


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK