File structure

A simple description of the file structure of my ORM and ORM-CLI

ORM:

  • context - a folder where most of the application's logic resides, divided into subfolders, each handling a small part of the application's logic, most of which will be invoked from data-source-context.ts.

  • core - a folder containing interfaces, constants, and other shared data for the entire application.

  • decorators - a folder containing all decorators.

  • strategies - a folder containing database strategies, in our case, Postgres and MySQL.

  • utils - reusable code snippets that have been separated from the main application logic.

  • database-manager.ts - the entry point to the application.

ORM-CLI:

  • common - shared data.

  • managers - a folder containing the migration manager.

  • strategies - a folder containing database strategies, in our case, Postgres and MySQL.

  • cli.ts - a file that configures and manages database connections, migrations, and initialization via the command line.

Last updated