AntelopeJS
Hexagonal architecture, beyond your own code.
Docs · Quick start · Discord
If AntelopeJS saves you work, a ⭐ helps other developers find it.
The AntelopeJS framework (3:41). Contracts, providers you can swap, your own modules and one CLI.
https://github.com/user-attachments/assets/c632616c-e48d-4c7e-9306-22ad0f4a6351
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
- 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/rethinkdbimplement the same database contract.antelope.config.tschooses 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, anddestroysteps. - Hot reload in development.
ajs project dev --watchreloads a changed module without restarting the others. - One CLI.
ajscreates projects and modules, adds providers, runs tests, and builds and starts the application. A host application can also embed the runtime throughcreateRuntime.
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.
Install
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
Quick start
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
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.
Documentation
- Introduction: why the same boundaries matter across your application and its dependencies
- Quick start: create and run your first project
- Architecture: contracts, implementations, and application assembly
- Interfaces and modules: define and implement a capability
- Configuration: select module sources and configure providers
- CLI cheat sheet: every
ajscommand - Interface catalog: the official contracts and their implementations
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
Requirements
This package requires Node.js ^20.19.0 || >=22.12.0.