Skip to content

ttoohey/yadah

Repository files navigation

Yadah

Yet another data abstraction helper.

Yadah is a framework providing an opinionated foundation for building services following a domain-driven design.

In this framework, a typical service consists of a number of layers:

  • front-ends
  • domains
  • subsystems
            +-------+      +------------+   +-------+
FRONTENDS   |  API  |      | Background |   |  CLI  |
            +-------+      +------------+   +-------+
                |                 |             |
                |                 |             |
            +---------------------------------------------------------+
DOMAINS     |                                                         |
            +---------------------------------------------------------+
                |                  |               |              |
                |                  |               |              |
            +----------+   +---------------+   +--------+   +---------+
SUBSYTEMS   | database |   | message queue |   | pubsub |   | storage |
            +----------+   +---------------+   +--------+   +---------+

A typical service is organised as a mono-repository containing a data package where subsystems and domains are defined, and separate packages for each front-end. A front-end is typically a thin wrapper around the domains

Domains implement the business logic of the service. A typical pattern is to define database models, and construct a domain class around each model.

The types of front-ends and subsystems a service uses is dependant on the requirements of that service.

Build

npm install
# or
npm run build

For automatic re-builds:

npm start

Run unit tests

npm test

Or, for individual packages

npm run -- workspace:data-manager test
npm run -- workspace:data-manager test --watch

About

Yet another database abstraction helper

Resources

Stars

Watchers

Forks

Packages

No packages published