Nextjs Dapp Template

screenshot of Nextjs Dapp Template
nextjs
react
tailwind
shadcn-ui

Open source Next.js app template for the MultiversX blockchain. Including Shadcn UI and Tailwind.

Overview:

The NextJS Dapp Template is an alternative to the sdk-dapp and is built using Nextjs and a couple of helpful tools including Shadcn UI (Radix UI) and Tailwind. It provides straightforward and complete functionality for building decentralized applications. The Dapp is designed to work with Next.js and the new App Router architecture, utilizing the sdk-core without the dapp-core library. It also uses the .env file for configuration and includes Radix UI components wrapped with Shadcn UI.

Features:

  • Next.js and App Router Architecture: Built using Next.js and the new App Router architecture for improved performance and flexibility.
  • sdk-core Integration: Utilizes the sdk-core library for interacting with the MultiversX blockchain.
  • .env File Support: Supports configuration using the .env file, allowing for easy customization and deployment.
  • Radix UI + Tailwind: Includes Radix UI components wrapped with Shadcn UI, providing a customizable and responsive UI design.
  • LoginModalButton: Provides a Connect button with a modal containing authentication options for different platforms.
  • Authenticated Component: Used as a wrapper to ensure the user is authenticated before rendering certain content. Can display a spinner or fallback element.
  • ProtectedPageWrapper Component: Wraps page contents and only displays them for logged-in users. Can redirect to a defined path for non-logged-in users.
  • API Integration: Includes support for working with the MultiversX API. Provides an example .env file for configuring API endpoints.
  • Config File Support: Includes an example env.example file that can be copied and renamed to .env.local for custom configuration.

Summary:

The NextJS Dapp Template is a powerful alternative to the sdk-dapp, built using Next.js and various tools and libraries. It provides a straightforward way to build decentralized applications, with support for Next.js, the new App Router architecture, and the sdk-core library. The template includes essential components and utilities, such as the LoginModalButton, Authenticated component, and ProtectedPageWrapper, making it easier to handle authentication and authorization in a Dapp. Additionally, it offers integration with the MultiversX API and supports custom configuration using the .env file. Overall, the NextJS Dapp Template is a comprehensive solution for building Dapps and provides a solid foundation for developers.

nextjs
Next.js

Next.js is a React-based web framework that enables server-side rendering, static site generation, and other powerful features for building modern web applications.

react
React

React is a widely used JavaScript library for building user interfaces and single-page applications. It follows a component-based architecture and uses a virtual DOM to efficiently update and render UI components

tailwind
Tailwind

Tailwind CSS is a utility-first CSS framework that provides pre-defined classes for building responsive and customizable user interfaces.

shadcn-ui
Shadcn UI

Beautifully designed components that you can copy and paste into your apps. Accessible. Customizable. Open Source.

eslint
Eslint

ESLint is a linter for JavaScript that analyzes code to detect and report on potential problems and errors, as well as enforce consistent code style and best practices, helping developers to write cleaner, more maintainable code.

postcss
Postcss

PostCSS is a popular open-source tool that enables web developers to transform CSS styles with JavaScript plugins. It allows for efficient processing of CSS styles, from applying vendor prefixes to improving browser compatibility, ultimately resulting in cleaner, faster, and more maintainable code.

typescript
Typescript

TypeScript is a superset of JavaScript, providing optional static typing, classes, interfaces, and other features that help developers write more maintainable and scalable code. TypeScript's static typing system can catch errors at compile-time, making it easier to build and maintain large applications.