✨ newIntroducing Fleek Machines (Early access): One-click verified and private compute
Fullstack Nextjs Template template banner

Fullstack Nextjs Template

Next.js Framework logo

Next.js SSR Starter Template

This is the boilerplate code generated directly from running npx create-next-app. Utilize this template to harness Fleek’s optimized hosting for dynamic and performance-driven web applications

Prerequisites

Getting Started

  1. Fork the repository
  2. Clone the repository by running the following command:
git clone <https://github.com/><your-id>/nextjs-ssr-template.git
  1. Enter the correct directory, install dependencies, and run locally:
cd nextjs-ssr-template
npm i
npm run dev
  1. Ensure that you install the Fleek CLI and the Fleek Next Adapter:
// local installation
npm i @fleek-platform/cli
npm i @fleek-platform/next

// global installation
npm i -g @fleek-platform/cli
npm i -g @fleek-platform/next

💡: you can check the Fleek CLI version by running fleek -v. Any version >= 2.10.1 should be good. As for the Fleek Next adapter, you can check the Fleek Next Adapter version by running fleek-next -v. Any version >= 2.1.0 should be good.

Building and Deploying

  1. Build the project using the Fleek Next Adapter:
npx fleek-next build
# or if installed globally
fleek-next build
  1. Now, Create the Fleek Function using the Fleek CLI:
//syntax
fleek functions create --name '<name of your function>'

//example
fleek functions create --name nextra-function

  1. Finally, deploy using the Fleek CLI:
//syntax
fleek functions deploy --bundle=false --path .fleek/dist/index.js --assets .fleek/static --name '<name of your function>'

//example
fleek functions deploy --bundle=false --path .fleek/dist/index.js --assets .fleek/static --name nextra-function

As you complete all the steps successfully here, you will be able to access your fullstack Next.js app using a link that looks like this- https://brief-disease-harsh.functions.on-fleek.app/

Contributing

Reporting Issues

  • Use GitHub Issues to report bugs or suggest features.
  • Provide clear details and steps to reproduce any issues.

Pull Requests

  • Fork the repository.
  • Create a feature branch:
git checkout -b feature/your-feature
  • Commit changes with clear messages.
  • Push to your fork and submit a pull request.

Learn More

Screenshot

Template preview

Details

November, 04, 2024

Creation date

Next.js

Framework

Web3 Starter Kit

Category

Report template for abuse