{"id":20340912,"url":"https://github.com/leancodepl/corelibrary","last_synced_at":"2026-04-01T18:36:43.209Z","repository":{"id":38347499,"uuid":"263623863","full_name":"leancodepl/corelibrary","owner":"leancodepl","description":"Our core framework for building backend services. ","archived":false,"fork":false,"pushed_at":"2026-03-16T17:26:39.000Z","size":4494,"stargazers_count":30,"open_issues_count":18,"forks_count":4,"subscribers_count":4,"default_branch":"v10.0-preview","last_synced_at":"2026-03-17T21:37:35.248Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://leancode.co","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leancodepl.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-05-13T12:30:16.000Z","updated_at":"2026-03-05T15:48:49.000Z","dependencies_parsed_at":"2022-08-09T03:01:46.190Z","dependency_job_id":"f80add51-50aa-4c0b-9413-e9b0d60451c7","html_url":"https://github.com/leancodepl/corelibrary","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/leancodepl/corelibrary","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leancodepl%2Fcorelibrary","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leancodepl%2Fcorelibrary/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leancodepl%2Fcorelibrary/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leancodepl%2Fcorelibrary/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leancodepl","download_url":"https://codeload.github.com/leancodepl/corelibrary/tar.gz/refs/heads/v10.0-preview","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leancodepl%2Fcorelibrary/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30639032,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-18T00:09:27.587Z","status":"ssl_error","status_checked_at":"2026-03-18T00:09:26.123Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-14T21:24:37.801Z","updated_at":"2026-04-01T18:36:43.191Z","avatar_url":"https://github.com/leancodepl.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LeanCode CoreLibrary\n\n![Corelibrary Build \u0026 Publish](https://github.com/leancodepl/corelibrary/workflows/Corelibrary%20Build%20\u0026%20Publish/badge.svg)\n![Nuget](https://img.shields.io/nuget/vpre/LeanCode.Components)\n![Feedz](https://img.shields.io/feedz/v/leancode/public/LeanCode.Components)\n[![codecov](https://codecov.io/gh/leancodepl/corelibrary/branch/v5.0/graph/badge.svg?token=ROFNA3WTTD)](https://codecov.io/gh/leancodepl/corelibrary)\n[![License](https://img.shields.io/badge/License-Apache_2.0-green.svg)](https://www.apache.org/licenses/LICENSE-2.0)\n\nThe LeanCode Core Library is a set of helper libraries developed at [our company](https://leancode.co/) that aids our day-to-day development. Not only does it serve as a facilitator in our day-to-day coding activities, but it also encapsulates comprehensive guidelines, gathers our collective knowledge on application architecture and development best practices.\n\nOur primary objective is to provide a definitive and opinionated framework tailored for .NET Core application development. Within this framework, we've standardized various facets of application design and implementation:\n\n* **CQRS (Command Query Responsibility Segregation) and CQRS-as-API:** Establishing conventions and practices for implementing CQRS patterns and their representation through APIs.\n\n* **Domain-Driven Design (DDD) Models:** Defining foundational DDD models and integrating them within the broader framework.\n\n* **Integrations with External Services:** Pre-defined integrations and guidelines for interfacing with external services, ensuring consistency and reliability.\n\n* **Additional Functionalities:** Including features such as handling audit logs, facilitating force updates, and localization.\n\n* **Tests:** Helpers dedicated to aiding and improving the process of writing and executing tests.\n\nWhile embodying the attributes of a framework, LeanCode Core Library aligns closely with the ASP.NET Core model, emphasizing modularity and minimal intrusion into the application codebase.\n\n## Documentation\n\nCoreLibrary documentation is available [here](https://leancode-corelibrary.readthedocs.io/).\n\n## Versioning\n\nCoreLib version is tricky. Since it is mostly used internally by us at LeanCode, we're not really following [Semantic Versioning](http://semver.org). Instead, we decide which version is considered stable but maintained, which one is under active development and which one is out of support. There will also be versions that are unmaintained and should be no longer used. There are some vague rules on how we decide what state particular version is in:\n\n 1. If there are projects that are not actively worked on, it is maintained but not actively developed,\n 2. If it is based on old (out of support) .NET Core version, it is unmaintained,\n 3. If the version is used by active projects only, it is under active development.\n\nAdditionally, there are some rules regarding versioning itself and changes to the version number:\n\n 1. Since v5, CoreLib major version is the same as .NET major version,\n 2. Minor version is used as a major version,\n 3. If CoreLib version is stable, we can't introduce breaking changes without changing version,\n 4. We allow breaking changes between minor (major) versions,\n 5. If CoreLib version is under active development, we can introduce breaking changes without version bump,\n 6. A single CoreLib version cannot be both stable and under active development,\n 7. There is a small period of time after new CoreLib version is released when we allow all kinds of breakages (i.e. .NET Core bumps if we release during preview window).\n\n## Library versions\n\nAll of the libraries that are part of the CoreLib are versioned together and require **exact** version of other libraries. This simplifies versioning substantially but at the expense of flexibility.\n\n## Supported versions\n\nHere is the list of available major versions of the library (as of 2024-08-16):\n\n| CoreLib | .NET Core | Under development | Stable     | Notes             |\n|---------|-----------|-------------------|------------|-------------------|\n| v3.4    | 2.2       |                   |            | Not published     |\n| v4.1    | 3.1       |                   |            | Unmaintained      |\n| v4.2    | 3.1       |                   |            | Unmaintained      |\n| v5.0    | 5.0       |                   |            | Unmaintained      |\n| v5.1    | 5.0       |                   |            | Unmaintained      |\n| v6.0    | 6.0       |                   |            | Unmaintained      |\n| v6.1    | 6.0       |                   |            | Unmaintained      |\n| v7.0    | 7.0       |                   |            | Unmaintained      |\n| v8.0    | 8.0       |                   |            | Unmaintained      |\n| v8.1    | 8.0       |                   | \u0026#x2714;   |                   |\n| v9.0    | 9.0       | \u0026#x2714;          |            |                   |\n\n## Building \u0026 Testing\n\n### Building\n\n```sh\ndotnet build\n```\n\n#### Release version\n\nIf you want to build release configuration of the library, you need to specify what version the output package will have. That can be done with `VERSION` environment variable or by passing `VERSION` as MSBuild parameter to the `build` command. CI also specifies `GIT_COMMIT` that is appended to `InformationalVersion` property of the assemblies to mark exact source code.\n\n### Testing\n\nThe framework can be unit-tested by running the following command in the root of the repository:\n\n```sh\ndotnet test\n```\n\nMoreover, there are some integration-style tests that require external services. They can be tested with `docker` and `docker-compose` tools. Currently there is one integration-test suite:\n\n 1. `test/LeanCode.IntegrationTests`,\n\nIt has a `docker` folder that contains necessary configuration. You can run the suite using:\n\n```sh\n# For running tests with SQL Server\n$ DB=sqlserver docker-compose run test\n# For running tests with PostgreSQL\n$ DB=postgres docker-compose run test\n```\n\n### Publishing\n\nAfter successful test, packages can be packed with\n\n```sh\ndotnet pack -c Release -o $PWD/publish\n```\n\nand then published to NuGet feed with\n\n```sh\ndotnet nuget push 'publish/*.nupkg'\n```\n\nprovided that API Key is correctly specified in profile/machine `NuGet.Config`.\n\n## Project structure\n\n### Root structure\n\nThe project is divided into the main directories:\n\n 1. `src` with the source code,\n 2. `test` with test,\n 3. `docs` with this documentation.\n\nPlus there are some files in the root directory (SLN, config files \u0026 READMEs).\n\n#### Source code structure\n\nThe `src` folder that contains the main source code is then divided into:\n\n 1. `Core` - the bootstrapping part of the CoreLib,\n 2. `Domain` - domain model-related projects,\n 3. `Infrastructure` - infrastructure-related projects,\n 4. `Helpers` - really small helper projects,\n 5. `Testing` - testing helpers (e.g. integration tests),\n 6. `Tools` - projects that enhance build-time (e.g. contracts gen, .NET Core analyzers).\n\n`test` folder follows `str` structure closely.\n\n### Build system\n\nCoreLib build system mostly MSBuild-based, with some help of CI system to orchestrate build/test/publish process (see [Building \u0026 Testing](./building_and_testing.md) for more details).\n\nWe leverage [Central Package Management]'s `Directory.Packages.props` files to centrally manage dependency versions. It is forbidden to directly specify `Version` in `csproj`s.\n\nBesides `.targets` file, we use central `Directory.Build.props` to manage some of the project properties. Check [/Directory.Build.props], [/src/Directory.Build.props] and [/test/Directory.Build.props] what is being centrally set.\n\n### Creating new packages\n\nCreating new packages (that will be published to the feed) is simple. You just have to:\n\n1. Create new .NET CoreLibrary project in the correct location,\n2. Remove `TargetFramework` since it is managed externally.\n\nOr you can just modify the following project template (most of the projects use this):\n\n```xml\n\u003cProject Sdk=\"Microsoft.NET.Sdk\"\u003e\n\n\u003c/Project\u003e\n```\n[Central Package Management]: https://learn.microsoft.com/en-us/nuget/consume-packages/central-package-management\n[/Directory.Build.props]: https://github.com/leancodepl/corelibrary/blob/HEAD/Directory.Build.props\n[/src/Directory.Build.props]: https://github.com/leancodepl/corelibrary/blob/HEAD/src/Directory.Build.props\n[/test/Directory.Build.props]: https://github.com/leancodepl/corelibrary/blob/HEAD/test/Directory.Build.props\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleancodepl%2Fcorelibrary","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleancodepl%2Fcorelibrary","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleancodepl%2Fcorelibrary/lists"}