modern-cms 1.1.0 → 1.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.
package/README.md CHANGED
@@ -1,42 +1,99 @@
1
1
  # modern-cms
2
2
 
3
- A self-hosted, drag-and-drop website CMS Next.js (App Router) front end, Express + Prisma API, PostgreSQL or MySQL, and pluggable file storage (AWS S3, Azure Blob Storage, or Cloudinary).
3
+ A self-hosted, drag-and-drop website CMS: a Next.js (App Router) front end, an Express + Prisma API, your choice of **PostgreSQL or MySQL**, and pluggable file storage (**AWS S3, Azure Blob Storage, or Cloudinary**). Install it with one command — an interactive wizard scaffolds a complete, working project and writes its `.env` files for you.
4
4
 
5
- ## Quick start
5
+ - **npm**: <https://www.npmjs.com/package/modern-cms>
6
+ - **Source**: <https://github.com/isahaq1/Modern-CMS>
7
+ - **Issues**: <https://github.com/isahaq1/Modern-CMS/issues>
6
8
 
7
- ```
9
+ ## Features
10
+
11
+ - **Visual page builder** — drag-and-drop containers, a true 2D grid layout (with per-column/row resize), 30+ content blocks (hero, testimonials, pricing tables, video, team, timeline, before/after, and more), responsive breakpoint overrides (desktop/tablet/mobile), GSAP-powered entrance animations, and dark mode.
12
+ - **Content model** — pages with draft/publish/scheduled-publish states, page revisions with restore, page templates, collections (blog/news/events/etc.) with locale support, reusable saved blocks, global header/footer sections.
13
+ - **Internationalization** — per-page locale + translation groups, RTL layout support, a language switcher block.
14
+ - **SEO built in** — sitemap.xml, robots.txt, JSON-LD (WebPage/Article/BreadcrumbList/FAQPage), redirects, per-page meta/OG tags.
15
+ - **Auth & governance** — role-based access (Admin / Editor / Author, with per-resource ownership for Authors), an audit log of every mutating admin action.
16
+ - **Forms & search** — a contact-form block with submission storage and an optional webhook, full-text search (Postgres `tsvector` ranking) across pages and collection items.
17
+ - **Backup** — export/import a single page or the whole site as JSON.
18
+ - **Analytics** — GA4, Plausible, or a custom script snippet, configured from the admin theme settings.
19
+
20
+ ## Requirements
21
+
22
+ - Node.js 18 or newer
23
+ - A PostgreSQL or MySQL server (local, Docker, or a managed service)
24
+ - Credentials for one file-storage provider: AWS S3 (or any S3-compatible service — MinIO, Cloudflare R2, DigitalOcean Spaces...), Azure Blob Storage, or Cloudinary
25
+
26
+ ## Installation
27
+
28
+ ```bash
8
29
  npx modern-cms
9
30
  ```
10
31
 
11
- You'll be asked for:
32
+ (No global install needed — `npx` fetches and runs the latest version each time. If you prefer a global install: `npm install -g modern-cms && modern-cms`.)
12
33
 
13
- - Where to create the project
14
- - Database engine (PostgreSQL or MySQL) — host, database name, username, password
15
- - File storage provider (AWS S3 / any S3-compatible service, Azure Blob Storage, or Cloudinary) and its credentials
16
- - Which port the web app and API should run on (defaults: 3000 and 4000)
17
- - Site URLs and an admin login
34
+ ### What the installer asks
18
35
 
19
- The installer scaffolds the full project into your target directory and writes working `.env` files for the API and web app. It does **not** run `npm install` or touch your database for you — it prints the exact next commands to run, so nothing happens on your machine without you seeing it first.
36
+ | Step | Prompt | Notes |
37
+ |---|---|---|
38
+ | 1 | Project directory | Must be empty or not yet exist |
39
+ | 2 | Database engine | PostgreSQL or MySQL |
40
+ | 3 | Database host / port / name / username / password | Builds `DATABASE_URL` and rewrites the Prisma schema's datasource for you |
41
+ | 4 | Storage provider | AWS S3 (or S3-compatible) / Azure Blob Storage / Cloudinary |
42
+ | 5 | Provider credentials | Endpoint/keys/bucket for S3, connection string/container for Azure, cloud name/API key/secret for Cloudinary |
43
+ | 6 | Web app port / API port | Defaults `3000` / `4000` |
44
+ | 7 | Public site URL / API URL | Defaults follow whatever ports you picked |
45
+ | 8 | Admin email / password | Leave the password blank to auto-generate one (printed once, at the end) |
20
46
 
21
- ## What you get
47
+ The installer only **writes files** — it never runs `npm install`, touches your database, or starts anything. It prints the exact next commands, so nothing happens on your machine without you seeing it first.
22
48
 
23
- - A visual, drag-and-drop page builder (containers, grids, 30+ content blocks, responsive breakpoints, animations, dark mode)
24
- - Collections (blog/news/etc.), full-text search, SEO (sitemap, JSON-LD, redirects), page revisions and templates
25
- - Role-based auth (Admin / Editor / Author), audit log, form submissions
26
- - Media library backed by whichever storage provider you chose
49
+ ### After the wizard finishes
27
50
 
28
- ## After setup
29
-
30
- ```
51
+ ```bash
31
52
  cd <your-project-dir>
32
53
  npm install
33
- npm run db:migrate # PostgreSQL
34
- # or, for MySQL (the bundled migration history is Postgres-specific SQL):
54
+
55
+ # PostgreSQL:
56
+ npm run db:migrate
57
+
58
+ # MySQL (the bundled migration history is Postgres-specific SQL, so a fresh
59
+ # MySQL install uses schema-push instead of the migration history):
60
+ npx prisma generate --schema apps/api/prisma/schema.prisma
35
61
  npx prisma db push --schema apps/api/prisma/schema.prisma
62
+
36
63
  npm run db:seed
37
64
  npm run dev
38
65
  ```
39
66
 
67
+ Then open the web app at the URL you chose (default `http://localhost:3000`) and log in at `/admin` with the admin email/password from the wizard.
68
+
69
+ ## Project layout
70
+
71
+ The scaffolded project is an npm-workspaces monorepo:
72
+
73
+ ```
74
+ your-project/
75
+ apps/
76
+ web/ # Next.js app — public site + /admin builder UI
77
+ api/ # Express + Prisma API
78
+ packages/
79
+ shared/ # Zod schemas, the component registry, and tree helpers shared by both apps
80
+ docker-compose.yml # optional local Postgres + MinIO for dev
81
+ ```
82
+
83
+ ## Configuration reference
84
+
85
+ Everything the installer writes lives in `apps/api/.env` and `apps/web/.env.local`. The full list of variables (and what each one does) is documented in `.env.example` at the root of the scaffolded project.
86
+
87
+ ## Contributing / issues
88
+
89
+ Bug reports and feature requests are welcome — please open an issue at <https://github.com/isahaq1/Modern-CMS/issues>.
90
+
91
+ ## Author
92
+
93
+ **Md Isahaq**
94
+ Email: [hmisahaq01@gmail.com](mailto:hmisahaq01@gmail.com)
95
+ Phone: +880 1852376598
96
+
40
97
  ## License
41
98
 
42
99
  MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "modern-cms",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "Self-hosted, drag-and-drop website CMS (Next.js + Express + Prisma). Interactive installer scaffolds a full project with your choice of PostgreSQL/MySQL and AWS S3/Azure Blob/Cloudinary storage.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -24,10 +24,21 @@
24
24
  "cloudinary"
25
25
  ],
26
26
  "author": {
27
- "name": "Md Isahaq (+880 1852376598)",
28
- "email": "hmisahaq01@gmail.com"
27
+ "name": "Md Isahaq",
28
+ "email": "hmisahaq01@gmail.com",
29
+ "url": "https://github.com/isahaq1",
30
+ "phone": "+880 1852376598"
29
31
  },
30
32
  "license": "MIT",
33
+ "repository": {
34
+ "type": "git",
35
+ "url": "git+https://github.com/isahaq1/Modern-CMS.git",
36
+ "directory": "packages/modern-cms"
37
+ },
38
+ "homepage": "https://github.com/isahaq1/Modern-CMS#readme",
39
+ "bugs": {
40
+ "url": "https://github.com/isahaq1/Modern-CMS/issues"
41
+ },
31
42
  "engines": {
32
43
  "node": ">=18"
33
44
  },
@@ -15,9 +15,15 @@ COOKIE_NAME=pgcms_token
15
15
  SEED_ADMIN_EMAIL=admin@example.com
16
16
  SEED_ADMIN_PASSWORD=change_me_admin_password
17
17
 
18
- # --- MinIO / S3 ---
19
- # Mapped to host ports 9010/9011 (not the MinIO defaults 9000/9001) to avoid clashing
20
- # with other projects' containerscheck `docker ps` for conflicts before reusing 9000.
18
+ # --- File storage ---
19
+ # STORAGE_PROVIDER selects which block below is actually read: "s3" (default, also
20
+ # used for any S3-compatible service MinIO, Cloudflare R2, DigitalOcean Spaces...),
21
+ # "azure", or "cloudinary". Only the selected provider's variables need to be set.
22
+ STORAGE_PROVIDER=s3
23
+
24
+ # S3 / S3-compatible (MinIO shown here — mapped to host ports 9010/9011, not the MinIO
25
+ # defaults 9000/9001, to avoid clashing with other projects' containers; check
26
+ # `docker ps` for conflicts before reusing 9000).
21
27
  S3_ENDPOINT=http://localhost:9010
22
28
  S3_REGION=us-east-1
23
29
  S3_ACCESS_KEY_ID=pgcms_minio
@@ -27,11 +33,25 @@ S3_FORCE_PATH_STYLE=true
27
33
  # Public base URL used to build media URLs served back to the browser
28
34
  S3_PUBLIC_URL=http://localhost:9010/pgcms-media
29
35
 
36
+ # Azure Blob Storage (only used when STORAGE_PROVIDER=azure)
37
+ # AZURE_STORAGE_CONNECTION_STRING=
38
+ # AZURE_STORAGE_CONTAINER=media
39
+ # AZURE_STORAGE_PUBLIC_URL=
40
+
41
+ # Cloudinary (only used when STORAGE_PROVIDER=cloudinary)
42
+ # CLOUDINARY_CLOUD_NAME=
43
+ # CLOUDINARY_API_KEY=
44
+ # CLOUDINARY_API_SECRET=
45
+ # CLOUDINARY_FOLDER=pgcms
46
+
30
47
  # --- API ---
31
48
  API_PORT=4000
32
49
  WEB_ORIGIN=http://localhost:3000
33
50
 
34
51
  # --- Web (Next.js) ---
52
+ # PORT is read by apps/web's dev/start scripts (via dotenv-cli) to decide which port
53
+ # the Next.js server itself binds to.
54
+ PORT=3000
35
55
  # Server-side only: used by next.config.mjs (API proxy/rewrites) and server components.
36
56
  # Not prefixed with NEXT_PUBLIC_ on purpose — the browser always calls the relative /api
37
57
  # path, which Next.js proxies to this URL, keeping the auth cookie first-party.