Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/twinlogix/typetta
Node.js ORM written in TypeScript for type lovers.
https://github.com/twinlogix/typetta
graphql javascript mariadb mongodb mongodb-orm mssql mysql nodejs orm postgresql sql sqllite3 sqlserver typescript typing
Last synced: 6 days ago
JSON representation
Node.js ORM written in TypeScript for type lovers.
- Host: GitHub
- URL: https://github.com/twinlogix/typetta
- Owner: twinlogix
- License: apache-2.0
- Created: 2021-11-15T14:47:43.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2024-10-23T07:26:26.000Z (2 months ago)
- Last Synced: 2024-10-24T17:20:07.549Z (2 months ago)
- Topics: graphql, javascript, mariadb, mongodb, mongodb-orm, mssql, mysql, nodejs, orm, postgresql, sql, sqllite3, sqlserver, typescript, typing
- Language: TypeScript
- Homepage: https://twinlogix.github.io/typetta/
- Size: 11.4 MB
- Stars: 108
- Watchers: 3
- Forks: 4
- Open Issues: 50
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
Typetta is an **open-source ORM** written in TypeScript that aims to allow seamless access to data in a typed fashion to all **main SQL databases** (MySQL, PostgreSQL, Microsoft SQL Server, SQLLite3, CockroachDB, MariaDB, Oracle e Amazon Redshift) and also to the NoSQL database **MongoDB**.
Typetta is pluggable into any TypeScript backend (including serverless applications and microservices) but in terms of gain we totally suggest using it in all **GraphQL** backends, because... because we simply love GraphQL.
## How do I use Typetta?
With Typetta everything revolves around the *data model*, the entities that describe the application domain and all underlying relationships between them. This model is described in standard GraphQL, using all basic concepts (scalars, types, enumerations, etc...) and some custom directives.Starting from the model output of the domain analysis, Typetta provides a range of code generators for:
- Type definitions in TypeScript language for each entity in the model.
- Data Access Object (aka DAO) for each entity type that has a corresponding data source. Each DAO is an object that the developer can also query with advanced CRUD operations.
- An Entity Manager where the developer can configure each data source and retrieve the reference of any DAO.
- A completely auto-generated GraphQL Endpoint with advanced CRUD operations to access and modify data.
## Main Functionalities
Below is a brief description of what makes Typetta awesome:
- Complete support of main SQL databases and also MongoDB.
- Multiple databases, including the ability to cross query different databases.
- Multiple connections and connection pooling.
- Entity relationships: 1-1, 1-n, n-m.
- Dynamic typing and corresponding data projections.
- Pagination.
- Can be extended using middlewares.
- Customised scalars and serialisation of the database.
- Autogenerated IDs.
- Validation rules.
- Virtual, computed and calculated fields.
- Aggregation queries.
- Ability to build custom queries.
- Define data access security policies.
- Embedded documents supported on MongoDB as well as SQL.
- Automated code generation.
- Effortless integration with GraphQL backends.
- Optional automated GraphQL Endpoint generation for CRUD operations.
- Transactions.
- Logging.
- Mocking.
- Auditing.
- Multi-tenancy partitioning.
- Soft-delete.## Why Typetta?
Typetta fulfills the need of having a typed ORM connected to SQL and NoSQL databases designed with **productivity** and **flexibility** in mind.
The philosophy behind Typetta components has been to ensure ease of use and optimisation of development time, adding complexity (with direct access to data source) only when strictly needed.
In case you are still unsure, why use Typetta instead of other ORMs?
- It's the ONLY TypeScript ORM that has full support for **SQL and MongoDB databases**.
- A very **strict typing** system that 100% leverages TypeScript in providing types as responses based on the requested data type.
- Using standard **GraphQL** as data modeling language opens the door to a whole set of instruments and third party tools.