# ent/ent

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/ent-ent).**

16,927 stars · 1,004 forks · Go · apache-2.0

## Links

- GitHub: https://github.com/ent/ent
- Homepage: https://entgo.io
- awesome-repositories: https://awesome-repositories.com/repository/ent-ent.md

## Topics

`ent` `entity-framework` `orm`

## Description

Ent is a statically typed entity framework for Go that models database structures as a graph of nodes and edges. It functions as a code generation engine that transforms schema definitions into type-safe database clients, query builders, and migration scripts. By representing data as interconnected entities, the framework enables intuitive traversal of complex relationships and ensures that database interactions remain consistent with the application model at compile time.

The framework distinguishes itself through its graph-based approach to data modeling and its reliance on compile-time code generation to enforce type safety. It automates the synchronization of database schemas with application models, providing tools to manage versioned migrations and validate structural integrity before changes are applied. Developers can customize the generation pipeline using templates to tailor the output to specific infrastructure requirements.

Beyond core modeling and generation, the project provides a comprehensive suite of tools for managing the data lifecycle. This includes automated API development for GraphQL, cursor-based pagination for large datasets, and built-in mechanisms for auditing data changes. The system also optimizes data retrieval by automating the loading of related entities, reducing the need for manual query management.

## Tags

### Data & Databases

- [Database ORMs](https://awesome-repositories.com/f/data-databases/database-orms.md) — Provides a statically typed entity framework for Go that manages relational schemas via graph-based modeling.
- [Database Schema Migrations](https://awesome-repositories.com/f/data-databases/database-management-systems/database-systems-management/database-management/database-schema-migrations.md) — Automates the synchronization of database schemas with application models using versioned migration scripts.
- [Graph Data Models](https://awesome-repositories.com/f/data-databases/graph-data-models.md) — Models database entities as nodes and edges to enable intuitive traversal of complex data structures.
- [Schema Migration Tools](https://awesome-repositories.com/f/data-databases/schema-migration-tools.md) — Synchronizes database structures with application models using versioned SQL files and integrity validation.
- [Type-Safe Database Clients](https://awesome-repositories.com/f/data-databases/type-safe-database-clients.md) — Transforms schema definitions into type-safe database clients, CRUD builders, and migration scripts. ([source](https://entgo.io/docs/code-gen))
- [Data Schema Definitions](https://awesome-repositories.com/f/data-databases/data-schema-definitions.md) — Uses statically typed objects to define database entities and relationships as the source of truth for code generation. ([source](https://entgo.io/docs/code-gen))
- [Graph Querying](https://awesome-repositories.com/f/data-databases/graph-querying.md) — Enables querying complex relationships by navigating connected entities and edges. ([source](https://entgo.io/docs/getting-started))
- [GraphQL API Generators](https://awesome-repositories.com/f/data-databases/data-access-querying/database-apis/graphql-api-generators.md) — Automatically derives GraphQL schemas and resolvers directly from defined data models. ([source](https://entgo.io/docs/graphql))
- [Fluent Query Builders](https://awesome-repositories.com/f/data-databases/fluent-query-builders.md) — Provides a chainable, type-safe API for constructing complex database queries and navigating relationships.
- [Entity Relationship Models](https://awesome-repositories.com/f/data-databases/object-relational-mappers/data-modeling/entity-relationship-models.md) — Manages complex entity associations including one-to-many and many-to-many relationships with bidirectional navigation. ([source](https://entgo.io/docs/getting-started))
- [Schema Synchronization Tools](https://awesome-repositories.com/f/data-databases/schema-synchronization-tools.md) — Automatically aligns database tables and columns with defined entity schemas. ([source](https://entgo.io/docs/tutorial-setup))
- [Type-Safe Query Builders](https://awesome-repositories.com/f/data-databases/type-safe-query-builders.md) — Enforces compile-time type safety for database queries based on defined entity schemas. ([source](https://entgo.io/))
- [Database Transactions](https://awesome-repositories.com/f/data-databases/database-transactions.md) — Wraps database mutations in atomic transactions to ensure data integrity across complex operations. ([source](https://entgo.io/docs/graphql))
- [Database Schema Constraints](https://awesome-repositories.com/f/data-databases/database-schema-constraints.md) — Enforces indexes and unique constraints within entity definitions to ensure data integrity and performance. ([source](https://entgo.io/docs/schema-def))
- [Migration Generation](https://awesome-repositories.com/f/data-databases/migration-generation.md) — Generates schema update scripts from entity definitions for manual review or offline application. ([source](https://entgo.io/docs/migrate))
- [Enumeration Types](https://awesome-repositories.com/f/data-databases/data-governance-modeling/data-modeling-schemas/data-schemas/enumeration-types.md) — Automatically maps custom database values to typed schema constants for consistent data handling. ([source](https://entgo.io/docs/graphql))
- [JSON Processors](https://awesome-repositories.com/f/data-databases/json-processors.md) — Maps JSON database columns into typed structures for atomic updates and complex filtering. ([source](https://entgo.io/blog/))

### Software Engineering & Architecture

- [Compile-Time Code Generation](https://awesome-repositories.com/f/software-engineering-architecture/compile-time-code-generation.md) — Generates type-safe database accessors and builders at compile time from schema definitions.

### Web Development

- [Eager Loading Engines](https://awesome-repositories.com/f/web-development/data-fetching-optimizers/eager-loading-engines.md) — Optimizes data retrieval by automating the loading of related entities to reduce database round-trips. ([source](https://entgo.io/docs/graphql))
- [Cursor-Based Pagination](https://awesome-repositories.com/f/web-development/cursor-based-pagination.md) — Implements cursor-based pagination and global node identification for efficient navigation of large datasets. ([source](https://entgo.io/docs/graphql))
- [Cursor Pagination](https://awesome-repositories.com/f/web-development/cursor-pagination.md) — Standardizes API responses using cursor-based pagination and global node identification for consistent data navigation.

### Development Tools & Productivity

- [Code Generation Pipelines](https://awesome-repositories.com/f/development-tools-productivity/code-generation-pipelines.md) — Provides automated pipelines for injecting custom logic and dependencies into the code generation process. ([source](https://entgo.io/docs/code-gen/))

### Security & Cryptography

- [Entity Audit Logs](https://awesome-repositories.com/f/security-cryptography/compliance-and-audit-tools/entity-audit-logs.md) — Records historical changes to entities in dedicated audit tables to maintain a complete event history. ([source](https://entgo.io/blog/))
