@trifrost/core
Version:
Blazingly fast, runtime-agnostic server framework for modern edge and node environments
111 lines (77 loc) โข 5.61 kB
Markdown
# TriFrost
[](LICENSE)
[](https://app.fossa.com/projects/git%2Bgithub.com%2Ftrifrost-js%2Fcore?ref=badge_shield&issueType=license)
[](https://app.fossa.com/projects/git%2Bgithub.com%2Ftrifrost-js%2Fcore?ref=badge_shield&issueType=security)
[](https://codecov.io/gh/trifrost-js/core)
[](https://github.com/trifrost-js/core/actions/workflows/ci.yml)
[](https://github.com/trifrost-js/core/actions/workflows/github-code-scanning/codeql)
[](https://www.npmjs.com/package/@trifrost/core)
[](https://www.npmjs.com/package/@trifrost/core)
**TriFrost** is a blazing-fast, runtime-agnostic server framework built for the modern JavaScript ecosystem โ from low-latency edge environments to traditional backend infrastructure.
Whether you're deploying to Node.js, Bun, or Cloudflare Workers, TriFrost provides a unified API and internal architecture that adapts to the runtime โ without compromising on performance, developer experience, or clarity.
## โจ Why TriFrost?
TriFrost is the result of deep experience across frameworks, runtimes, and production systems. It combines:
- ๐งฉ **Koa-like composability** โ build with middleware thatโs small, explicit, and powerful
- โก **High performance** โ with zero-cost abstractions and extremely efficient internals ([see benchmark](https://www.trifrost.dev/news/blog/hello_world_benchmark_trifrost))
- ๐ **Edge-native** โ designed from the ground up to support Workers, Bun, and other emerging runtimes
- ๐ **Observability-first** โ tracing and structured logging are core to the architecture
Unlike many frameworks, TriFrost doesn't bind itself to Node-specific APIs or assume a single deployment model. Itโs truly runtime-flexible, **write once, run anywhere**.
For a deeper read:
- [What is TriFrost](https://www.trifrost.dev/docs/what-is-trifrost)
- [Why TriFrost?](https://www.trifrost.dev/news/blog/why_trifrost_exists)
## ๐ 1.0.0 โ Stable and Ready
TriFrost v1.0.0 marks the first **stable release**, with a production-ready core and a fully typed public API surface.
- โ
Finalized runtime contract (Node, Bun, Workerd, Cloudflare)
- โ
Stable context, routing, and middleware layers
- โ
Full test coverage and CI/CD hardening
- โ
Built-in logger with structured telemetry + OpenTelemetry support
- โ
Clean internal design with runtime adaptation and zero runtime bloat
- โ
JSX-native request handlers (opt-in, fully typed)
> If you've been waiting to try TriFrost in production โ this is the version to start with.
> If you want to play games ๐ฎ check out [Atomic Arcade](https://arcade.trifrost.dev), a mini arcade powered by [TriFrost Atomic](https://www.trifrost.dev/docs/jsx-atomic)
## ๐ฆ Quickstart
TriFrost has a [starter CLI](https://github.com/trifrost-js/create-trifrost) available via `npm create` / `bun create`:
```bash
# npm
npm create trifrost@latest
# bun
bun create trifrost@latest
```
Itโll scaffold a project in under 60 seconds with routing, logging, and runtime setup built-in.
View the [doc page for more info](https://www.trifrost.dev/docs/cli-quickstart).
## ๐ฆ From Scratch
You can also start from first principles. See the [Hello World example](https://www.trifrost.dev/docs/hello-world-example) to build step-by-step with only the core package.
## ๐ง Core Principles
TriFrost is built on these foundations:
- ๐ง **No magic**: You should be able to trace exactly how requests are routed and handled
- ๐งฑ **Lean by default**: No unnecessary dependencies, no bloat
- ๐งพ **Typed end-to-end**: Full TypeScript support with strong generics and inference
- ๐งฌ **Runtime-adaptable**: Internals are modular, composable, and runtime-aware
For a full view read [Core Principles](https://www.trifrost.dev/docs/core-principles).
## ๐ ๏ธ API Docs
Full documentation for core modules, types, and runtime behavior is available on [trifrost.dev/docs](https://www.trifrost.dev/docs)
## ๐ Resources
- ๐งโ๐ป GitHub: [trifrost-js/core](https://github.com/trifrost-js/core)
- ๐ฆ npm: [@trifrost/core](https://www.npmjs.com/package/@trifrost/core)
- ๐ Website: [trifrost.dev](https://trifrost.dev/)
- ๐ค CLI: [Creation CLI](https://github.com/trifrost-js/create-trifrost)
- ๐ฌ Discord: [Join the community](https://discord.gg/e9zTXmtBG8)
## ๐ค Contributing
TriFrost is open to contributions and collaboration.
- ๐ ๏ธ See [open issues](https://github.com/trifrost-js/core/issues)
- ๐ฌ Join [discussions](https://github.com/trifrost-js/core/discussions)
- ๐งช Run tests with `npm run test` or check coverage via `npm run test:coverage`
All code is modern TypeScript. **Performance and type safety are first-class concerns, and PRs are reviewed fast**.
## ๐ค Authors
Created and maintained by:
- [Peter Vermeulen](https://github.com/peterver)
With love from the [Atomic](https://arcade.trifrost.dev) systems team.