openadminjs 0.1.8 → 0.1.9

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 CHANGED
@@ -1,30 +1,126 @@
1
- # openadminjs CLI
1
+ # OpenAdminJS
2
2
 
3
- Official CLI for OpenAdminJS.
3
+ OpenAdminJS is an open-source, resource-driven admin platform for the Node.js ecosystem, built with Nest.js, Prisma, PostgreSQL, Next.js, TailwindCSS and shadcn/ui.
4
4
 
5
- ## Quick start
5
+ ![OpenAdminJS logo](https://js-senpai.github.io/open-admin-js/assets/brand/openadminjs-logo-new.png)
6
+
7
+ ## Quick start (for package users)
8
+
9
+ Full documentation: [https://js-senpai.github.io/open-admin-js/docs.html](https://js-senpai.github.io/open-admin-js/docs.html)
10
+
11
+ ### 1. Create a new project
6
12
 
7
13
  ```bash
8
14
  npx openadminjs create my-app
9
15
  cd my-app
10
- pnpm db:migrate
11
- pnpm db:seed
16
+ ```
17
+
18
+ `npx` runs the single `openadminjs` package and scaffolds the project with dependencies installed automatically.
19
+ During scaffolding, you can choose the database driver from a list (PostgreSQL, MySQL, or SQLite), and the CLI fills `DATABASE_URL` for you.
20
+
21
+ ### 2. Configure environment
22
+
23
+ The scaffold wizard asks for database access and key env values (`DATABASE_URL`, `REDIS_URL`, JWT secrets) and writes ready-to-use values into `apps/api/.env`.
24
+ `ADMIN_ORIGIN` and `API_PORT` are prefilled with defaults (`http://localhost:3000` and `4000`) and can be changed manually if needed.
25
+ `.env.example` is left as a reference template.
26
+
27
+ Minimal `.env` example:
28
+
29
+ ```env
30
+ NODE_ENV=development
31
+ DATABASE_URL=postgresql://USER:PASSWORD@localhost:5432/openadminjs?schema=public
32
+ API_PORT=4000
33
+ JWT_SECRET=replace-with-a-long-random-string-at-least-32-chars
34
+ JWT_REFRESH_SECRET=another-long-random-string
35
+ ADMIN_ORIGIN=http://localhost:3000
36
+ ```
37
+
38
+ Optional:
39
+
40
+ ```env
41
+ REDIS_URL=redis://localhost:6379
42
+ OPENADMIN_PLUGIN_PNPM_INSTALL=0
43
+ ```
44
+
45
+ ### 3. Run project
46
+
47
+ ```bash
12
48
  pnpm dev
13
49
  ```
14
50
 
15
- ## Commands
51
+ Typical URLs:
52
+
53
+ | App | URL |
54
+ | ----------- | ------------------------------ |
55
+ | Admin | http://localhost:3000 |
56
+ | API | http://localhost:4000 |
57
+ | API Swagger | http://localhost:4000/api/docs |
58
+ | Web (demo) | http://localhost:3001 |
59
+
60
+ ### 4. Sign in
61
+
62
+ After project creation, migrations and seed are run automatically. Use the superadmin credentials you entered in the scaffold wizard:
63
+
64
+ - **Email:** your `Superadmin email`
65
+ - **Password:** your `Superadmin password`
66
+
67
+ ## MVP scope
68
+
69
+ - Resource-driven admin metadata with safe defaults.
70
+ - Auth, RBAC contracts, generic CRUD API, audit log and file/settings modules.
71
+ - Next.js admin shell with login, dashboard, resource screens and operational pages.
72
+ - Generated app `apps/web` for public frontend pages and SEO.
73
+ - CLI: `dev`, `build`, `db migrate`, `db seed`, `generate resource`, `doctor`, `security check`.
74
+
75
+ ## Plugin Platform
76
+
77
+ OpenAdminJS now uses a broad extension model (no legacy compatibility layer). Plugins can register multiple surfaces through `@openadminjs/plugin-sdk`:
78
+
79
+ - `resource` hooks (CRUD lifecycle)
80
+ - `api` hooks/routes
81
+ - `media` pipeline (upload transforms)
82
+ - `seo` metadata/sitemap contributors
83
+ - `jobs` handlers
84
+ - `adminUi` extensions (menus/pages/widgets/actions)
85
+
86
+ Plugins are controlled by manifest capabilities and trust mode (`trusted` / `sandboxed`) in `apps/api/plugins.manifest.json`.
87
+
88
+ ### Capability matrix
89
+
90
+ - `resource.hooks` — CRUD lifecycle hooks per resource.
91
+ - `api.hooks` / `api.routes` — request lifecycle hooks and custom API endpoints.
92
+ - `media.pipeline` — file/image transform pipeline.
93
+ - `seo.extend` — metadata + sitemap contributors.
94
+ - `jobs.run` — background job handlers.
95
+ - `admin.ui.extend` — admin menu/page/widget/action extensions.
96
+
97
+ `trusted` mode may run with broad access; `sandboxed` mode should explicitly declare only required capabilities.
98
+
99
+ Generate a starter plugin:
100
+
101
+ ```bash
102
+ pnpm exec openadminjs generate plugin com.example.my-plugin
103
+ ```
104
+
105
+ ### Optional queue setup
106
+
107
+ Set `REDIS_URL` in your environment to enable queue processing (example: `redis://localhost:6379`).
108
+
109
+ ## Partners
110
+
111
+ OpenAdminJS is community-powered and stays free thanks to partner support.
112
+
113
+ Want to become a partner and place your logo in the project materials?
114
+ Email us at `openadminjs@proton.me`.
16
115
 
17
- - `openadminjs create [projectName]`
18
- - `openadminjs dev`
19
- - `openadminjs build`
20
- - `openadminjs start`
21
- - `openadminjs db migrate|seed|studio`
22
- - `openadminjs generate resource <ModelName>`
23
- - `openadminjs generate plugin <pluginId>`
24
- - `openadminjs doctor`
25
- - `openadminjs security check`
116
+ ## Financial support
26
117
 
27
- ## Docs
118
+ If you want to support development, hosting and community tooling:
28
119
 
29
- - Full docs: [https://js-senpai.github.io/open-admin-js/docs.html](https://js-senpai.github.io/open-admin-js/docs.html)
30
- - Repository: [https://github.com/js-senpai/open-admin-js](https://github.com/js-senpai/open-admin-js)
120
+ - Open a sponsorship discussion in GitHub issues/discussions.
121
+ - Contribute with code, examples or QA.
122
+ - Contact maintainers for direct support options: `openadminjs@proton.me`.
123
+ - Crypto wallets:
124
+ - BTC (SegWit): `bc1qpcc4hd7w82jjvsdhvx6hgu2kfuz8jgfuvxurd7`
125
+ - ETH / USDC (ERC-20): `0xe5ac19c6f1f5070a7c713973fd25ee02eaf9eb48`
126
+ - USDT (TRC-20): `TWyzMehesWqJS7qs5LYL4QGmgTpohNy3gf`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openadminjs",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "openadminjs": "dist/index.js"
@@ -12,8 +12,6 @@ Generated by [OpenAdminJS](https://openadminjs.dev).
12
12
 
13
13
  ```bash
14
14
  pnpm install
15
- pnpm db:migrate
16
- pnpm db:seed
17
15
  pnpm dev
18
16
  ```
19
17