mongoose-studio 1.0.0
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.
- package/README.md +66 -0
- package/dist/index.js +61836 -0
- package/dist/ui/404.html +1 -0
- package/dist/ui/__next.__PAGE__.txt +9 -0
- package/dist/ui/__next._full.txt +21 -0
- package/dist/ui/__next._head.txt +6 -0
- package/dist/ui/__next._index.txt +8 -0
- package/dist/ui/__next._tree.txt +3 -0
- package/dist/ui/_next/static/CFRORV4RwGH9YJ4KZJLz8/_buildManifest.js +11 -0
- package/dist/ui/_next/static/CFRORV4RwGH9YJ4KZJLz8/_clientMiddlewareManifest.json +1 -0
- package/dist/ui/_next/static/CFRORV4RwGH9YJ4KZJLz8/_ssgManifest.js +1 -0
- package/dist/ui/_next/static/chunks/0f7f83dee53e9578.js +1 -0
- package/dist/ui/_next/static/chunks/15d7561d33aaf44a.js +1 -0
- package/dist/ui/_next/static/chunks/3c0e6dafbc3cc0ff.js +1 -0
- package/dist/ui/_next/static/chunks/9e71c12d031db5ed.js +4 -0
- package/dist/ui/_next/static/chunks/9fec2b9adefcf25d.css +2 -0
- package/dist/ui/_next/static/chunks/a2807f954e6ee5ce.js +1 -0
- package/dist/ui/_next/static/chunks/a6dad97d9634a72d.js +1 -0
- package/dist/ui/_next/static/chunks/a6dad97d9634a72d.js.map +1 -0
- package/dist/ui/_next/static/chunks/c1c5d6f55edfd0a4.js +2 -0
- package/dist/ui/_next/static/chunks/f1a8a6deaad6e1a7.js +1 -0
- package/dist/ui/_next/static/chunks/f239c6a8bb1d406c.js +1 -0
- package/dist/ui/_next/static/chunks/turbopack-30ad15deb948747f.js +4 -0
- package/dist/ui/_next/static/media/1bffadaabf893a1e-s.7cd81963.woff2 +0 -0
- package/dist/ui/_next/static/media/2bbe8d2671613f1f-s.76dcb0b2.woff2 +0 -0
- package/dist/ui/_next/static/media/2c55a0e60120577a-s.2a48534a.woff2 +0 -0
- package/dist/ui/_next/static/media/5476f68d60460930-s.c995e352.woff2 +0 -0
- package/dist/ui/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2 +0 -0
- package/dist/ui/_next/static/media/9c72aa0f40e4eef8-s.18a48cbc.woff2 +0 -0
- package/dist/ui/_next/static/media/ad66f9afd8947f86-s.7a40eb73.woff2 +0 -0
- package/dist/ui/_next/static/media/favicon.0b3bf435.ico +0 -0
- package/dist/ui/_not-found/__next._full.txt +16 -0
- package/dist/ui/_not-found/__next._head.txt +6 -0
- package/dist/ui/_not-found/__next._index.txt +8 -0
- package/dist/ui/_not-found/__next._not-found.__PAGE__.txt +6 -0
- package/dist/ui/_not-found/__next._not-found.txt +4 -0
- package/dist/ui/_not-found/__next._tree.txt +2 -0
- package/dist/ui/_not-found.html +1 -0
- package/dist/ui/_not-found.txt +16 -0
- package/dist/ui/favicon.ico +0 -0
- package/dist/ui/index.html +1 -0
- package/dist/ui/index.txt +21 -0
- package/package.json +40 -0
package/README.md
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# 🍃 Mongoose Studio
|
|
2
|
+
|
|
3
|
+
**The missing GUI for Mongoose.**
|
|
4
|
+
Instantly visualize your Mongoose models, schemas, and data. Zero config, works in your existing project.
|
|
5
|
+
|
|
6
|
+
## ✨ Features
|
|
7
|
+
|
|
8
|
+
- 🚀 **Zero Config**: Just run `npx mongoose-studio` in your project root.
|
|
9
|
+
- 🔍 **Schema Inspector**: Visualize your schemas, types, validations, and defaults.
|
|
10
|
+
- 📊 **Data Explorer**: View documents in a clean table view.
|
|
11
|
+
- 🛡️ **Safe by Default**: Read-only mode prevents accidental data loss.
|
|
12
|
+
- 🔌 **Auto-Detection**: Automatically finds your `models/` folder and `.env` configuration.
|
|
13
|
+
- 📦 **Single Command**: Launches both the API and UI in one go.
|
|
14
|
+
|
|
15
|
+
## 🚀 Quick Start
|
|
16
|
+
|
|
17
|
+
Run it directly in your project folder (no installation required):
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
# Using Bun (Recommended)
|
|
21
|
+
bunx mongoose-studio
|
|
22
|
+
|
|
23
|
+
# Using npm
|
|
24
|
+
npx mongoose-studio
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
That's it! Your browser will open automatically.
|
|
28
|
+
|
|
29
|
+
## 🛠️ Requirements
|
|
30
|
+
|
|
31
|
+
- **Runtime**: Node.js (v18+) or Bun (v1+).
|
|
32
|
+
- **Database**: A running MongoDB instance.
|
|
33
|
+
- **Project**: A project using `mongoose` with models defined.
|
|
34
|
+
|
|
35
|
+
## ⚙️ Configuration
|
|
36
|
+
|
|
37
|
+
Mongoose Studio tries to be smart, but you can override defaults:
|
|
38
|
+
|
|
39
|
+
| Flag | Env Var | Default | Description |
|
|
40
|
+
|------|---------|---------|-------------|
|
|
41
|
+
| `--port` | `PORT` | `5555` | Port for the Studio server |
|
|
42
|
+
| `--uri` | `MONGO_URI` | `mongodb://localhost:27017/test` | MongoDB Connection String |
|
|
43
|
+
|
|
44
|
+
Example:
|
|
45
|
+
```bash
|
|
46
|
+
bunx mongoose-studio --port=8080 --uri=mongodb://user:pass@remote:27017/prod
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## 🏗️ How it Works
|
|
50
|
+
|
|
51
|
+
1. **Scans Models**: Looks for a `models/` directory in your current working directory.
|
|
52
|
+
2. **Loads Code**: Dynamically imports your model files to register them with Mongoose.
|
|
53
|
+
3. **Introspects**: Reads the registered Mongoose schemas to build the UI columns.
|
|
54
|
+
4. **Connects**: Connects to the DB using your local environment variables.
|
|
55
|
+
5. **Serves**: Starts a local server that hosts the UI and the API.
|
|
56
|
+
|
|
57
|
+
## 🤝 Contributing
|
|
58
|
+
|
|
59
|
+
We love contributions!
|
|
60
|
+
1. Clone the repo: `git clone https://github.com/sirrryasir/mongoose-studio`
|
|
61
|
+
2. Install deps: `bun install`
|
|
62
|
+
3. Run dev: `bun run dev`
|
|
63
|
+
|
|
64
|
+
## 📄 License
|
|
65
|
+
|
|
66
|
+
MIT © Yasir
|