Mansart is the persistence layer of the Vidocq ecosystem. It implements Jakarta Data 1.0 (declarative repositories) and Jakarta Persistence 3.2 (JPA), alongside a Jakarta Transactions 2.0 transaction manager and a virtual-thread-native JDBC connection pool. Four decoupled bricks, a single SQL dialect SPI, static APT + Class-File API code generation — no runtime reflection, no dynamic proxy.

Origin of the name

Jules Hardouin-Mansart (1646-1708), First Architect to King Louis XIV. He designed the Hall of Mirrors at Versailles, the Invalides dome, the Place Vendôme, the Grand Trianon. He led the Royal Academy of Architecture, codified the architectural orders, negotiated with masons and sculptors. His work has stood for three centuries because every piece was designed to fit into the next, and decoration was never confused with structure.

The Mansart persistence layer applies the same separation: the foundation of an information system is invisible, yet it carries everything else. See the Wikipedia entry.

At a glance

Specs implemented

Jakarta Data 1.0 + Jakarta Persistence 3.2 (M7 pending) + Jakarta Transactions 2.0

Repository

codeberg.org/Vidocq/mansart

Java

25 (LTS)

JPMS modules

io.vidocq.mansart.data, io.vidocq.mansart.pool, io.vidocq.mansart.transactions, io.vidocq.mansart.persistence

Runtime dependencies

Jakarta specs only (jakarta.data-api, jakarta.persistence-api, jakarta.transaction-api, jakarta.inject-api, jakarta.cdi-api). JDBC in the JDK. Drivers provided.

Threading

Virtual threads everywhere — no platform pool, transaction propagation via ScopedValue.

Codegen

APT (metamodel, *RepositoryImpl) + Class-File API (Connection proxy). Zero runtime reflection, zero ASM/Byte Buddy.

TCK

✅ Jakarta Data 1.0 73/73 (M7) — see detailed status. Jakarta Transactions 2.0 — smoke 5/5; full suite in M6c.

Sub-modules

Mansart breaks down into four runtime-independent sub-projects, organized as layers:

Sub-module Role Dedicated page

mansart-pool

Virtual-thread-native JDBC pool, zero-dep, alternative to HikariCP.

mansart-pool

mansart-transactions

Jakarta Transactions 2.0 transaction manager (TransactionManager, UserTransaction, @Transactional).

mansart-transactions

mansart-jakarta-data

Jakarta Data 1.0 implementation — repositories, query methods, JDQL, JDBC dialects (H2, PostgreSQL).

mansart-jakarta-data

mansart-persistence (M7 pending)

Jakarta Persistence 3.2 (classic JPA) implementation. Under design — mansart-jakarta-data already covers everyday needs in Vidocq.

mansart-persistence

Layered architecture

Diagram

Each layer can be used independently: mansart-pool is a standalone DataSource, mansart-transactions does not know about Jakarta Data, and mansart-jakarta-data works without the Mansart pool if the application supplies its own.

Position in the ecosystem

flowchart LR
    VIDOCQ[xref:vidocq::index.adoc[Vidocq Runtime]] --> MANSART[Mansart]
    VAUBAN[xref:vauban::index.adoc[Vauban CDI]] -.@Repository.-> MANSART
    VAUBAN -.@Transactional.-> MANSART
    MANSART --> JDK[Java 25 JDBC]

Vauban provides the CDI bootstrap (BCE) that discovers @Repository interfaces and turns them into @ApplicationScoped beans, plus the @Transactional interceptor. Vidocq Runtime orchestrates packaging and startup.