Skip to content

Lakutata Overview ​

Lakutata is an IoC application framework for Node.js and TypeScript. It gives web services, CLI tools, desktop (Electron) applications and embedded devices one programming model: an application is a tree of objects (components, providers, controllers) that a container creates. DTOs validate their options and inputs, and transports expose the controllers: HTTP (Express, Fastify), CLI (Commander), service RPC (HTTP, Socket.IO, JSON-RPC 2.0, gRPC, NATS, Electron IPC), schedules and message queues. One controller method can serve all of them at once.

The package lakutata re-exports the @lakutata/* packages under its subpaths (see the table below) and presets two components in every application: log (the Logger, which writes pino-compatible JSON lines) and entrypoint (the Entrypoint that serves the controllers).

Where to start ​

GettingStarted creates a first project from a template and shows a first application; ProjectStructure describes the files of a project; the guides below cover each part of the framework.

The subpaths ​

SubpathWhat it provides
lakutataApplication, Component, Provider, BaseObject, Container, DTO, Exception, Time, isPackaged, resourcesPath, the validation messages
lakutata/decorator/di@Inject, @Configurable, @Autoload, @Singleton, @Scoped, @Transient, @Lifetime
lakutata/decorator/dto@Expect, @Accept, @Return, @IndexSignature
lakutata/decorator/asst@Before, @After
lakutata/dtosPaginationSearchDTO, PaginationResultDTO, paginator, FlexibleDTO, the JSON Schema conversion
lakutata/com/entrypointEntrypoint, buildEntrypoints, Controller, the contexts, Result, the access control, the middlewares, httpServiceEntrypoint, scheduleEntrypoint
lakutata/decorator/ctrl@HTTPAction, @GET…@OPTIONS, @CLIAction, @ServiceAction, @Schedule, @Prefix, @UseMiddlewares
lakutata/adapter/express, lakutata/adapter/fastifyThe HTTP transports
lakutata/adapter/commanderThe CLI transport
lakutata/adapter/socket.io, lakutata/adapter/jsonrpc, lakutata/adapter/electronThe service transports
lakutata/com/loggerThe Logger component, preset as log (pino-compatible JSON lines)
lakutata/orm, lakutata/decorator/ormTypeORM and its decorators
lakutata/com/database, lakutata/provider/databaseThe Database component and provider
lakutata/com/cacherThe Cacher component
lakutata/com/mutexThe Mutex component, @Synchronized
lakutata/com/queueThe Queue component, @QueueAction, queueEntrypoint
lakutata/com/i18nThe I18n component, the Translator, the language middleware
lakutata/com/dockerThe Docker component
lakutata/com/containerdThe Containerd component
lakutata/com/monitorCPU, memory, event loop and HTTP monitors
lakutata/security, lakutata/provider/passwordHashHashing, ciphers, signatures, the PasswordHash provider
lakutata/utilsThe helper functions

Not part of this package: @lakutata/cli (the lakutata command for creating projects, running migrations and packing applications, see Command), @lakutata/grpc (a gRPC client, server and service transport), @lakutata/nats (a NATS component and service transport), @lakutata/dbus (D-Bus) and @lakutata/mcp (the Model Context Protocol).

The guides ​

GuideTopic
GettingStartedRequirements, creating a project, adding Lakutata to an existing project, a first application
ProjectStructureThe files, scripts and features of the projects made from the templates, and templates of your own
ApplicationThe application: its options, the fluent API, the lifecycle, the mode, packed applications
ObjectsComponents, providers and their container: lifetimes, scopes, creation and teardown, a container without an application
InjectionDependency injection, the options of objects, sharing features between applications
DTOValidationDTOs and schemas: validating options, inputs and results
ExceptionsDeclaring exceptions, their messages, what the clients receive, the exceptions of the framework
LoggerThe log component: writing lines, readable lines or JSON, destinations, another logger
DecoratorThe decorators, by subpath
TimeThe Time class
HelperFunctionsThe helper functions of lakutata/utils
ControllersControllers and actions: their addresses, input and results, prefixes, inheritance
EntrypointThe entrypoint component: its options and adapters, starting and stopping, the list of the actions
MiddlewaresThe middlewares and the access control of the actions
HTTPThe HTTP adapters: routes, input, responses, errors, the features of Express and Fastify
CLICommand line tools: commands, options, prompts, output and exit codes
ServiceCallsThe service actions over HTTP, Socket.IO, JSON-RPC 2.0 and Electron: patterns, responses, clients and their events
GRPCThe service actions over gRPC (@lakutata/grpc), and calling them from other applications and languages
NATSThe NATS component, the service actions over NATS (@lakutata/nats), the service proxies and their events
SchedulesScheduled jobs: intervals, cron expressions, jobs run by one instance
QueueThe message queues: producers, @QueueAction consumers, retries, dead letters, results
DatabaseThe Database component and provider, the connection options, several databases
DatabaseDriversThe database drivers, one by one: what to install, their options, their limits
MongoEmbeddedA MongoDB inside the application, its documents in files
EntitiesThe entities, the queries, the transactions and the errors
MigrationsWriting, generating and running the migrations
CacheThe Cacher component: wrap(), the stores and their tiers, what they keep
MutexLocks shared between processes and instances
I18nMessages in several languages
DockerIntegrationThe Docker component
ContainerdIntegrationThe Containerd component
MonitorThe CPU, memory, event loop and HTTP request monitors
SecurityHashing, ciphers, signatures, passwords
DBusA D-Bus service and client (@lakutata/dbus): methods, objects, properties, signals
MCPThe tools, resources and prompts of the Model Context Protocol (@lakutata/mcp), over stdio and HTTP
CommandThe lakutata command: creating projects, workspaces, migrations, translations, environment variables
PackagingBundles, executables and installers, and what a packed application reads at run time

Each @lakutata/* package has its own README, and the type declarations of every subpath document each export with an example.

Released under the MIT License.