Skip to Content
Dirly 2.0 is released 🎉
Admin Setup

Admin setup

Learn how to access the admin panel and configure administrative privileges after installing Dirly.

After successfully installing Dirly, this guide will walk you through the process of setting up administrator access. You’ll learn how to grant admin privileges to users, access the admin panel, and manage tool submissions.


Understanding Admin Roles in Dirly

Dirly uses a role-based access control system powered by Convex. The users table in your Convex database contains a role field that determines each user’s permissions:

users: defineTable({ clerkId: v.string(), email: v.optional(v.string()), role: v.string(), // "user" | "admin" | "moderator" createdAt: v.number(), })

By default, when a new user registers through Clerk, they are assigned the "user" role. To grant administrative access, you need to manually update this role to "admin" in the Convex database.


Step 1: Register a User Account

Before you can assign admin privileges, you need to have a user account registered through Clerk.

Go to your live domain and navigate to the sign-up page:

https://yourdomain.com/sign-up

Complete the registration form using your email and password (or through your configured OAuth providers).

After successful registration, you’ll be logged in as a regular user with the "user" role.

Unlike some other platforms, Dirly does not automatically assign admin privileges to the first user. You must manually promote a user to admin via the Convex dashboard.

Step 2: Find Your Clerk User ID

To update your role in the Convex database, you need your unique Clerk user ID. There are two ways to find it:

Method A: Using Browser Dev Tools

  • While logged in to your Dirly site, open your browser’s Developer Tools (F12).

  • Go to the Application or Storage tab.

  • Look for Local Storage → https://yourdomain.com.

  • Find the key __clerk_client_jwt or look for Clerk-related data containing your user ID.

  • Your user ID will look something like: user_2th1234567890

Method B: Using Clerk Dashboard

  • Go to your Clerk Dashboard .

  • Select your Dirly project.

  • Navigate to Users in the left sidebar.

  • Find your email address in the list and click on it.

  • Copy the User ID (starts with user_).


Step 3: Update User Role in Convex

Now you need to access your Convex dashboard to update the role.

Go to your Convex Dashboard .

  1. Select your Dirly project and deployment (e.g., prod:your-project).

  2. In the left sidebar, click on Data.

  3. Find and click on the users table.

  4. Look for your user record – you can filter by clerkId and paste your Clerk user ID to find it quickly.

  5. Click on your user record to open the document editor.

  6. Locate the role field and change its value from "user" to "admin":

{ "clerkId": "user_2th1234567890", "email": "your@email.com", "role": "admin", // Changed from "user" to "admin" "createdAt": 1704067200000 }

Click Save or Update to apply the changes.

⚠️
Make sure to use double quotes around the role value. The role must be exactly "admin" (case-sensitive).

Step 4: Access the Admin Panel

Once your role has been updated to admin:

  1. Refresh your browser on the Dirly site (or log out and log back in).

  2. You should now see an Admin button appear in the top navigation bar.

  3. Click the Admin button or navigate directly to:

https://yourdomain.com/admin

You now have full access to the administrative dashboard where you can:

  • Review pending tool submissions

  • Approve or reject tools

  • Send feedback to submitters

  • View site statistics and analytics

Troubleshooting

ProblemSolution
Admin button not appearing after role updateLog out completely and log back in. Clerk sessions need to refresh to reflect role changes.
Can’t find my user in Convex users tableMake sure you’ve registered through Clerk first. The users table is populated only after successful authentication.
Role reverts back to “user”Check if you have multiple user records with the same email. Update the correct one matching your Clerk ID.
Access denied when visiting /adminVerify that your role is set to exactly “admin” (not “Admin”, “ADMIN”, or with spaces).

Next Steps

Now that you have admin access, you can:

  • Review and manage tool submissions

  • Configure site settings

  • Monitor user engagement and statistics

  • Manage featured tools and listings

For more information about using the admin panel, see the Admin Dashboard Guide.

🔐
Security Note: Only grant admin access to users you trust completely. Admins have full control over tool approvals, rejections, and can access all submissions.
Last updated on