A modern, beautiful Minecraft server website with installation wizard and admin panel
- 🎨 Modern UI - Glassmorphism design with light/dark theme switching
- 🔧 One-Click Installation - WordPress-like installation wizard, easy to set up
- 👤 Admin System - Secure account management and Session authentication
- 📊 Server Status - Real-time display of Minecraft server online players and status
- 🖼️ Gallery - Beautiful waterfall layout image display
- 📝 Members - Server members showcase page
- 📱 Responsive - Perfect adaptation for mobile and desktop
MinecraftServerWebsite/
├── src/ # Frontend source code
│ ├── api/ # API calls
│ ├── components/ # Vue components
│ ├── views/ # Page views
│ ├── router/ # Router configuration
│ ├── stores/ # Pinia state management
│ └── main.ts # Entry file
├── ServerBackend/ # Backend service
│ ├── config/ # Configuration files
│ ├── routes/ # API routes
│ ├── utils/ # Utility functions
│ └── server.js # Server entry
├── public/ # Public assets
├── .env.example # Environment variables template
└── package.json # Project dependencies
- Node.js >= 16.x (Recommended 20.x)
- npm or yarn
git clone https://github.com/yourusername/MinecraftServerWebsite.git
cd MinecraftServerWebsiteInstall frontend dependencies:
npm installInstall backend dependencies:
cd ServerBackend
npm installFrontend configuration (.env):
cp .env.example .envEdit .env file:
VITE_SITE_NAME=Stars Server
VITE_API_BASE_URL=http://localhost:3003
VITE_SERVER_ADDRESS=mc.xinstudio.topBackend configuration (ServerBackend/.env):
cd ServerBackend
cp .env.example .envEdit ServerBackend/.env file:
PORT=3003
MC_SERVER_IP=localhost
MC_SERVER_PORT=25565
ADMIN_SESSION_SECRET=your_secret_keyStart backend (Terminal 1):
cd ServerBackend
npm startStart frontend (Terminal 2):
npm run devVisit: http://localhost:5173
Frontend:
- Vue 3 + TypeScript
- Vite 8
- Vue Router
- Pinia
- Axios
- Socket.IO Client
Backend:
- Node.js + Express
- Socket.IO
- GameDig (Minecraft server query)
- Crypto-JS (Encryption)
- Multer (File upload)
npm run buildThe built files will be in the dist/ directory.
cd ServerBackend
npm install --production
node server.jsOr use PM2:
npm install -g pm2
pm2 start server.js --name minecraft-website
pm2 save
pm2 startupUpload the contents of dist/ folder to your web server.
- Docker and Docker Compose installed
Create backend environment file:
cd ServerBackend
cp .env.example .envEdit ServerBackend/.env file with your configuration:
PORT=3003
MC_SERVER_IP=localhost
MC_SERVER_PORT=25565
ADMIN_SESSION_SECRET=your_secret_keyCreate root environment file:
cp .env.example .envEdit .env file with your configuration:
# Frontend configuration
VITE_SITE_NAME=My Server
VITE_API_BASE_URL=http://localhost:8080/api
# Docker configuration
DOCKER_VITE_API_BASE_URL=http://localhost:8080/api
DOCKER_CORS_ORIGIN=http://localhost:8080
FRONTEND_PORT=8080docker-compose up -d --buildThis will:
- Build and start the backend service on port 3001 (exposed internally)
- Build and start the frontend service on the specified port (default: 8080)
- Set up volume mounts for persistent data
Visit: http://localhost:8080
| Variable | Description | Default Value |
|---|---|---|
VITE_SITE_NAME |
Website name | My Server |
VITE_API_BASE_URL |
API base URL | http://localhost:8080/api |
DOCKER_VITE_API_BASE_URL |
API URL inside Docker | http://localhost:8080/api |
DOCKER_CORS_ORIGIN |
CORS origin for backend | http://localhost:8080 |
FRONTEND_PORT |
Frontend port | 8080 |
- Start services:
docker-compose up -d - Stop services:
docker-compose down - Restart services:
docker-compose restart - View logs:
docker-compose logs -f - Rebuild services:
docker-compose up -d --build
Frontend:
npm run dev # Development mode
npm run build # Production build
npm run preview # Preview production buildBackend:
npm start # Start server
node server.js # Run directly| Page | Route | Description |
|---|---|---|
| Home | / |
Homepage with server status and introduction |
| Server Status | /server |
Real-time server status, player list, MOTD |
| Gallery | /gallery |
Image gallery with upload management |
| Members | /members |
Server member introduction |
| Experience | /experience |
Server journey and highlights |
| Admin Login | /admin/login |
Administrator login page |
| Admin Panel | /admin |
Backend management dashboard |
| Installation | /install |
One-click installation wizard |
| Error | /error |
404 and other error pages |
- ✅ Password double encryption (Caesar + AES)
- ✅ Session authentication
- ✅ CORS whitelist
- ✅ Input validation
- ✅ File upload restrictions
Authentication / 认证:
POST /api/admin/login - Admin login / 管理员登录
POST /api/admin/logout - Admin logout / 管理员注销
GET /api/admin/check - Check auth status / 检查认证状态
Installation / 安装:
GET /api/install/status - Check installation status / 检查安装状态
POST /api/install - Perform installation / 执行安装
Images / 图片:
GET /api/images - Get all images / 获取所有图片
POST /api/images - Upload image / 上传图片
DELETE /api/images/:id - Delete image / 删除图片
PUT /api/images/:id - Update image info / 更新图片信息
Timeline / 时间线:
GET /api/timeline/images - Get timeline images / 获取时间线图片
POST /api/timeline/images - Upload timeline image / 上传时间线图片
DELETE /api/timeline/images/:id - Delete timeline image / 删除时间线图片
History / 历史:
GET /api/history - Get history records / 获取历史记录
POST /api/history - Add history record / 添加历史记录
DELETE /api/history/:id - Delete history record / 删除历史记录
Members / 成员:
GET /api/members - Get all members / 获取所有成员
POST /api/members - Add member / 添加成员
DELETE /api/members/:id - Delete member / 删除成员
PUT /api/members/:id - Update member / 更新成员
Server Status / 服务器状态:
GET /api/status - Get server status / 获取服务器状态
WebSocket /socket.io/ - Real-time status updates / 实时状态更新
Edit src/assets/styles/variables.scss to customize colors:
编辑 src/assets/styles/variables.scss 来自定义颜色:
:root {
--color-primary: #your-color;
--color-secondary: #your-color;
}- Replace
public/logo.jpgwith your logo - Update environment variables in
.env:VITE_SITE_NAMEVITE_SITE_AUTHORVITE_COPYRIGHT
替换 public/logo.jpg 为你的 logo,并更新 .env 中的环境变量。
Contributions are welcome! Please feel free to submit a Pull Request.
欢迎贡献!请随时提交 Pull Request。
- Fork the project
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
PickStars
- GitHub: @PickStars
- Website: xc.xinstudio.top
Made with ❤️ by PickStars
⭐ If you like this project, please give it a star!