explaingit

amirmahdavi2023/d1-admin

Analysis updated 2026-05-18

4JavaScriptAudience · developerComplexity · 2/5LicenseSetup · easy

TLDR

A single file, no dependency admin panel for Cloudflare D1 databases that runs inside a Worker and works entirely from a browser, including on a phone.

Mindmap

mindmap
  root((d1-admin))
    What it does
      Browse D1 tables
      Run SQL queries
      Export CSV or JSON
      Token authentication
    Tech stack
      JavaScript
      Cloudflare Workers
      Cloudflare D1
    Use cases
      Manage a D1 database from a phone
      Run ad hoc SQL without CLI
      Export query results
    Audience
      Cloudflare developers
      Solo developers without a laptop

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Browse and query a Cloudflare D1 database entirely from a phone browser.

USE CASE 2

Run ad hoc SQL statements against D1 without installing wrangler or a CLI.

USE CASE 3

Export query results to CSV or JSON for further analysis.

USE CASE 4

Safely inspect and edit production data with confirmation prompts before destructive commands.

What is it built with?

JavaScriptCloudflare WorkersCloudflare D1

How does it compare?

amirmahdavi2023/d1-adminanil-matcha/open-poe-aiarata-ae/purupurupngtuber
Stars444
LanguageJavaScriptJavaScriptJavaScript
Last pushed2026-06-25
MaintenanceActive
Setup difficultyeasymoderatemoderate
Complexity2/53/53/5
Audiencedeveloperdevelopergeneral

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

Setup is entirely through the Cloudflare dashboard: create a Worker, paste the file, bind the D1 database, and set an admin token.

MIT license: free to use, modify, and distribute, including commercially, as long as the copyright notice stays with it.

In plain English

D1 Admin is a simple database management tool for Cloudflare D1, the database service built into Cloudflare's platform. The whole tool is a single JavaScript file with no dependencies and no build process. You paste that one file into a Cloudflare Worker through the web dashboard, connect it to your database, and it works, even from a phone browser, without needing a computer terminal or any command line tools installed. Once set up, it gives you a browser based interface to look at every table in your database, preview rows, and run any SQL statement, including both reads and writes, while showing how long each query took and how many rows it affected. You can export the results of a query as a CSV or JSON file. The interface is built to work comfortably on a small phone screen, not just on a desktop monitor. Access is protected by a token you set yourself, stored only in your own browser, and the tool refuses to run multiple SQL statements at once, giving a clear error instead of silently running just the first one and dropping the rest, which is what the underlying database service would otherwise do. It also asks for confirmation before running a command that deletes a table, or an update or delete statement that has no filtering condition, since those can accidentally affect an entire table. Anyone who has the access token gets full read and write access to the database, so the README stresses treating that token like a password and suggests adding an extra layer of protection through Cloudflare's own access control system for further safety. Table previews are limited to showing 100 rows at a time, and only one SQL statement can run per query. The project is released under the MIT license.

Copy-paste prompts

Prompt 1
Walk me through deploying d1-admin to a Cloudflare Worker and binding it to my D1 database.
Prompt 2
Explain how d1-admin prevents running multiple SQL statements accidentally.
Prompt 3
Show me how to set a secure admin token for d1-admin using Worker secrets.
Prompt 4
Help me add Cloudflare Access in front of my d1-admin Worker for extra protection.

Frequently asked questions

What is d1-admin?

A single file, no dependency admin panel for Cloudflare D1 databases that runs inside a Worker and works entirely from a browser, including on a phone.

What language is d1-admin written in?

Mainly JavaScript. The stack also includes JavaScript, Cloudflare Workers, Cloudflare D1.

What license does d1-admin use?

MIT license: free to use, modify, and distribute, including commercially, as long as the copyright notice stays with it.

How hard is d1-admin to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is d1-admin for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.