@mountsqli/studio 0.1.0 → 0.1.2

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 +88 -0
  2. package/package.json +12 -4
package/README.md ADDED
@@ -0,0 +1,88 @@
1
+ # @mountsqli/studio
2
+
3
+ Visual database management dashboard for MountSQLi.
4
+
5
+ ## Features
6
+
7
+ - **Table Explorer** — Browse all tables, view data, search, filter, sort
8
+ - **SQL Console** — Execute queries with syntax highlighting
9
+ - **ER Diagram** — Auto-generated entity-relationship diagram
10
+ - **Migration Manager** — View and manage migrations
11
+ - **Schema Visualizer** — View table structure and constraints
12
+ - **Connection Monitor** — Pool stats and health
13
+
14
+ ## Installation
15
+
16
+ ```bash
17
+ npm install @mountsqli/studio
18
+ ```
19
+
20
+ ## Standalone
21
+
22
+ ```bash
23
+ npx mountsqli studio
24
+ ```
25
+
26
+ Opens http://localhost:3333
27
+
28
+ ## Embed in Your App
29
+
30
+ ### Express
31
+
32
+ ```typescript
33
+ import { mountStudio } from '@mountsqli/studio';
34
+
35
+ app.use('/admin', mountStudio({ db }));
36
+ ```
37
+
38
+ ### Hono
39
+
40
+ ```typescript
41
+ import { mountStudio } from '@mountsqli/studio';
42
+
43
+ app.route('/admin', mountStudio({ db }));
44
+ ```
45
+
46
+ ### Next.js
47
+
48
+ ```typescript
49
+ import { mountStudio } from '@mountsqli/studio';
50
+
51
+ export const handler = mountStudio({ db });
52
+ ```
53
+
54
+ ## Configuration
55
+
56
+ ```typescript
57
+ // mountsqli.config.ts
58
+ export default defineConfig({
59
+ studio: {
60
+ port: 3333,
61
+ auth: {
62
+ username: 'admin',
63
+ password: process.env.STUDIO_PASSWORD!,
64
+ },
65
+ },
66
+ });
67
+ ```
68
+
69
+ ## Security
70
+
71
+ Protect the Studio dashboard in production:
72
+
73
+ ```typescript
74
+ app.use('/admin', (req, res, next) => {
75
+ if (req.ip !== '127.0.0.1' && req.ip !== '::1') {
76
+ return res.status(403).send('Forbidden');
77
+ }
78
+ next();
79
+ }, mountStudio({ db }));
80
+ ```
81
+
82
+ ## Documentation
83
+
84
+ 📖 [Documentation](https://mountsqli.vercel.app/docs/studio/overview)
85
+
86
+ ## License
87
+
88
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mountsqli/studio",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -10,7 +10,11 @@
10
10
  },
11
11
  "main": "./dist/index.js",
12
12
  "types": "./dist/index.d.ts",
13
- "files": ["dist", "LICENSE", "README.md"],
13
+ "files": [
14
+ "dist",
15
+ "LICENSE",
16
+ "README.md"
17
+ ],
14
18
  "scripts": {
15
19
  "build": "tsup",
16
20
  "dev": "tsup --watch",
@@ -25,8 +29,12 @@
25
29
  "better-sqlite3": "^11.0.0"
26
30
  },
27
31
  "peerDependenciesMeta": {
28
- "pg": { "optional": true },
29
- "better-sqlite3": { "optional": true }
32
+ "pg": {
33
+ "optional": true
34
+ },
35
+ "better-sqlite3": {
36
+ "optional": true
37
+ }
30
38
  },
31
39
  "devDependencies": {
32
40
  "@types/node": "^22.0.0",