This starter project demonstrates how to integrate Particle Network’s Universal Accounts into a Next.js app. It includes a basic Web3 authentication flow using Particle Auth.
For a full walkthrough of the implementation, refer to the Universal Accounts Quickstart Guide on Particle Docs.
Try a deployed version of this project.
- Clone the repository
git clone https://github.com/particle-network/universal-accounts-quickstart.git
cd ua-quickstart
- Install dependencies
npm install
# or
yarn
- Set Up Environment Variables
First, create a project in the Particle Dashboard to get the required credentials.
The same project keys are used for both Particle Auth and Universal Accounts.
In this example, we use Particle Auth for user authentication. However, you can use any EOA-compatible provider or signer. Regardless of your choice, you’ll still need to create a project in the Particle Dashboard and initialize Universal Accounts using the project credentials.
Create a .env file in the root of the ua-quickstart directory and add the following variables:
NEXT_PUBLIC_PROJECT_ID=""
NEXT_PUBLIC_CLIENT_KEY=""
NEXT_PUBLIC_APP_ID=""
- Run the development server
npm run dev
# or
yarn dev
Find the full documentation for Universal Accounts on Particle Docs.