The core of Appweaver, the AI-first Node.js framework for backends built with agents.
Description
@appweaver/core is the runtime of every Appweaver application, with neither a server nor a database:
- Modules – the application is assembled from module manifests: the npm packages declaring an
appweaver.modulefield (@appweaver/data,@appweaver/web, the drivers), the localsrc/modules/*/module.ts, and the paths ofapp.modules. A driver is selected by name in itsproviderkey,autoby default. - Application –
createApp, the lifecycle hooks (onInit,onReady,onShutdown,onDestroy), the health listener of the applications without a server, andweaver runtasks. - Dependency injection –
define,inject,injectServiceandisDefined, the auth user context withrunAs, and the transaction scope withafterCommit. - In-process drivers – the memory, the cache, the queue, the node events, the
localfile storage and thejsonmailer, withEmailService, the locale service and the template registration.
The database, the resources and the auth data model are in @appweaver/data,
the HTTP server in @appweaver/web, and the drivers in
@appweaver/redis, @appweaver/bullmq, @appweaver/cron, @appweaver/nodemailer, @appweaver/handlebars and
@appweaver/sharp.
Installation
New projects are best created with @appweaver/create,
which installs this package along with the weaver CLI. To add it by hand:
npm install @appweaver/core @appweaver/common @appweaver/cli
npm install -D typescript
Usage
// src/main.ts
import { createApp } from '@appweaver/core';
import { logger } from '@appweaver/common';
createApp().catch((err) => logger.error(err));
Documentation
- Appweaver README – getting started, configuration, and the overview of every package
- Agent skill – the complete framework reference shipped to every scaffolded project
License
Appweaver is MIT licensed.