Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 22 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<p align="center">
<a href="https://open-next.js.org">
<a href="https://opennext.js.org">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="docs/public/logo-dark.svg">
<img alt="OpenNext" src="docs/public/logo-light.svg" width="300" />
Expand All @@ -8,21 +8,22 @@
</p>
<p align="center">
<a href="https://sst.dev/discord"><img alt="Discord" src="https://img.shields.io/discord/983865673656705025?style=flat-square" /></a>
<a href="https://www.npmjs.com/package/open-next"><img alt="npm" src="https://img.shields.io/npm/v/open-next.svg?style=flat-square" /></a>
<a href="https://www.npmjs.com/package/@opennextjs/aws"><img alt="npm" src="https://img.shields.io/npm/v/@opennextjs/aws.svg?style=flat-square" /></a>
</p>

---

<p align="center">
<a href="https://open-next.js.org/">Docs</a> |
<a href="#example">Example</a>
<a style="font-size: 2.5rem;font-weight:bold;" href="https://open-next.js.org/aws">Docs</a>
</p>

OpenNext takes the Next.js build output and converts it into a package that can be deployed to any functions as a service platform.
## Description

OpenNext takes the Next.js build output and converts it into packages that can be deployed across a variety of environments. Natively OpenNext has support for AWS Lambda, and classic Node.js Server.

## Features

OpenNext aims to support all Next.js 14 features. Some features are work in progress. Please open a [new issue](/issues/new) to let us know!
OpenNext aims to support all Next.js 14 features. Some features are work in progress. If you are running into any problems make sure to check the [docs](https://opennext.js.org/aws) first before you open a [new issue](/issues/new) or visit our [Discord](https://discord.gg/AWyhAu8q) to let us know!

- [x] App & Pages Router
- [x] API routes
Expand All @@ -31,17 +32,16 @@ OpenNext aims to support all Next.js 14 features. Some features are work in prog
- [x] Server-side rendering (SSR)
- [x] Incremental static regeneration (ISR)
- [x] Middleware
- [x] Server actions
- [x] Image optimization
- [x] [NextAuth.js](https://next-auth.js.org)
- [x] Running at edge
- [x] No cold start
- [x] Almost no coldstart

## Who is using OpenNext?

[Gymshark UK](https://uk.gymshark.com), [Udacity](https://engineering.udacity.com/deploying-next-js-on-the-edge-with-sst-is-sst-the-game-changer-its-claimed-to-be-1f05a0abc27c), [TUDN](https://www.tudn.com), [NHS England](https://github.com/nhs-england-tools/terraform-aws-opennext)



## Example

In the `example` folder, you can find a Next.js benchmark app. It contains a variety of pages that each test a single Next.js feature. The app is deployed to both Vercel and AWS using [SST](https://docs.sst.dev/start/nextjs).
Expand All @@ -52,11 +52,18 @@ Vercel link: https://open-next.vercel.app

## Configuration

### Environment variables
### Configuration file

For personalisation you need to create a file `open-next.config.ts` at the same place as your `next.config.js`, and export a default object that satisfies the `OpenNextConfig` interface. It is possible to not have an open-next.config.ts file, the default configuration will then be applied automatically.

### Debug mode

OpenNext can be executed in debug mode by setting the environment variable `OPEN_NEXT_DEBUG=true` before your build.

This will output A LOT of additional logs to the console. This also disable minifying in esbuild, and add source maps to the output. This can result in code that might be up to 2-3X larger than the production build. Do **not** enable this in production.

You can read more about the configuration in the [docs](https://opennext.js.org/aws/config)

- AWS_SDK_DYNAMODB_MAX_ATTEMPTS: The maximum number of times requests that encounter retryable failures should be attempted for DynamoDB. Defaults to 3.
- AWS_SDK_S3_MAX_ATTEMPTS: The maximum number of times requests that encounter retryable failures should be attempted for S3. Defaults to 3.
- DYNAMO_BATCH_WRITE_COMMAND_CONCURRENCY: The number of concurrent batch write commands to DynamoDB. Defaults to 4 in an effort to leave plenty of DynamoDB write request capacity for the production load.

## Contribute

Expand All @@ -65,7 +72,7 @@ To run `OpenNext` locally:
1. Clone this repository.
1. Build `open-next`:
```bash
cd open-next
cd packages/open-next
pnpm build
```
1. Run `open-next` in watch mode:
Expand All @@ -91,4 +98,4 @@ Special shoutout to [@khuezy](https://github.com/khuezy) and [@conico974](https:

---

Maintained by [SST](https://sst.dev). Join our community: [Discord](https://sst.dev/discord) | [YouTube](https://www.youtube.com/c/sst-dev) | [Twitter](https://twitter.com/SST_dev)
Maintained by [SST](https://sst.dev). Join our community: [Discord](https://discord.gg/AWyhAu8q) | [YouTube](https://www.youtube.com/c/sst-dev) | [Twitter](https://twitter.com/SST_dev)
Loading