Supasheet.

Installation

Get started with Supasheet in minutes

Installation

Clone the Repository

git clone https://github.com/htmujahid/supasheet.git
cd supasheet

Install Dependencies

npm install
pnpm install
yarn install

Set Up Supabase

You can use either a local Supabase instance or a cloud project.

Start a local Supabase instance:

npx supabase start

This will start Supabase on http://127.0.0.1:54321 and provide you with:

  • API URL
  • Anon Key
  • Service Role Key
  • Studio URL: http://127.0.0.1:54323

Option 2: Cloud Project

  1. Create a project at supabase.com
  2. Get your API URL and keys from project settings

Configure Environment Variables

Create a .env.local file in the root directory:

# Supabase Configuration
NEXT_PUBLIC_SUPABASE_URL=http://127.0.0.1:54321
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key
SUPABASE_SERVICE_ROLE_KEY=your-service-role-key

# App Configuration
NEXT_PUBLIC_PRODUCT_NAME=Supasheet
NEXT_PUBLIC_SITE_TITLE=Supasheet Admin
NEXT_PUBLIC_SITE_DESCRIPTION=SQL-based Admin Panel
NEXT_PUBLIC_SITE_URL=http://localhost:3000
NEXT_PUBLIC_DEFAULT_LOCALE=en
NEXT_PUBLIC_DEFAULT_THEME_MODE=system

Replace the Supabase values with your actual credentials.

Run Database Migrations

Apply the database schema:

npx supabase db reset
npx supabase db push

Expose Supasheet Schema

For Supasheet to work, you need to expose the supasheet schema via the PostgREST API. The public schema is already exposed by default.

Add the supasheet schema to /supabase/config.toml:

[api]
schemas = ["public", "supasheet"]

What this means:

  • public - Your application tables (exposed by default)
  • supasheet - All Supasheet internal tables including accounts, roles, permissions, dashboards, charts, and reports - Required

After editing the config file, restart Supabase:

npx supabase stop
npx supabase start

Update via the Supabase Dashboard:

  1. Go to Project SettingsData API
  2. Find Exposed schemas section
  3. Add supasheet to the list
  4. Save changes

Without exposing the supasheet schema, Supasheet won't be able to access authentication, authorization, configuration, dashboards, charts, and reports. The application will not function correctly.

Generate TypeScript Types

npm run typegen

This generates type definitions from your database schema.

Start Development Server

npm run dev

Open http://localhost:3000 in your browser.

Verify Installation

You should see the Supasheet sign-in page. Create an account to get started!

Common Commands

# Development
npm run dev              # Start dev server
npm run build            # Build for production
npm run typecheck        # Type checking
npm run lint             # Run linter

# Supabase
npx supabase start       # Start local instance
npx supabase stop        # Stop local instance
npx supabase db reset    # Reset database
npm run typegen          # Generate types

Next Steps