Docs
Algolia

Algolia Search

In this section, we'll show you how to integrate Algolia Search (opens in a new tab) into your NextAdmin boilerplate to provide fast and reliable search functionality.

1. Set Up Algolia Application

  1. Log in to your Algolia Dashboard (opens in a new tab).
  2. Create Application: Click on Application in the sidebar, then click the Create Application button.
  3. Follow the prompts to name and create your application.

Create Algolia App

TIP: You can rename your application later by navigating to Settings > Applications.

2. Create a Search Index

  1. From your application dashboard, click the Get Started! button.
  2. Enter a name for your index (e.g., products or posts) and save it. This index will store the searchable data for your project.

Create Index

3. Generate API Keys

To connect your application to Algolia, you'll need an API Key with the appropriate permissions.

  1. Go to the API Keys section from the sidebar.
  2. Click New API Key.
  3. Select the index you created in the previous step.
  4. Assign the necessary permissions for the key as shown below:

Configure API Key

4. Configure Environment Variables

Finally, update your .env file with the credentials obtained from the Algolia dashboard:

NEXT_PUBLIC_ALGOLIA_PROJECT_ID="YOUR_PROJECT_ID"
NEXT_PUBLIC_ALGOLIA_API_KEY="THE_APIKEY_WE_CREATED"
NEXT_PUBLIC_ALGOLIA_INDEX="YOUR_INDEX_NAME"

NOTE: You can find your Project ID (Application ID) on the API Keys page.

Next Steps

Your Algolia integration is now ready! You can now start indexing your data and providing a powerful search experience to your users.