> For the complete documentation index, see [llms.txt](https://stricjs.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://stricjs.gitbook.io/docs/basic/intro.md).

# Intro

Welcome to Stric documentation

Stric is a Bun-first framework for building high-performance, scalable web applications.

### Features

* **Perfomance**: Internally use `Radx`, an improved version of `@medley/router` with optimizations only for Bun. Stric also composes your final fetch handler to reduce unused code.
* **Scalability**: Stric ensures high performance even under heavy workloads.
* **Minimal**: The basic components like `@stricjs/router` and `@stricjs/utils` is under 50kB and use no external dependencies.
* **Customizable**: Stric comes with a plugin system, dependencies injection and more optional optimizations for handling requests.

### Performance

Stric is one of the fastest JS web frameworks. See the full benchmark [here](https://github.com/bunsvr/benchmark/blob/main/results/index.md).

{% embed url="<https://gist.github.com/aquapi/ec3bcae3c0f6ca84309c908d0f51fcc7>" %}
A benchmark of Bun, Node and Deno frameworks
{% endembed %}

### Quick Start

You need to have Bun installed to run Stric.

For Windows users, you can use WSL or WSL2 to install Bun.

```bash
# Linux, MacOS and WSL 
curl -fsSL https://bun.sh/install | bash 

# NPM
npm install -g bun

# Homebrew
brew tap oven-sh/bun
brew install bun

# Docker
docker pull oven/bun
docker run --rm --init --ulimit memlock=-1:-1 oven/bun

# Proto
proto install bun
```

Create a new project and install the router component.

```bash
# Create an empty Bun project
bun init

# Install @stricjs/router
bun add @stricjs/router
```

Let's write a simple hello world server.

{% code title="index.ts" overflow="wrap" fullWidth="false" %}

```typescript
import { Router } from '@stricjs/router';

export default new Router()
    .get('/', () => new Response('Hello world!')); 
```

{% endcode %}

Start the server using `bun index.ts`, open your browser and go to [localhost:3000](http://localhost:3000).\
You should see the server responds with `Hi`.

Just like that, you have created your first app with Stric :tada:.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://stricjs.gitbook.io/docs/basic/intro.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
