Skip to main content

Existing frontend applications

Intermediate
Tutorial

Overview

While numerous starter projects and examples exist for those who prefer to start from scratch, deploying an existing frontend application as a frontend canister is also a viable option.

Next.js

Next.js is an open-source web development framework providing React-based web applications with server-side rendering and static website generation.

Prerequisites

Step 1: Create an application build

Build your Next.js application by running your build command.

For example, using npx:

npx run build

You should reference your package.json scripts section to find the correct build command.

This should now generate an out folder which consists of the static assets that make up the website.

In the next step, we will instruct the BigFile to deploy the website on-chain using these static files.

When deploying on BigFile, these static files are not public to anyone including the nodes. Only the Wasm file which is a binary instruction file which does not leak any of your code is public to nodes.