Experimental
Skip to content

Module Overview ​

NexusTS ships 33 independent packages under the @nexusts/* namespace. Each is a separate entry point — you only install what you import.

Core ​

PackageDescription
@nexusts/coreMVC + DI + routing + validation + view. The framework core.
@nexusts/clinx command runner. Scaffolding, generators, REPL, route inspector.

Database ​

PackageDescription
@nexusts/drizzleDefault ORM. 5 dialects (postgres, mysql, sqlite, bun-sqlite, d1). Migrations, seeding Factory<T>, DrizzleModel, DrizzleRepository.
@nexusts/kyselyTyped SQL query builder. KyselyService, KyselyRepository (Lucid-style), KyselyModule.forRoot(). Built-in Migrator. All Kysely dialects.

API & Communication ​

PackageDescription
@nexusts/graphqlSDL-first + code-first GraphQL endpoint. @Resolver/@Query/@Mutation/@Arg decorators. autoSchema: true for SDL synthesis.
@nexusts/grpcReflection-based gRPC server + typed client. All 4 call types: unary, server-stream, client-stream, bidi.
@nexusts/wsWebSocket gateway with room management and broadcasting.
@nexusts/sseServer-Sent Events support.
@nexusts/openapiOpenAPI 3.1 spec generation + Scalar UI.

Resilience ​

PackageDescription
@nexusts/resilienceRetry (4 backoff strategies) + Circuit Breaker + Bulkhead. Cross-pod stores (Redis/Drizzle/Memory). HTTP admin API. Zero new dependencies.
@nexusts/feature-flagCanary / A/B testing. isEnabled(flag, ctx), rollout %, allowlist/denylist. @FeatureFlag() guard decorator.

Frontend ​

PackageDescription
@nexusts/viewView engines: Inertia.js v3 (React/Vue SPA + SSR), Rendu, Edge (Adonis-style), Eta (EJS-style).

Auth & Security ​

PackageDescription
@nexusts/authbetter-auth integration.
@nexusts/shieldCSRF + HSTS + CSP + X-Frame-Options + Referrer-Policy + CORS guard.
@nexusts/limiterRate limiting. 3 strategies × memory / Drizzle storage.
@nexusts/sessionSession management. Memory / Drizzle / Redis backends.

Observability ​

PackageDescription
@nexusts/loggerStructured logging (Pino).
@nexusts/metricsPrometheus metrics.
@nexusts/tracingOpenTelemetry tracing.

Infrastructure ​

PackageDescription
@nexusts/cacheApplication cache. Memory (LRU) / Drizzle / Redis backends. Tag invalidation.
@nexusts/configEnvironment-aware configuration with Zod schemas.
@nexusts/cryptoAES-256-GCM encryption + HMAC + scrypt/argon2 hashing. Single APP_KEY for all operations.
@nexusts/driveFile storage abstraction. Memory / Local / S3 / R2 drivers.
@nexusts/eventsEvent emitter + listener decorators (@OnEvent).
@nexusts/healthHealth check endpoints.
@nexusts/i18nInternationalization. Intl-based date/number/currency formatting. JSON message catalogs.
@nexusts/mailOutbound email. Null / File / SMTP transports. MJML rendering.
@nexusts/queueJob queue. BullMQ / Redis backends.
@nexusts/redisRuntime-aware Redis client (Bun / Workers KV).
@nexusts/scheduleCron / Interval / Timeout scheduler. In-tree cron parser, zero deps.
@nexusts/staticStatic file serving with ETag, Range, path-traversal protection.
@nexusts/uploadFile upload helper.

Details ​

PackageDescription
@nexusts/drizzleDrizzle ORM wrapper. 5 dialects, migrations, seeding, DrizzleModel, DrizzleRepository.
@nexusts/grpcgRPC server + typed client. Reflection-based, loads .proto at runtime.
@nexusts/graphqlGraphQL endpoint. SDL-first + code-first (autoSchema: true). In-bundle GraphiQL.

Released under the MIT License.