HIGH VOLTAGE. LOW BOILERPLATE.
Voltage is a collection of NestJS packages developed by VOLTA. The packages share a common design philosophy but are independent — adopt any subset without taking on the rest.
The primary use case is server-rendered web applications: JSX renders to HTML on the server, HTMX handles partial updates, and Alpine.js covers local state. Most infrastructure packages — logging, database, session, email, CLI, passcode — have no opinion on how you render responses and work equally well in a plain API.
Quick start
Section titled “Quick start”Start with a standard NestJS project, then install the core packages:
yarn add @nestjs/platform-express @voltage/event-manager @voltage/async-context @voltage/logger @voltage/zod zodRegister them in your root module:
import { Module } from '@nestjs/common';import { EventManagerModule } from '@voltage/event-manager';import { AsyncContextModule } from '@voltage/async-context';import { LoggerModule } from '@voltage/logger';
@Module({ imports: [ EventManagerModule.forRoot(), AsyncContextModule.forRoot(), LoggerModule.register({ application: 'my-app', level: 'info' }), ],})export class AppModule {}Wire the logger into NestJS in main.ts:
import { NestFactory } from '@nestjs/core';import { NestExpressApplication } from '@nestjs/platform-express';import { LoggerFacade } from '@voltage/logger';import { AppModule } from './app.module';
async function bootstrap() { const app = await NestFactory.create<NestExpressApplication>(AppModule, { bufferLogs: true, });
app.useLogger(app.get(LoggerFacade)); app.flushLogs(); app.enableShutdownHooks();
await app.listen(3000);}
void bootstrap();From here, add packages as your application needs them — each one has its own installation and registration instructions.