Build a Mythical Afterlife Management System with Node, MySQL, and Vue
This guide walks you through creating a full‑stack “afterlife” management platform that simulates traditional Chinese underworld processes, using a Node.js + Express + MySQL backend and a Vue + Element UI frontend, with step‑by‑step setup, configuration, and deployment instructions.
Overview
This project implements a full‑stack “afterlife” management system that models the traditional Chinese underworld workflow. It provides an admin console, life‑and‑death register query/export, and a wood‑fish chanting feature for merit accumulation.
Technology Stack
Backend: Node.js v16.15.0, Express, MySQL v8.0.28
Frontend (user side): Vue.js + Element UI
Frontend (admin side): Vue.js + Element UI
Core Features
Overall Functions
Statistical dashboards
Life‑and‑death register management
Soul‑catcher (勾魂使者) management
Judgment hall and judgment record handling
18‑level hell administration
Equipment inventory
Six‑path reincarnation control
Remittance management
Role, permission and administrator management
System configuration
Business Process (fictional)
Add Life‑and‑Death Register : Record complete personal data (name, birth/death dates, address, virtues, wealth, death type, biography, attributes, marital status, post‑death status, etc.).
Pending Soul Capture : After the recorded death date, the entry automatically moves to a pending‑capture list.
Soul Capture : Assigned soul‑catchers retrieve the soul and deliver it to the underworld.
Judgment : Judges evaluate the biography and assign one of three outcomes:
Re‑entry into the six‑path reincarnation cycle.
Sentencing to one of the 18 hell levels.
Merit accumulation by wood‑fish chanting while the person is still alive.
User‑Side Functions : Query/export of registers and manual/automatic wood‑fish chanting for merit.
Admin Functions : End‑to‑end process management with multi‑role permission control.
Demo address: http://df.earthonline.club/home Login: admin / 123456
System Setup and Run
Backend
Database initialization : Create a MySQL database named afterlifedb and execute the script api/afterlifedb.sql to create tables and seed data.
Database configuration : Edit api/link/config.js with your MySQL connection details.
let config = {
host: 'localhost', // database host
user: '', // database user
password: '', // database password
database: 'afterlifedb', // do not change
timezone: "SYSTEM",
connectionLimit: 10
};Install dependencies and start : In the api directory run:
npm i
node index.jsThe service listens on port 3000. Verify with http://127.0.0.1:3000/api/user/gettempauth (should return “授权成功”).
User Frontend
API endpoint configuration : Edit user/src/main.js to point to the backend:
Vue.prototype.apiUrl = 'http://localhost:3000'; // no trailing slash
Vue.prototype.adminUrl = 'http://localhost:8081'; // admin console address
axios.defaults.baseURL = 'http://localhost:3000/'; // with trailing slashPort check : Ensure port 8081 is free (e.g., netstat -ano|findstr "8081" should return no results).
Install dependencies and launch : In the user directory run:
npm i
npm run serveThe development server starts on port 8080. Open the displayed URL in a browser.
Optional production build :
Run npm run build to generate user/dist.
Serve the static files with an Express server (see the repository README for an index.js example). Place the dist contents in a www folder and access via http://localhost:3010/index.html. Replace localhost with the server’s IP for remote access.
Admin Backend
API endpoint configuration : Edit admin/src/main.js:
Vue.prototype.apiUrl = 'http://localhost:3000'; // backend API
Vue.prototype.adminUrl = 'http://localhost:8080'; // user‑side address
axios.defaults.baseURL = 'http://localhost:3000/'; // with trailing slashInstall dependencies and launch : In the admin directory run:
npm i
npm run serveThe admin console runs on port 8081. Log in with the highest‑privilege credentials admin / 123456.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Open Source Tech Hub
Sharing cutting-edge internet technologies and practical AI resources.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
