Back to Features

Entity-First Architecture

Shift your focus from schema management to domain modeling. In Vadyl, you define Entities—rich objects with behavior, validation, and relationships. Vadyl automatically maps these entities to the optimal underlying storage, whether it's a document store, a relational table, or a key-value cache. Refactor your infrastructure without rewriting your business logic.

2x
Dev Speed
-80%
Refactor
example.ts
const Order = vadyl.entity("Order", {
  items: type.array(OrderItem),
  total: type.money(),
  
  // Business logic attached to entity
  async process() {
    if (this.total > 1000) await this.flagForReview();
    await this.charge();
  }
});

Key Benefits

Domain-Driven

Entities encapsulate logic, validation, and data.

Storage Agnostic

Swap DBs by changing a config, not code.

Auto-Typing

Full TypeScript definitions generated from entities.

Real-World Use Cases

Rapid Iteration

Start with a simple JSON store and graduate to SQL seamlessly.

Ready to try Entity-First Architecture?

Start building with Vadyl today and experience the difference.