Skip to content
Merged
Show file tree
Hide file tree
Changes from 71 commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
3290e67
migrate claim worker -> next.js
aidankmcalister Aug 15, 2025
5579a47
readme fix
aidankmcalister Aug 15, 2025
0f42210
feat: transition to next.js
aidankmcalister Aug 18, 2025
a1dad76
feat: prisma drop basic implementation
aidankmcalister Aug 18, 2025
5ff2477
fix: schema editor tab to select and no duplicates
aidankmcalister Aug 18, 2025
5349a9e
feat: schema editor set up
aidankmcalister Aug 18, 2025
91c4da8
fix: it finally works
aidankmcalister Aug 19, 2025
91a781e
feat: auth callback route file broken down
aidankmcalister Aug 19, 2025
955b657
feat: checkpoint for alejandro
aidankmcalister Aug 19, 2025
1bd0cf1
fix: expiration timer accurate, no more redirect error
aidankmcalister Aug 20, 2025
e10f790
feat: test urls
aidankmcalister Aug 21, 2025
fba2c02
fix: `.text()` -> json
aidankmcalister Aug 21, 2025
c26109f
feat: ui updates
aidankmcalister Aug 22, 2025
3b33b49
fix: claim url an timer returned
aidankmcalister Aug 22, 2025
8fd3038
feat: connection string generation
aidankmcalister Aug 22, 2025
e4e9ce9
fix: code condensed
aidankmcalister Aug 22, 2025
670f432
fix: `/drop is now `/web`. step components added. tab renames
aidankmcalister Aug 22, 2025
362040c
feat: tab persistence
aidankmcalister Aug 22, 2025
43d1628
fix: scrollbar and button fix
aidankmcalister Aug 22, 2025
b33cc2c
fix: cleanup and toast notifs
aidankmcalister Aug 22, 2025
0265fd9
fix: prisma studio fix
aidankmcalister Aug 22, 2025
c863a5a
fix: background color and name change
aidankmcalister Aug 22, 2025
7cf798b
feat: `localStorage` -> `cookies`
aidankmcalister Aug 22, 2025
5614099
fix: cookie storage and reveal icon
aidankmcalister Aug 22, 2025
9019fc6
fix: steps updated
aidankmcalister Aug 22, 2025
65a6ffb
fix: update id
aidankmcalister Aug 22, 2025
8d05e70
feat: try in browser button
aidankmcalister Aug 22, 2025
d42360f
feat: sensitive data warning
aidankmcalister Aug 22, 2025
7be03b3
fix: proper building
aidankmcalister Aug 22, 2025
e72e710
fix: minor design changes
aidankmcalister Aug 23, 2025
0bb5faa
feat: prisma studio theme (not working)
aidankmcalister Aug 23, 2025
ab78952
feat: schema pushing
aidankmcalister Aug 23, 2025
0c2f2ca
feat: schema pulling
aidankmcalister Aug 23, 2025
f7ad5c6
fix: schema api route organized
aidankmcalister Aug 25, 2025
e50e11e
fix: format schema updated
aidankmcalister Aug 25, 2025
52e1a57
feat: schema-api-page init
aidankmcalister Aug 25, 2025
8f5f51e
feat: hono api backend for schema routes added
aidankmcalister Aug 25, 2025
346712a
fix: schema api routes
aidankmcalister Aug 25, 2025
a9656cc
feat: pushing and pulling successful
aidankmcalister Aug 25, 2025
4ad579a
feat: design applied
aidankmcalister Aug 25, 2025
0fe0698
fix: light mode fixes
aidankmcalister Aug 26, 2025
7c813b5
fix: minor style changes
aidankmcalister Aug 26, 2025
648ca56
fix: use orm string for internals
aidankmcalister Aug 26, 2025
093cdd2
fix: design updates and orm string used
aidankmcalister Aug 26, 2025
411ec6c
feat: mobile responsive
aidankmcalister Aug 26, 2025
ab8ebce
fix: mobile re-add
aidankmcalister Aug 26, 2025
c4918ec
fix: push and pull buttons error fix
aidankmcalister Aug 26, 2025
d6fe14e
fix: remove pointless styles
aidankmcalister Aug 26, 2025
6d7b0bc
fix: mobile changes
aidankmcalister Aug 26, 2025
0b88a6d
fix: tweaks to content, loading, box sizes
aidankmcalister Aug 28, 2025
7fac15c
fix: tip added and icon changed
aidankmcalister Aug 28, 2025
10e6c9b
fix: spa -> mpa, studio changed to render on the server, editor tip, …
aidankmcalister Aug 29, 2025
4a3ab3d
fix: create new db error on `/web`, home page updated
aidankmcalister Aug 29, 2025
3e47543
fix: landing on `/web` creates a db and redirects you to `/web/connect`
aidankmcalister Aug 29, 2025
deca9c6
Merge remote-tracking branch 'origin/main' into claim-worker-migrate-…
aidankmcalister Aug 29, 2025
2dd5498
fix: minor content updates
aidankmcalister Aug 29, 2025
dc54177
fix: height fixed
aidankmcalister Aug 29, 2025
1e1bc4e
fix: backgroudn increase
aidankmcalister Aug 29, 2025
f5f9942
fix: proper steps
aidankmcalister Aug 29, 2025
ff1a7b7
fix: navbar updated, scrollbar no longer locked
aidankmcalister Sep 2, 2025
ffd47fc
feat: `db-unavailable` page and home page redesign
aidankmcalister Sep 2, 2025
dbadb03
fix: wrangler config updated
aidankmcalister Sep 2, 2025
5530f57
chore: test new build command
aidankmcalister Sep 2, 2025
31d6a24
chore: test new build command
aidankmcalister Sep 2, 2025
37e48b8
chore: modify upload command
aidankmcalister Sep 2, 2025
cbbf1bf
chore: trigger checks
aidankmcalister Sep 3, 2025
314632b
fix: wrangler types
aidankmcalister Sep 3, 2025
0a0bde3
fix: url added
aidankmcalister Sep 3, 2025
f7191c9
fix: added preview urls and fixed new db button
aidankmcalister Sep 3, 2025
14acdb2
fix: update build steps styles
aidankmcalister Sep 3, 2025
7434ee2
fix: changed `link` to `a`
aidankmcalister Sep 3, 2025
6f65028
chore: coderabbit changes
aidankmcalister Sep 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 39 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ Create temporary Prisma Postgres databases that you can claim permanently.
This monorepo contains tools and services that enable developers to quickly provision temporary Prisma Postgres databases and optionally claim ownership to make them permanent. The system consists of:

1. **CLI Tools** - Command-line interfaces for database creation
2. **Cloudflare Workers** - Backend services for database management and OAuth authentication
3. **Monorepo Infrastructure** - Shared tooling and versioning
2. **Web Interface** - Browser-based database creation at create-db.prisma.io
3. **Cloudflare Workers** - Backend services for database management and OAuth authentication
4. **Monorepo Infrastructure** - Shared tooling and versioning

## CLI Reference

Expand Down Expand Up @@ -71,6 +72,29 @@ npx create-pg -j
- **Dependencies**: Workspace dependency on `create-db`
- **Usage**: Provides `create-pg` and `create-postgres` commands

### Web Interface

### Option 1: Using the web interface (recommended)

The create-db web application provides a browser-based interface for creating and managing your databases.

**Key features:**

- No installation required - works directly in your web browser
- Visual interface for database management
- Easy connection string display and copying
- Built-in schema viewer and editor
- Direct integration with Prisma Studio
- Simple database claiming workflow

**Getting started:**

1. Visit [create-db.prisma.io](https://create-db.prisma.io) in your web browser
2. Click "Create with the web interface"
3. Modify your schema and interact with the Studio
4. Copy the provided connection strings for your project
5. Claim your database to make it permanent

### Backend Services

#### `create-db-worker` (Cloudflare Worker)
Expand All @@ -91,13 +115,14 @@ npx create-pg -j

#### `claim-db-worker` (Cloudflare Worker)

- **Purpose**: Handles OAuth-based database ownership transfer
- **Purpose**: Handles OAuth-based database ownership transfer and serves the web interface
- **Features**:
- Prisma OAuth authentication
- Rate limiting (100 requests/minute)
- Secure project transfer
- User-friendly HTML interfaces
- Analytics tracking
- Web application hosting

Comment on lines 116 to 126
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Reflect Next.js/OpenNext migration in service naming.

This still frames claim-db-worker as a plain Worker. Update to “Next.js app via OpenNext on Cloudflare Workers” and adjust feature wording.

Apply this diff:

-#### `claim-db-worker` (Cloudflare Worker)
+#### `claim-db-worker` (Next.js app via OpenNext on Cloudflare Workers)
@@
-- **Purpose**: Handles OAuth-based database ownership transfer and serves the web interface
+- **Purpose**: Handles OAuth-based database ownership transfer and serves the Next.js web interface
@@
-  - User-friendly HTML interfaces
+  - Next.js web UI (App Router)
   - Analytics tracking
-  - Web application hosting
+  - Web application hosting via OpenNext
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
#### `claim-db-worker` (Cloudflare Worker)
- **Purpose**: Handles OAuth-based database ownership transfer
- **Purpose**: Handles OAuth-based database ownership transfer and serves the web interface
- **Features**:
- Prisma OAuth authentication
- Rate limiting (100 requests/minute)
- Secure project transfer
- User-friendly HTML interfaces
- Analytics tracking
- Web application hosting
#### `claim-db-worker` (Next.js app via OpenNext on Cloudflare Workers)
- **Purpose**: Handles OAuth-based database ownership transfer and serves the Next.js web interface
- **Features**:
- Prisma OAuth authentication
- Rate limiting (100 requests/minute)
- Secure project transfer
- Next.js web UI (App Router)
- Analytics tracking
- Web application hosting via OpenNext
🧰 Tools
🪛 LanguageTool

[grammar] ~116-~116: Use correct spacing
Context: ...## claim-db-worker (Cloudflare Worker) - Purpose: Handles OAuth-based database ...

(QB_NEW_EN_OTHER_ERROR_IDS_5)


[grammar] ~118-~118: There might be a mistake here.
Context: ...ip transfer and serves the web interface - Features: - Prisma OAuth authenticat...

(QB_NEW_EN_OTHER)


[grammar] ~119-~119: There might be a mistake here.
Context: ...serves the web interface - Features: - Prisma OAuth authentication - Rate lim...

(QB_NEW_EN)


[grammar] ~120-~120: There might be a mistake here.
Context: ...tures**: - Prisma OAuth authentication - Rate limiting (100 requests/minute) - ...

(QB_NEW_EN)


[grammar] ~121-~121: There might be a mistake here.
Context: ... - Rate limiting (100 requests/minute) - Secure project transfer - User-friendl...

(QB_NEW_EN)


[grammar] ~122-~122: There might be a mistake here.
Context: ...ests/minute) - Secure project transfer - User-friendly HTML interfaces - Analyt...

(QB_NEW_EN)


[grammar] ~123-~123: There might be a mistake here.
Context: ...ansfer - User-friendly HTML interfaces - Analytics tracking - Web application h...

(QB_NEW_EN)


[grammar] ~124-~124: There might be a mistake here.
Context: ...y HTML interfaces - Analytics tracking - Web application hosting **API Endpoints...

(QB_NEW_EN)


[grammar] ~125-~125: Use correct spacing
Context: ...ics tracking - Web application hosting API Endpoints: - `GET /claim?projectI...

(QB_NEW_EN_OTHER_ERROR_IDS_5)

🤖 Prompt for AI Agents
In README.md around lines 116 to 126, the service description still calls the
component "claim-db-worker (Cloudflare Worker)"; update it to reflect the
Next.js/OpenNext migration by renaming to "claim-db — Next.js app via OpenNext
on Cloudflare Workers" and reword the features list to mention Next.js/OpenNext
hosting, server-side rendering (via OpenNext), Prisma OAuth authentication, rate
limiting (100 requests/minute), secure project transfer, user-friendly HTML
interfaces, analytics tracking, and web application hosting; ensure phrasing
emphasizes OpenNext handling Next.js runtime on Cloudflare Workers rather than a
plain Worker.

**API Endpoints**:

Expand All @@ -106,7 +131,7 @@ npx create-pg -j

## Quick Start

### Using the CLI
### Option 1: Using the CLI

```bash
# Create a database with default settings
Expand All @@ -123,6 +148,10 @@ npx create-pg --region eu-west-1
npx create-postgres --interactive
```

### Option 2: Using the Web Interface

Visit [create-db.prisma.io/web](https://create-db.prisma.io/web) to create databases directly in your browser. No installation required - just click "Create Database Online" to get started.

### Environment Setup

For local development, create a `.env` file in the `create-db/` directory:
Expand All @@ -147,7 +176,7 @@ CLAIM_DB_WORKER_URL="http://127.0.0.1:9999"

### Installation

```bash
````bash
# Clone the repository
git clone https://github.com/prisma/create-db.git
cd create-db
Expand All @@ -169,7 +198,7 @@ cd ../create-db && pnpm install

```env
INTEGRATION_TOKEN=your_prisma_integration_token
```
````

**Claim DB Worker** (`claim-db-worker/.dev.vars`):

Expand Down Expand Up @@ -379,3 +408,7 @@ create-db/
2. **CLI Testing**: Test changes in the `create-db` package
3. **Versioning**: Use changesets for version management
4. **Deployment**: Deploy workers and publish packages as needed

```

```
12 changes: 0 additions & 12 deletions claim-db-worker/.editorconfig

This file was deleted.

200 changes: 39 additions & 161 deletions claim-db-worker/.gitignore
Original file line number Diff line number Diff line change
@@ -1,172 +1,50 @@
# Logs
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

logs
_.log
npm-debug.log_
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)

report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json

# Runtime data

pids
_.pid
_.seed
\*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover

lib-cov

# Coverage directory used by tools like istanbul

coverage
\*.lcov

# nyc test coverage

.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)

.grunt

# Bower dependency directory (https://bower.io/)

bower_components

# node-waf configuration

.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)

build/Release

# Dependency directories

node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)

web_modules/

# TypeScript cache

\*.tsbuildinfo

# Optional npm cache directory

.npm

# Optional eslint cache

.eslintcache

# Optional stylelint cache

.stylelintcache

# Microbundle cache

.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history

.node_repl_history

# Output of 'npm pack'

\*.tgz

# Yarn Integrity file

.yarn-integrity

# dotenv environment variable files

.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)

.cache
.parcel-cache

# Next.js build output

.next
out

# Nuxt.js build / generate output

.nuxt
dist

# Gatsby files

.cache/

# Comment in the public line in if your project uses Gatsby and not Next.js

# https://nextjs.org/blog/next-9-1#public-directory-support

# public

# vuepress build output

.vuepress/dist

# vuepress v2.x temp and cache directory

.temp
.cache

# Docusaurus cache and generated files

.docusaurus

# Serverless directories

.serverless/

# FuseBox cache

.fusebox/
# dependencies
/node_modules
/legacy-code
/.pnp
.pnp.js
.yarn/install-state.gz
package-lock.json
/.claude

# DynamoDB Local files
# testing
/coverage

.dynamodb/
# next.js
/.next/
/out/

# TernJS port file
# production
/build

.tern-port
# misc
.DS_Store
*.pem
index.example

# Stores VSCode versions used for testing VSCode extensions
# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

.vscode-test
# local env files
.env*.local

# yarn v2
# vercel
.vercel

.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.\*
# typescript
*.tsbuildinfo
next-env.d.ts

# wrangler project
# OpenNext
/.open-next

.dev.vars
.wrangler/
# wrangler files
.wrangler
.dev.vars*
!.dev.vars.example
.env*
!.env.example
6 changes: 0 additions & 6 deletions claim-db-worker/.prettierrc

This file was deleted.

Loading