Inside of your Next.js project, you'll see the following folders and files:
/
├── public/
│ └── favicon.svg
├── src/
│ └── app/
│ ├── favicon.ico
│ ├── globals.css
│ ├── layout.tsx
│ └── page.tsx
├── next.config.js
├── tailwind.config.js
├── tsconfig.json
└── package.json
If you want to lern more about the app router you can checkout Next.js documentation.
Any static assets, like images, can be placed in the public/ directory.
All commands are run from the root of the project, from a terminal:
| Command | Action |
|---|---|
pnpm install |
Installs dependencies |
pnpm run dev |
Starts local dev server at localhost:3000 |
pnpm run build |
Build your production site to ./out/ |
pnpm run start |
Preview your build locally, before deploying |
pnpm run lint ... |
Run Linter |
You can configure this site deployment using AlternateFutures CLI and running:
> alternatefutures sites init
WARN! AlternateFutures CLI is in beta phase, use it under your own responsibility
? Choose one of the existing sites or create a new one. ›
❯ Create a new site
It will prompt you for a name, dist directory location & build command
name: How you want to name the sitedist: The output directory where the site is located, for this template it'soutbuild command: Command to build your site, this will be used to deploy the latest version either by CLI or Github Actions
After configuring your alternatefutures.json file, you can deploy the site by running
alternatefutures sites deploy
After running it you will get an output like this:
WARN! AlternateFutures CLI is in beta, use it at your own discretion
> Success! Deployed!
> Site IPFS CID: QmP1nDyoHqSrRabwUSrxRV3DJqiKH7b9t1tpLcr1NTkm1M
> You can visit through the gateway:
> https://ipfs.io/ipfs/QmP1nDyoHqSrRabwUSrxRV3DJqiKH7b9t1tpLcr1NTkm1M
- Continuous Integration (CI):
alternatefutures sites ciDocumentation. - Adding custom domains:
alternatefutures domains createDocumentation.
This template has been configured to produce a static output.
/** @type {import('next').NextConfig} */
const nextConfig = {
output: 'export',
reactStrictMode: true,
images: {
unoptimized: true,
},
trailingSlash: true,
}
module.exports = nextConfigYou can find more information about static builds in Next Documentation
Feel free to check Next.js documentation or jump into Next.js learning platform.
The initial architecture and conceptual foundation of this project were derived from a fork of the Fleek.xyz platform. While we have made significant architectural changes and diverged from the original fork, we remain grateful to Fleek for their pioneering open-source contributions to decentralized application hosting and infrastructure.