Prerequisites
NodeForgeCMS depends on the following software. Install and verify each before proceeding.| Requirement | Minimum Version | Notes |
|---|---|---|
| Node.js | 20.x | LTS recommended. Use nvm to manage versions. |
| MySQL | 8.x | Ensure the service is running and you have a user with CREATE DATABASE privileges. |
| Redis | 7.x | Used for session and cache storage. Must be accessible on the configured host/port. |
| pnpm | Latest | Install globally with npm install -g pnpm if not already present. |
Project Structure
NodeForgeCMS ships as a monorepo with two primary packages:server/— Contains the Nuxt4 application that powers both the public-facing frontend (SSR/SSG) and the RESTful API. All CMS logic, routing, and data access lives here.admin/— A standalone Vue 3 single-page application for site administration. It communicates with the server API and can be deployed on the same domain or a separate one.
Environment Configuration
All runtime configuration for the server is managed through a.env file in the server/ directory. Copy the example file and edit it for your environment:
.env file with explanations for each variable group.
server/.env
DATABASE_*— Connection details for your MySQL 8 instance.DATABASE_DBmust match the name of the database you create in the next step.JWT_SECRET— A long, random string used to sign authentication tokens. Use a cryptographically secure value in production (e.g.,openssl rand -hex 64).REDIS_*— Connection details for Redis.REDIS_DBis the logical Redis database index (0–15). Using a non-default index avoids collisions with other applications.SERVER_HOST— The publicly accessible base URL of the server. Used for generating absolute URLs in API responses and emails.IMG_HOST— The base URL used to prefix uploaded media file URLs. In most deployments this matchesSERVER_HOST.FORM_USER_EMAIL/FORM_USER_EMAIL_PASSWORD— Credentials for the email account used to send contact form submissions. Leave blank to disable email sending.USER_EMAIL_SERVICE— The email service provider. Defaults toQQ(QQ Mail SMTP). Change to match your provider if using a different service.
In production, never commit your
.env file to version control. Add it to .gitignore and manage secrets through your deployment platform’s secret management system.Database Setup
Create thenode_forge_cms database in MySQL, then import the bundled schema and seed data:
Installing Dependencies
Install dependencies for both theserver/ and admin/ packages. Each is a self-contained Node.js project and must be installed separately.
Starting the Application
Development Mode
Development mode enables hot-module replacement, detailed error output, and source maps. Start the server (available at http://localhost:3000):Production Build and Deployment
Server Build the Nuxt4 server application and start it with PM2:pm2 save + pm2 startup).
Admin Panel
The admin panel has two build targets depending on your deployment topology:
admin/dist/ directory to your web server or static hosting of choice and configure your reverse proxy (e.g., Nginx) accordingly.
Summary of URLs
| Service | Development | Production (example) |
|---|---|---|
| Frontend/API | http://localhost:3000 | https://yourdomain.com |
| Admin Panel | http://localhost:4000 | https://admin.yourdomain.com |