Skip to content

Commit f988e8b

Browse files
authored
Merge pull request #10 from Ketbome/documentation
Documentation
2 parents 5265bfa + 807baf6 commit f988e8b

81 files changed

Lines changed: 10094 additions & 41 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Readme.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ A modern web-based panel for managing multiple Minecraft servers using Docker.
1212

1313
Built on top of [itzg/docker-minecraft-server](https://github.com/itzg/docker-minecraft-server) and [itzg/docker-mc-backup](https://github.com/itzg/docker-mc-backup).
1414

15-
![Dashboard View](./assets/Animation.gif)
15+
![Dashboard View](./doc/img/Animation.gif)
1616

1717
## Why Minepanel?
1818

@@ -258,6 +258,29 @@ docker compose down
258258
docker compose exec minepanel sh
259259
```
260260

261+
## 📚 Documentation
262+
263+
Full documentation is available at [Minepanel Docs](https://github.com/Ketbome/minepanel/tree/main/doc):
264+
265+
- **[Getting Started](./doc/getting-started.md)** - Quick start guide
266+
- **[Installation](./doc/installation.md)** - All installation methods
267+
- **[Configuration](./doc/configuration.md)** - Customize your setup
268+
- **[Features](./doc/features.md)** - Explore all features
269+
- **[Architecture](./doc/architecture.md)** - How it works
270+
- **[API Reference](./doc/api.md)** - Complete API documentation
271+
- **[Development](./doc/development.md)** - Contributing guide
272+
- **[FAQ](./doc/faq.md)** - Common questions
273+
274+
To run the documentation locally:
275+
276+
```bash
277+
cd doc
278+
npm install
279+
npm run docs:dev
280+
```
281+
282+
Visit http://localhost:5173
283+
261284
## 🛠️ Development
262285

263286
Want to modify the code or build from source?
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import { ServerConfig } from './server-config.model';
2+
3+
export class ServerListItemDto {
4+
id: string;
5+
serverName: string;
6+
motd: string;
7+
port: string;
8+
serverType: 'VANILLA' | 'FORGE' | 'AUTO_CURSEFORGE' | 'CURSEFORGE' | 'SPIGOT' | 'FABRIC' | 'MAGMA' | 'PAPER' | 'QUILT' | 'BUKKIT' | 'PUFFERFISH' | 'PURPUR' | 'LEAF' | 'FOLIA';
9+
active: boolean;
10+
11+
static fromServerConfig(config: ServerConfig): ServerListItemDto {
12+
return {
13+
id: config.id,
14+
serverName: config.serverName || config.id,
15+
motd: config.motd || 'Un servidor de Minecraft increíble',
16+
port: config.port || '25565',
17+
serverType: config.serverType || 'VANILLA',
18+
active: config.active ?? false,
19+
};
20+
}
21+
22+
static fromServerConfigs(configs: ServerConfig[]): ServerListItemDto[] {
23+
return configs.map((config) => this.fromServerConfig(config));
24+
}
25+
}

backend/src/server-management/server-management.controller.ts

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { Controller, Get, Post, Body, Param, NotFoundException, Put, Query, BadR
22
import { DockerComposeService } from 'src/docker-compose/docker-compose.service';
33
import { ServerManagementService } from './server-management.service';
44
import { UpdateServerConfigDto } from './dto/server-config.model';
5+
import { ServerListItemDto } from './dto/server-list-item.dto';
56

67
@Controller('servers')
78
export class ServerManagementController {
@@ -11,8 +12,9 @@ export class ServerManagementController {
1112
) {}
1213

1314
@Get()
14-
async getAllServers() {
15-
return this.dockerComposeService.getAllServerConfigs();
15+
async getAllServers(): Promise<ServerListItemDto[]> {
16+
const serverConfigs = await this.dockerComposeService.getAllServerConfigs();
17+
return ServerListItemDto.fromServerConfigs(serverConfigs);
1618
}
1719

1820
@Get('all-status')
@@ -156,15 +158,9 @@ export class ServerManagementController {
156158
}
157159

158160
@Get(':id/logs')
159-
async getServerLogs(
160-
@Param('id') id: string,
161-
@Query('lines') lines?: number,
162-
@Query('since') since?: string,
163-
@Query('stream') stream?: string
164-
) {
165-
// Validate lines parameter
161+
async getServerLogs(@Param('id') id: string, @Query('lines') lines?: number, @Query('since') since?: string, @Query('stream') stream?: string) {
166162
const lineCount = lines && lines > 0 ? Math.min(lines, 10000) : 100; // Max 10k lines for safety
167-
163+
168164
if (stream === 'true' && since) {
169165
// Use the streaming method with since parameter
170166
return this.managementService.getServerLogsStream(id, lineCount, since);
@@ -178,21 +174,13 @@ export class ServerManagementController {
178174
}
179175

180176
@Get(':id/logs/stream')
181-
async getServerLogsStream(
182-
@Param('id') id: string,
183-
@Query('lines') lines?: number,
184-
@Query('since') since?: string
185-
) {
177+
async getServerLogsStream(@Param('id') id: string, @Query('lines') lines?: number, @Query('since') since?: string) {
186178
const lineCount = lines && lines > 0 ? Math.min(lines, 5000) : 500;
187179
return this.managementService.getServerLogsStream(id, lineCount, since);
188180
}
189181

190182
@Get(':id/logs/since/:timestamp')
191-
async getServerLogsSince(
192-
@Param('id') id: string,
193-
@Param('timestamp') timestamp: string,
194-
@Query('lines') lines?: number
195-
) {
183+
async getServerLogsSince(@Param('id') id: string, @Param('timestamp') timestamp: string, @Query('lines') lines?: number) {
196184
const lineCount = lines && lines > 0 ? Math.min(lines, 5000) : 1000;
197185
return this.managementService.getServerLogsSince(id, timestamp, lineCount);
198186
}

doc/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
doc/
2+
.vitepress/cache/
3+
node_modules/

doc/.vitepress/config.mts

Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
import { defineConfig } from "vitepress";
2+
3+
// https://vitepress.dev/reference/site-config
4+
export default defineConfig({
5+
title: "Minepanel Documentation",
6+
description:
7+
"Modern Minecraft Server Management Panel - Complete documentation and guides",
8+
9+
head: [
10+
["link", { rel: "icon", href: "/img/favicon.ico" }],
11+
["meta", { name: "theme-color", content: "#3eaf7c" }],
12+
["meta", { name: "og:type", content: "website" }],
13+
["meta", { name: "og:locale", content: "en" }],
14+
[
15+
"meta",
16+
{
17+
name: "og:title",
18+
content: "Minepanel | Modern Minecraft Server Management",
19+
},
20+
],
21+
[
22+
"meta",
23+
{
24+
name: "og:description",
25+
content:
26+
"Manage multiple Minecraft servers with a beautiful web interface using Docker",
27+
},
28+
],
29+
["meta", { name: "og:site_name", content: "Minepanel" }],
30+
],
31+
32+
themeConfig: {
33+
// https://vitepress.dev/reference/default-theme-config
34+
logo: "/img/cubo.svg",
35+
36+
nav: [
37+
{ text: "Home", link: "/" },
38+
{ text: "Getting Started", link: "/getting-started" },
39+
{ text: "Guide", link: "/installation" },
40+
{
41+
text: "Resources",
42+
items: [
43+
{ text: "Features", link: "/features" },
44+
{ text: "Architecture", link: "/architecture" },
45+
{ text: "API Reference", link: "/api" },
46+
{ text: "Development", link: "/development" },
47+
{ text: "FAQ", link: "/faq" },
48+
],
49+
},
50+
{
51+
text: "Links",
52+
items: [
53+
{ text: "GitHub", link: "https://github.com/Ketbome/minepanel" },
54+
{
55+
text: "Docker Hub",
56+
link: "https://hub.docker.com/r/ketbom/minepanel",
57+
},
58+
{
59+
text: "Report Issue",
60+
link: "https://github.com/Ketbome/minepanel/issues",
61+
},
62+
],
63+
},
64+
],
65+
66+
sidebar: [
67+
{
68+
text: "🚀 Getting Started",
69+
collapsed: false,
70+
items: [
71+
{ text: "Introduction", link: "/getting-started" },
72+
{ text: "Installation", link: "/installation" },
73+
{ text: "Configuration", link: "/configuration" },
74+
],
75+
},
76+
{
77+
text: "📖 Guide",
78+
collapsed: false,
79+
items: [
80+
{ text: "Features Overview", link: "/features" },
81+
{ text: "Architecture", link: "/architecture" },
82+
{ text: "Development", link: "/development" },
83+
{ text: "API Reference", link: "/api" },
84+
],
85+
},
86+
{
87+
text: "❓ Help",
88+
collapsed: false,
89+
items: [{ text: "FAQ", link: "/faq" }],
90+
},
91+
],
92+
93+
socialLinks: [
94+
{ icon: "github", link: "https://github.com/Ketbome/minepanel" },
95+
{ icon: "docker", link: "https://hub.docker.com/r/ketbom/minepanel" },
96+
],
97+
98+
footer: {
99+
message: "Released under the MIT License.",
100+
copyright: "Copyright © 2024 Ketbome",
101+
},
102+
103+
editLink: {
104+
pattern: "https://github.com/Ketbome/minepanel/edit/main/doc/:path",
105+
text: "Edit this page on GitHub",
106+
},
107+
108+
search: {
109+
provider: "local",
110+
options: {
111+
translations: {
112+
button: {
113+
buttonText: "Search",
114+
buttonAriaLabel: "Search",
115+
},
116+
modal: {
117+
displayDetails: "Display detailed list",
118+
resetButtonTitle: "Reset search",
119+
backButtonTitle: "Close search",
120+
noResultsText: "No results for",
121+
footer: {
122+
selectText: "to select",
123+
selectKeyAriaLabel: "enter",
124+
navigateText: "to navigate",
125+
navigateUpKeyAriaLabel: "up arrow",
126+
navigateDownKeyAriaLabel: "down arrow",
127+
closeText: "to close",
128+
closeKeyAriaLabel: "escape",
129+
},
130+
},
131+
},
132+
},
133+
},
134+
135+
outline: {
136+
level: [2, 3],
137+
label: "On this page",
138+
},
139+
},
140+
141+
lastUpdated: true,
142+
143+
markdown: {
144+
lineNumbers: true,
145+
theme: {
146+
light: "github-light",
147+
dark: "github-dark",
148+
},
149+
},
150+
151+
ignoreDeadLinks: [
152+
// Ignore localhost links
153+
/^http:\/\/localhost/,
154+
/^https:\/\/localhost/,
155+
// Ignore local IP addresses
156+
/^http:\/\/127\.0\.0\.1/,
157+
/^http:\/\/192\.168\./,
158+
],
159+
});

doc/.vitepress/dist/404.html

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<!DOCTYPE html>
2+
<html lang="en-US" dir="ltr">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta name="viewport" content="width=device-width,initial-scale=1">
6+
<title>404 | Minepanel Documentation</title>
7+
<meta name="description" content="Not Found">
8+
<meta name="generator" content="VitePress v2.0.0-alpha.12">
9+
<link rel="preload stylesheet" href="/assets/style.DlwjX6m1.css" as="style">
10+
<link rel="preload stylesheet" href="/vp-icons.css" as="style">
11+
12+
<script type="module" src="/assets/app.DDBM5M4C.js"></script>
13+
<link rel="preload" href="/assets/inter-roman-latin.Di8DUHzh.woff2" as="font" type="font/woff2" crossorigin="">
14+
<link rel="icon" href="/img/favicon.ico">
15+
<meta name="theme-color" content="#3eaf7c">
16+
<meta name="og:type" content="website">
17+
<meta name="og:locale" content="en">
18+
<meta name="og:title" content="Minepanel | Modern Minecraft Server Management">
19+
<meta name="og:description" content="Manage multiple Minecraft servers with a beautiful web interface using Docker">
20+
<meta name="og:site_name" content="Minepanel">
21+
<script id="check-dark-mode">(()=>{const e=localStorage.getItem("vitepress-theme-appearance")||"auto",a=window.matchMedia("(prefers-color-scheme: dark)").matches;(!e||e==="auto"?a:e==="dark")&&document.documentElement.classList.add("dark")})();</script>
22+
<script id="check-mac-os">document.documentElement.classList.toggle("mac",/Mac|iPhone|iPod|iPad/i.test(navigator.platform));</script>
23+
</head>
24+
<body>
25+
<div id="app"></div>
26+
<script>window.__VP_HASH_MAP__=JSON.parse("{\"architecture.md\":\"DLQzszGI\",\"configuration.md\":\"C1r7kDOO\",\"development.md\":\"BMDex9XG\",\"faq.md\":\"Dg3TVjqa\",\"features.md\":\"BTggy3hA\",\"getting-started.md\":\"D6Zz_KqM\",\"index.md\":\"DYmNvXWA\",\"installation.md\":\"DpaL9ZBF\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"Minepanel Documentation\",\"description\":\"Modern Minecraft Server Management Panel - Complete documentation and guides\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"logo\":\"/img/cubo.svg\",\"nav\":[{\"text\":\"Home\",\"link\":\"/\"},{\"text\":\"Getting Started\",\"link\":\"/getting-started\"},{\"text\":\"Guide\",\"link\":\"/installation\"},{\"text\":\"Resources\",\"items\":[{\"text\":\"Features\",\"link\":\"/features\"},{\"text\":\"Architecture\",\"link\":\"/architecture\"},{\"text\":\"Development\",\"link\":\"/development\"},{\"text\":\"FAQ\",\"link\":\"/faq\"}]},{\"text\":\"Links\",\"items\":[{\"text\":\"GitHub\",\"link\":\"https://github.com/Ketbome/minepanel\"},{\"text\":\"Docker Hub\",\"link\":\"https://hub.docker.com/r/ketbom/minepanel\"},{\"text\":\"Report Issue\",\"link\":\"https://github.com/Ketbome/minepanel/issues\"}]}],\"sidebar\":[{\"text\":\"🚀 Getting Started\",\"collapsed\":false,\"items\":[{\"text\":\"Introduction\",\"link\":\"/getting-started\"},{\"text\":\"Installation\",\"link\":\"/installation\"},{\"text\":\"Configuration\",\"link\":\"/configuration\"}]},{\"text\":\"📖 Guide\",\"collapsed\":false,\"items\":[{\"text\":\"Features Overview\",\"link\":\"/features\"},{\"text\":\"Architecture\",\"link\":\"/architecture\"},{\"text\":\"Development\",\"link\":\"/development\"}]},{\"text\":\"❓ Help\",\"collapsed\":false,\"items\":[{\"text\":\"FAQ\",\"link\":\"/faq\"}]}],\"socialLinks\":[{\"icon\":\"github\",\"link\":\"https://github.com/Ketbome/minepanel\"},{\"icon\":\"docker\",\"link\":\"https://hub.docker.com/r/ketbom/minepanel\"}],\"footer\":{\"message\":\"Released under the MIT License.\",\"copyright\":\"Copyright © 2024 Ketbome\"},\"editLink\":{\"pattern\":\"https://github.com/Ketbome/minepanel/edit/main/doc/:path\",\"text\":\"Edit this page on GitHub\"},\"search\":{\"provider\":\"local\",\"options\":{\"translations\":{\"button\":{\"buttonText\":\"Search\",\"buttonAriaLabel\":\"Search\"},\"modal\":{\"displayDetails\":\"Display detailed list\",\"resetButtonTitle\":\"Reset search\",\"backButtonTitle\":\"Close search\",\"noResultsText\":\"No results for\",\"footer\":{\"selectText\":\"to select\",\"selectKeyAriaLabel\":\"enter\",\"navigateText\":\"to navigate\",\"navigateUpKeyAriaLabel\":\"up arrow\",\"navigateDownKeyAriaLabel\":\"down arrow\",\"closeText\":\"to close\",\"closeKeyAriaLabel\":\"escape\"}}}}},\"outline\":{\"level\":[2,3],\"label\":\"On this page\"}},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false,\"additionalConfig\":{}}");</script>
27+
28+
</body>
29+
</html>

doc/.vitepress/dist/architecture.html

Lines changed: 220 additions & 0 deletions
Large diffs are not rendered by default.
38.3 MB
Loading

doc/.vitepress/dist/assets/app.DDBM5M4C.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)