# Tim-Maes/Facet

Generate DTOs, mappings, constructors and LINQ projections from your domain models.

Repository: https://github.com/Tim-Maes/Facet
Canonical: https://ross.abutalabs.com/products/tim-maes-facet
Language: C#
License: MIT
License Family: permissive
Topics: facet, generator, mapper, mapping, model, object, source
Last push: 2026-08-25T07:50:30+00:00

## Health v2 (maintenance only)
Score: 78/100 (v2, computed 2026-09-03T02:39:23.370411+00:00)
- activity 99, release rhythm 75, longevity 35
- inputs: {"age_days": 498, "days_push": 8, "days_rel": 85, "gap_med": 0, "n_releases_24m": 172}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1204, forks 52 (observed 2026-08-28T04:03:58.761355+00:00)

## What it is
Facet is a C# source generator that eliminates DTO boilerplate by generating DTO types, constructors, LINQ projections, and reverse mappings from domain models at compile time. It supports classes, records, structs, nested mapping, custom mapping configurations, and preserves XML docs and validation attributes with zero runtime overhead.

## Use cases
- generate DTOs from domain models without boilerplate
- create LINQ projections for efficient database queries
- map domain models to API response models
- exclude sensitive fields from public API models
- generate reverse mappings from DTOs back to domain models
- create admin and public views of the same entity

## When to choose
- you write lots of manual DTO and mapping code in C#/.NET
- you want compile-time generation with zero runtime reflection overhead
- you need multiple projections of the same domain model for different audiences
- you use EF Core and want efficient query projections

## When to avoid
- you are not on the .NET/C# ecosystem
- you prefer runtime mapping libraries like AutoMapper with dynamic configuration
- your project does not use source generators or Roslyn

## Facets
- artifact type: library
- maturity: active
- function: serialization, developer-tools
- domain: backend, web-development, developer-tools
- platform: dotnet, cross-platform
- tags: source-generator, dto, object-mapping, linq-projection, compile-time, csharp, boilerplate-elimination

## Member repositories
- Tim-Maes/Facet (main) score 78

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:58.761355+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:19:38.558270+00:00, confidence not recorded.
  - readme: https://github.com/Tim-Maes/Facet (fetched 2026-08-28T04:03:58.761355+00:00, sha 5046e2f0d346)
- Data as of 2026-08-30T08:39:29.467469+00:00.
