database-devtools 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +96 -0
  2. package/package.json +18 -8
package/README.md ADDED
@@ -0,0 +1,96 @@
1
+ # database-devtools
2
+
3
+ [![npm version](https://img.shields.io/npm/v/database-devtools.svg)](https://www.npmjs.com/package/database-devtools)
4
+ [![license](https://img.shields.io/npm/l/database-devtools.svg)](https://github.com/tamangRajkumar/database-devtools/blob/master/LICENSE)
5
+
6
+ > Inspect and debug **SQLite** in **React Native** and **Expo** apps from your browser — browse tables, run SQL, and edit live data on connected devices.
7
+
8
+ **database-devtools** is a Chrome DevTools-like toolkit for mobile app databases. Add one component to your app, run `npx database-devtools` on your machine, and inspect your local SQLite database in a full browser UI.
9
+
10
+ ## Features
11
+
12
+ - **React Native SQLite inspector** — zero-config [expo-sqlite](https://docs.expo.dev/versions/latest/sdk/sqlite/) auto-detection
13
+ - **Expo & React Native debugging** — floating dev overlay in your app during development
14
+ - **Browser database explorer** — tables, schema, paginated rows, search, and sort
15
+ - **SQL workspace** — run queries with history, favorites, and export (TSV, CSV, JSON)
16
+ - **Edit mode** — transactional inserts, updates, and deletes on the live device database
17
+ - **Offline exports** — snapshot saved per app; inspect even when the device disconnects
18
+ - **Single npm install** — no extra inspector packages required
19
+
20
+ ## Install
21
+
22
+ ```bash
23
+ npm install database-devtools expo-sqlite
24
+ ```
25
+
26
+ Peer dependencies: `react`, `react-native`, `expo-sqlite`.
27
+
28
+ ## Quick start — React Native / Expo
29
+
30
+ ```tsx
31
+ import * as SQLite from 'expo-sqlite';
32
+ import { DatabaseDevTools } from 'database-devtools';
33
+
34
+ const db = await SQLite.openDatabaseAsync('myapp.db');
35
+
36
+ export function App() {
37
+ return (
38
+ <>
39
+ {/* your app */}
40
+ <DatabaseDevTools database={db} />
41
+ </>
42
+ );
43
+ }
44
+ ```
45
+
46
+ SQLite is auto-detected from the raw `expo-sqlite` instance. Optional:
47
+
48
+ ```tsx
49
+ <DatabaseDevTools database={db} type="sqlite" />
50
+ <DatabaseDevTools database={db} adapter={customAdapter} />
51
+ ```
52
+
53
+ ## Run the inspector hub
54
+
55
+ After installing, start the local hub and browser UI:
56
+
57
+ ```bash
58
+ npx database-devtools
59
+ ```
60
+
61
+ Opens [http://localhost:3847](http://localhost:3847). Connect your app (simulator, emulator, or physical device on the same network), then **Refresh** to pull a database snapshot.
62
+
63
+ ### Physical device
64
+
65
+ Point the mobile app at your machine's LAN IP:
66
+
67
+ ```bash
68
+ EXPO_PUBLIC_DATABASE_DEVTOOLS_URL=ws://192.168.1.10:3847/ws
69
+ ```
70
+
71
+ | Variable | Default | Purpose |
72
+ |----------|---------|---------|
73
+ | `DATABASE_DEVTOOLS_PORT` | `3847` | Hub and web UI port |
74
+ | `DATABASE_DEVTOOLS_NO_OPEN` | unset | Set to `1` to skip opening the browser |
75
+
76
+ ## Advanced exports
77
+
78
+ | Import | Use case |
79
+ |--------|----------|
80
+ | `database-devtools/adapters/sqlite` | Custom SQLite adapter wiring |
81
+ | `database-devtools/inspector-sqlite` | Browser-side sql.js inspector (custom UI) |
82
+ | `database-devtools/client` | WebSocket client for custom tools |
83
+ | `database-devtools/server` | Embed the hub in Node.js |
84
+
85
+ ## Documentation
86
+
87
+ - **Repository:** [github.com/tamangRajkumar/database-devtools](https://github.com/tamangRajkumar/database-devtools)
88
+ - **Issues:** [github.com/tamangRajkumar/database-devtools/issues](https://github.com/tamangRajkumar/database-devtools/issues)
89
+
90
+ ## Security
91
+
92
+ For **local development only**. The hub listens on `0.0.0.0`. The RN overlay is disabled in production by default (`__DEV__`). Edit mode writes to the live device database.
93
+
94
+ ## License
95
+
96
+ MIT © [tamangRajkumar/database-devtools](https://github.com/tamangRajkumar/database-devtools)
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "database-devtools",
3
- "version": "0.1.0",
4
- "description": "Chrome DevTools-like experience for databases in React Native applications",
3
+ "version": "0.1.1",
4
+ "description": "Inspect SQLite in React Native & Expo from your browser — browse tables, run SQL, edit data. DevTools for mobile databases.",
5
5
  "license": "MIT",
6
- "author": "Database DevTools contributors",
7
- "homepage": "https://github.com/yellowbooking/database-devtools#readme",
8
- "bugs": "https://github.com/yellowbooking/database-devtools/issues",
6
+ "author": "Rajkumar Tamang",
7
+ "homepage": "https://github.com/tamangRajkumar/database-devtools#readme",
8
+ "bugs": "https://github.com/tamangRajkumar/database-devtools/issues",
9
9
  "repository": {
10
10
  "type": "git",
11
- "url": "git+https://github.com/yellowbooking/database-devtools.git",
11
+ "url": "git+https://github.com/tamangRajkumar/database-devtools.git",
12
12
  "directory": "packages/database-devtools"
13
13
  },
14
14
  "publishConfig": {
@@ -71,7 +71,8 @@
71
71
  },
72
72
  "files": [
73
73
  "dist",
74
- "LICENSE"
74
+ "LICENSE",
75
+ "README.md"
75
76
  ],
76
77
  "peerDependencies": {
77
78
  "react": ">=18",
@@ -123,10 +124,19 @@
123
124
  },
124
125
  "keywords": [
125
126
  "react-native",
127
+ "expo",
128
+ "expo-sqlite",
126
129
  "sqlite",
127
130
  "database",
128
131
  "devtools",
129
- "debugging"
132
+ "debugging",
133
+ "inspector",
134
+ "database-inspector",
135
+ "mobile-development",
136
+ "sql",
137
+ "react-native-debugging",
138
+ "database-tools",
139
+ "local-database"
130
140
  ],
131
141
  "scripts": {
132
142
  "build": "tsup",