Skip to content

About

TypeScript framework extending hexagonal architecture across your application and its ecosystem through explicit contracts and replaceable modules.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

27 stars

Watchers

2 watching

Forks

Latest commit

 

History

435 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

A hexagon labelled your code is surrounded by database, email, auth, payment, storage and queue providers. The database provider changes from mongodb to postgres and the storage provider from local to S3, while your code stays the same. Caption: Hexagonal architecture, beyond your own code.

AntelopeJS

Hexagonal architecture, beyond your own code.

GitHub stars npm License Discord Docs

Docs · Quick start · Discord

AntelopeJS is a TypeScript framework and CLI for Node.js applications. It extends the ports-and-adapters model from your own code to the modules you install: business modules depend on contracts, provider modules implement them, and the application picks which provider runs. The open-source back office AntelopeJS DMS is built on it.

Why AntelopeJS

In antelope.config.ts the MongoDB provider is replaced by the PostgreSQL provider, and the source files orders, customers, billing and routes are marked unchanged. Caption: Swap the provider. Keep your code.

  • Contracts, not imports. A module imports interface packages such as @antelopejs/interface-database, never another module's files.
  • Providers you can swap. @antelopejs/postgres, @antelopejs/mongodb, and @antelopejs/rethinkdb implement the same database contract. antelope.config.ts chooses one, from npm, Git, or a local folder.
  • A runtime that wires them. The core binds every interface to its provider, queues calls until the provider is ready, and runs each module's construct, start, stop, and destroy steps.
  • Hot reload in development. ajs project dev --watch reloads a changed module without restarting the others.
  • One CLI. ajs creates projects and modules, adds providers, runs tests, and builds and starts the application. A host application can also embed the runtime through createRuntime.

A replacement provider leaves consuming code unchanged only when it supports the contract version and behavior that code relies on. You still handle its configuration, credentials, and data migrations.

Screen recording from the AntelopeJS framework film. In antelope.config.ts the nodemailer provider is replaced by brevo, git diff --stat reports 1 file changed, and the project's source files stay unchanged.

Quick start

A terminal creates a project with the AntelopeJS CLI and starts it in development mode with watch. The modules start, and the next step adds a provider. Caption: One CLI. From init to dev.

Create a project with a first module, then run it in development mode. Inside a project that lists @antelopejs/core as a dependency, npx runs that installed copy:

npx @antelopejs/core project init my-app --template blank-typescript --pm pnpm --no-git-init
cd my-app
npx @antelopejs/core project dev --watch

Leave out the flags to choose a template interactively. Templates are named by slug, for example blank-typescript and dms-demo.

Add a provider for an interface your module uses. ajs project modules install adds one for every interface that no module implements yet:

npx @antelopejs/core project modules add @antelopejs/mongodb
npx @antelopejs/core project modules install
Install the CLI globally

The Node.js versions AntelopeJS supports are the engines field of its package.json. Run npm view @antelopejs/core engines to read them for a published release. There is nothing to install first: the quick start below runs the CLI with npx. To get the ajs command on your PATH, install the CLI globally:

pnpm add -g @antelopejs/core

Documentation

Plugins and agent skills

Plugins

Official plugins add command groups to ajs and ship as separate global packages:

Command Package Purpose
ajs dms @antelopejs/dms-frontend Develop, build, and deploy the DMS frontend

When a plugin is missing, ajs offers to install it with the package manager that installed the CLI. ajs plugins lists the official plugins. ajs update updates the CLI and every official plugin installed globally.

Agent skills

@antelopejs/core ships the framework's agent skills in skills/, declared under antelopeJs.skills: antelopejs (the mental model and router), ajs-cli, ajs-consume-interface, and ajs-author-interface. Each project gets the skills of the core version it installs. The AntelopeJS agent skills sync links them into a project's .claude/skills/ and .agents/skills/, as it does for every skill a package ships. The DMS assistant (@antelopejs/dms-ai) loads them on its own.

Ecosystem

Business modules depend on the contracts below, and the application chooses which provider implements each one.

Area Contracts Providers
API interface-api · interface-api-util · interface-data-api api
Auth interface-auth auth-jwt
Database interface-database · interface-database-decorators · interface-database-catalog · interface-mongodb · interface-rethinkdb postgres · mongodb · rethinkdb
Redis interface-redis · interface-redis-scheduler redis
Email interface-email nodemailer · brevo
File storage interface-file-storage file-storage-local · file-storage-s3
Payments interface-payment · interface-subscriptions · interface-stripe stripe · mollie · checkout-com · payment-subscriptions

Star history

AntelopeJS stars over time

If AntelopeJS saves you work, a ⭐ helps other developers find it.

Compatibility

Package Supported Tested with
@antelopejs/interface-core >=0.4.0 <0.5.0 0.4.0

The engines field of package.json holds the supported Node.js range. The contract that @antelopejs/core implements is @antelopejs/interface-core, whose range the table above lists.

Contributing

Read CONTRIBUTING.md before you open a pull request. The local checks are:

pnpm install
pnpm lint
pnpm test

License

Apache-2.0

Requirements

This package requires Node.js ^20.19.0 || >=22.12.0.

About

TypeScript framework extending hexagonal architecture across your application and its ecosystem through explicit contracts and replaceable modules.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

27 stars

Watchers

2 watching

Forks

Releases

Used by

Contributors

Languages