You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@shadow-dev/orm

Package Overview
Dependencies
Maintainers
0
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@shadow-dev/orm

Lightweight dynamic MySQL ORM designed for ShadowCore and modular apps.

1.0.2
latest
Source
npmnpm
Version published
Weekly downloads
108
-7.69%
Maintainers
0
Weekly downloads
 
Created
Source

ShadowORM

🧩 Lightweight, type-safe MySQL ORM for ShadowCore projects.
ShadowORM is built for modularity, security, and runtime schema sync ΓÇö perfect for bots, services, or web apps using ShadowCore.

npm version license

🔍 Overview

ShadowORM is a minimalist ORM that offers:

  • Γ£à Type-safe models using generics
  • Γ£à Automatic schema synchronization (no migration needed)
  • Γ£à JSON + Date normalization
  • Γ£à Relational support with foreign keys
  • Γ£à No decorators, no reflection, no magic

ItΓÇÖs designed to work cleanly alongside ShadowCore but can also be used standalone in any Node.js TypeScript project.

📦 Installation

npm install @shadow-dev/orm mysql2

🛠 Usage Example

import { Model, Repository, initDatabase, registerModel } from "@shadow-dev/orm";

const Ticket = new Model<{
  id: string;
  type: "support" | "report";
  data: { message: string };
  createdAt: Date;
}>("tickets", {
  id: "string",
  type: "string",
  data: "json",
  createdAt: "datetime"
});

initDatabase({
  host: "localhost",
  user: "root",
  password: "password",
  database: "mydb"
});

registerModel(Ticket);

// Auto-create table on startup
await syncSchema();

const tickets = new Repository(Ticket);


// Use it
await tickets.create({
  id: "ticket-001",
  type: "support",
  data: { message: "Help me!" },
  createdAt: new Date()
});

🧠 Schema Types

ShadowORM supports:

TypeSQL Equivalent
stringVARCHAR(255)
numberINT
booleanBOOLEAN
jsonLONGTEXT
datetimeDATETIME
FOREIGN_KEY:<tbl.col>Foreign key ref

🧱 Roadmap

  • CRUD repository
  • Relational schema support
  • Automatic schema sync
  • CLI (optional)
  • Migrations (optional)
  • Postgres support (maybe)

📖 Documentation

📚 Docs are coming soon and will be available on the ShadowCore documentation site:
➡️ docs.shadowdevelopment.net

🏢 Project Ownership

ShadowORM is officially developed and maintained under Shadow Development LLC.

📜 License

Licensed under the GNU General Public License v3.0
See the LICENSE file for details.

Keywords

orm

FAQs

Package last updated on 05 Aug 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.