Docs
Dashboards
Admin Dashboard

Setting Up the Supabase Admin Dashboard

Overview

StartupBolt includes a built-in admin dashboard. To access it, you must first ensure that you have a user with an admin role in the Supabase authentication database. This guide will walk you through the process step by step.

Prerequisites

Before proceeding, make sure you have completed the authentication setup in Supabase. If you need help setting up Google OAuth or Magic Link authentication, refer to the respective guides:

Magic Links provide a passwordless login experience by sending a secure login link to the user's email. The guide also covers setting up a custom SMTP provider like Resend (opens in a new tab).

Note: In the future, we plan to introduce a setup wizard similar to WordPress, which will automatically configure the root user with an admin role. For now, this process must be done manually, but it is straightforward.

Step-by-Step Guide

1. Sign Up to Create a User

If you have already completed the authentication setup, you can sign in using Google OAuth or Magic Link.

Navigate to the Login Page (/login) and sign in.

Login Page

This will create a user in the auth.users table.

2. Assign Admin Role to Your User

a. Open the roles Table

  1. In Supabase, navigate to the roles table.
  2. You will see predefined roles (including "admin"). These were created as part of the Supabase Roles Guide.
Roles Table

b. Assign the Admin Role to Your User

  1. Open the user_roles table.
FILL UP
  1. Click Insert Row to create a new entry.
  2. In the user_id field, select the user you created earlier.
Assigning Admin Role
  1. In the role_id field, select admin.
Admin Role Selection
  1. Click Save to apply the changes.
Saving Admin Role

Now you will see a new row in the user_roles table with the user you created earlier and the role as admin.

4. Accessing the Admin Dashboard

You can access the admin dashboard in two ways:

a. Through the Login Page

  1. Go to the Login Page (/login) and sign in with the user you created earlier.
  2. Once logged in, you will be redirected to the private page (/private).
  3. Click on the Dropdown Menu in the top-right corner and select Admin Console.
Admin Console Access

This will take you to the admin dashboard at /admin.

Admin Dashboard

b. Directly Accessing the Admin Dashboard

  1. Open your browser and navigate to /admin.
    • For local development: http://localhost:3000/admin
    • For production: https://your-website-url/admin

If the user you are logged in with has the admin role, you will see the admin dashboard.

Additional Setup

If you plan to use the Blog feature, you need to set it up separately. Refer to the Blog Setup Guide for more details.

Final Remarks

Congratulations! You have successfully set up and accessed the StartupBolt Admin Dashboard. You can now manage your platform efficiently with admin privileges.