Skip to content

bbfodor/oxnest

Repository files navigation

Oxnest

CI status: experimental Powered by Oxc License: MIT

A lightweight NestJS starter template powered by the Oxidation Compiler. It features a modern, high-performance toolchain built around Rust. Everything comes preconfigured out of the box, so you can start building right away.

Why?

The Nest CLI produces new projects with a slow and outdated toolchain by default. Oxnest swaps that chain for state-of-the-art tooling based on Rust:

Default Nest starter Oxnest
Linting ESLint + plugins oxlint
Formatting Prettier oxfmt
Testing Jest Vitest (+Oxc)
Transform tsc Oxc / SWC

The result: near-instant lint & format feedback with dramatically quicker test runs, all driven by a fast current-generation compiler core. It is absolutely plug-and-play with zero setup on your part.

Note

This template is in early development and uses SWC in the build pipeline for now, as the Nest CLI does not provide a native Oxc builder currently.

Prerequisites

Use the Oxc extension in VS Code (or forks) to enable linting and format-on-save in your IDE (can be customized in settings.json). You may need to point the extension to your Node binary when using a version manager (eg. fnm, nvm) like so:

// User Settings JSON
{
    "oxc.path.node": "<path_to_your_node_bin>",
}

Quick start

pnpm install
pnpm run start:dev

The app listens on port 3000 by default (override via the PORT env variable).

Main scripts

Script Description
start Start the Nest server
test Run all unit tests
test:e2e Run all E2E tests
lint Perform linting with auto-fix
fmt Format the codebase

Project layout

src/          Application code
test/         Unit (*.test.ts) and e2e (*.test.e2e.ts) tests

Path aliases

  • @src -> ./src
  • @test -> ./test

See CONTRIBUTING.md - Path aliases for how to edit aliases.

Tests

Auto test file generation is disabled in nest-cli.json. This is a deliberate choice to not litter the src dir with test files. You should add tests manually in the test/ folder while mimicking the src folder structure.

See CONTRIBUTING.md - Tests for general best practices.

Use as a template

Clone this repo or use GitHub's Use this template feature as a starting point for your next project.

Dependabot & dependency updates

Routine dependency updates are batched weekly with a 7-day delay, so newly published versions have time to surface issues before they land here. Security fixes are not delayed. See CONTRIBUTING.md - Dependency updates for how this works with pnpm.

Contributing

See CONTRIBUTING.md for development setup and general guidelines.

License

MIT -- see LICENSE.