Uranio is a type-safe ODM/ORM for MongoDB, MySQL, and PostgreSQL that generates query methods from TypeScript interfaces extending uranio.atom. Current stable version is 1.4.1. It eliminates the need for a separate Data Access Layer by parsing types at build time and creating a client with collection/table-specific methods. Key differentiators include full TypeScript type safety, support for multiple databases, minimal boilerplate, and peer dependencies only for the database drivers actually used. It supports connection pooling for MySQL and PostgreSQL, custom timezone configuration for MySQL, and works with MongoDB >=7.0, mysql2 >=3.16.0, and pg (PostgreSQL).
npm install uranioNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates setting up Uranio with MongoDB, defining a Product interface extending uranio.atom, creating a client, and performing basic CRUD operations.
Upgrade MongoDB to version 7.0 or later (npm install mongodb@7).
Update mysql2 to version 3.16.0 or newer (npm install mysql2@latest).
Call the function without 'new': const urn = uranio.MongoDBClient({...});Specify timezone: 'local' to use server timezone, or a specific offset like '+09:00'.
Check GitHub issues to confirm DynamoDB support status. It may be removed in future versions.
Run 'npm install uranio mongodb' (or appropriate driver) in your project.
Install the peer dependency: e.g., 'npm install mongodb' for MongoDB, 'npm install mysql2' for MySQL, 'npm install pg' for PostgreSQL.
Remove 'new': const urn = uranio.MongoDBClient({uri, dbName});