npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

dubase

v1.0.0

Published

DuBase: Self-hosted, multi-project Supabase control repo

Downloads

7

Readme

DuBase

DuBase is a self-hosted, multi-project Supabase control repo.

It uses the official Supabase Docker stack under docker/ and adds one manager script so you can run isolated project instances side by side.

What You Get

  • Full Supabase self-host stack (Postgres, Auth, REST, Realtime, Storage, Studio, etc.)
  • Isolated env/data per project in instances/<project>/
  • Automatic secret generation and port allocation
  • Optional S3-mode storage (MinIO-backed) per project

Prerequisites

  • Docker + Docker Compose
  • openssl
  • Linux/macOS/Windows host with enough resources for Docker

System Requirements

| Resource | Minimum | Recommended | | --- | --- | --- | | RAM | 4 GB | 8 GB+ | | CPU | 2 cores | 4 cores+ | | Disk | 50 GB SSD | 80 GB+ SSD |

Quick Start (NPM)

The easiest way to use DuBase is via npx (requires Node.js):

# Start a new project named 'my-app'
# This initializes, pulls, starts the project, and prints your API keys.
npx dubase start my-app

Generate documentation for AI assistants:

npx dubase docs

Quick Start

./scripts/dubase doctor
./scripts/dubase init project-one
./scripts/dubase pull project-one
./scripts/dubase up project-one
./scripts/dubase api project-one --token dev-secret-token
./scripts/dubase console --port 4173
./scripts/dubase status project-one

List all projects:

./scripts/dubase list

Stop one project:

./scripts/dubase down project-one

Main Commands

./scripts/dubase doctor
./scripts/dubase init <project-name> [--offset N]
./scripts/dubase credentials <project-name>
./scripts/dubase api <project-name> [--port N] [--token TOKEN]
./scripts/dubase console [--port N]
./scripts/dubase pull <project-name>
./scripts/dubase up <project-name> [--s3 | --file-storage]
./scripts/dubase update <project-name> [--s3 | --file-storage]
./scripts/dubase down <project-name>
./scripts/dubase status <project-name>
./scripts/dubase logs <project-name> [service]
./scripts/dubase destroy <project-name> [--delete-data]
./scripts/dubase list

Project Layout

  • instances/<project>/.env - per-project secrets and ports
  • instances/<project>/data - per-project persisted DB/storage data
  • docker/ - upstream Supabase Docker stack files

Storage Modes

  • Default: file-backed storage (DUBASE_STORAGE_MODE=file)
  • S3 mode: MinIO-backed (DUBASE_STORAGE_MODE=s3)

Enable S3 mode:

./scripts/dubase up project-one --s3

Switch back to file mode:

./scripts/dubase up project-one --file-storage

Security Notes

  • init generates unique secrets per project in instances/<project>/.env.
  • Before internet exposure, review production values for SUPABASE_PUBLIC_URL, API_EXTERNAL_URL, SITE_URL, DASHBOARD_USERNAME, and DASHBOARD_PASSWORD.
  • Put the stack behind TLS/reverse proxy before production.
  • Keep backups for instances/<project>/data.

Accessing Services

After up, each project is available at the project's KONG_HTTP_PORT:

  • Studio: http://localhost:<KONG_HTTP_PORT>
  • REST: http://localhost:<KONG_HTTP_PORT>/rest/v1/
  • Auth: http://localhost:<KONG_HTTP_PORT>/auth/v1/
  • Storage: http://localhost:<KONG_HTTP_PORT>/storage/v1/
  • Realtime: http://localhost:<KONG_HTTP_PORT>/realtime/v1/
  • Functions: http://localhost:<KONG_HTTP_PORT>/functions/v1/hello

Frontend Console

Run the project API and frontend:

./scripts/dubase api project-one --token dev-secret-token
./scripts/dubase console --port 4173

Open http://localhost:4173 and connect with:

  • DuBase API URL: http://127.0.0.1:7000 (or your chosen API port)
  • API Token: dev-secret-token (if set)

The console includes:

  • database list + create database
  • schema/table browser
  • bucket/object browser + create bucket
  • SQL runner (read-only safety toggle)

API Keys For Other Projects

To get keys and URLs for a DuBase project:

./scripts/dubase credentials project-one

It prints:

  • API URL (Supabase base URL)
  • ANON_KEY (safe for client-side use with RLS)
  • SERVICE_ROLE_KEY (server-only full access)

Use ANON_KEY in frontend apps, and keep SERVICE_ROLE_KEY only in trusted backend services.

DuBase API (Databases, Tables, RLS)

Start API:

./scripts/dubase api project-one --token dev-secret-token

Example requests:

Create database:

curl -X POST http://127.0.0.1:7000/v1/databases \
  -H "Authorization: Bearer dev-secret-token" \
  -H "Content-Type: application/json" \
  -d '{"name":"appdb"}'

Note: Supabase API services in this stack are wired to the configured POSTGRES_DB value (default postgres). Extra databases are raw Postgres databases; for most projects, create separate DuBase instances or use separate schemas.

Create table and enable RLS:

curl -X POST http://127.0.0.1:7000/v1/tables \
  -H "Authorization: Bearer dev-secret-token" \
  -H "Content-Type: application/json" \
  -d '{
    "schema":"public",
    "name":"profiles",
    "columns":[
      {"name":"id","type":"uuid","nullable":false,"default":"gen_random_uuid()"},
      {"name":"user_id","type":"uuid","nullable":false},
      {"name":"display_name","type":"text","nullable":true}
    ],
    "primary_key":["id"],
    "enable_rls":true
  }'

Enable RLS later:

curl -X POST http://127.0.0.1:7000/v1/rls/enable \
  -H "Authorization: Bearer dev-secret-token" \
  -H "Content-Type: application/json" \
  -d '{"schema":"public","table":"profiles","force":false}'

Create RLS policy:

curl -X POST http://127.0.0.1:7000/v1/rls/policies \
  -H "Authorization: Bearer dev-secret-token" \
  -H "Content-Type: application/json" \
  -d '{
    "schema":"public",
    "table":"profiles",
    "name":"profiles_select_own",
    "command":"SELECT",
    "roles":["authenticated"],
    "using":"auth.uid() = user_id"
  }'

Run SQL directly:

curl -X POST http://127.0.0.1:7000/v1/sql/run \
  -H "Authorization: Bearer dev-secret-token" \
  -H "Content-Type: application/json" \
  -d '{"sql":"select * from public.profiles limit 10","read_only":true}'

Rootless Docker Note

If rootless Docker is detected, DuBase sets DOCKER_SOCKET_LOCATION to /run/user/<uid>/docker.sock automatically during init.

Upstream Base

The docker/ directory is sourced from the official Supabase repository and then adapted here for multi-instance operation.