Initial commit
This commit is contained in:
commit
11d8229eb5
8 changed files with 1914 additions and 0 deletions
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
node_modules/
|
||||||
|
|
4
README.md
Normal file
4
README.md
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
# Minecluster
|
||||||
|
Minecluster or MCL is a web interface used to manage multiple instance of Minecraft Servers in Kubernetes. This app is built to be an all in one for self-hosting Minecraft servers.
|
||||||
|
|
||||||
|
More info coming soon.
|
14
index.html
Normal file
14
index.html
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
|
<meta name="description" content="Minecraft Servers in Kubernetes" />
|
||||||
|
<title>Minecluster</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<noscript>You need to enable JavaScript to run Minecluster</noscript>
|
||||||
|
<div id="mcl"></div>
|
||||||
|
<script type="module" src="/src/App.jsx"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
1808
package-lock.json
generated
Normal file
1808
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
31
package.json
Normal file
31
package.json
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
{
|
||||||
|
"name": "minecluster",
|
||||||
|
"version": "0.0.1-alpha.0",
|
||||||
|
"description": "Minecraft Server management using Kubernetes",
|
||||||
|
"type": "module",
|
||||||
|
"scripts": {
|
||||||
|
"build:react": "vite build",
|
||||||
|
"start": "node dist/app.js",
|
||||||
|
"dev:server": "nodemon dist/app.js",
|
||||||
|
"dev:react": "vite"
|
||||||
|
},
|
||||||
|
"keywords": [
|
||||||
|
"Minecraft",
|
||||||
|
"Minecraft Server",
|
||||||
|
"Minecraft Admin",
|
||||||
|
"RCON",
|
||||||
|
"Kubernetes"
|
||||||
|
],
|
||||||
|
"author": "Dunemask",
|
||||||
|
"license": "LGPL-2.1",
|
||||||
|
"devDependencies": {
|
||||||
|
"@tanstack/react-query": "^4.26.0",
|
||||||
|
"@vitejs/plugin-react": "^3.1.0",
|
||||||
|
"concurrently": "^7.6.0",
|
||||||
|
"prettier": "^2.8.4",
|
||||||
|
"react": "^18.2.0",
|
||||||
|
"react-dom": "^18.2.0",
|
||||||
|
"react-router-dom": "^6.8.2",
|
||||||
|
"vite": "^4.1.4"
|
||||||
|
}
|
||||||
|
}
|
6
src/App.jsx
Normal file
6
src/App.jsx
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
import { createRoot } from "react-dom/client";
|
||||||
|
import MCL from "./MCL.jsx";
|
||||||
|
const appRoot = document.getElementById("mcl");
|
||||||
|
const root = createRoot(appRoot);
|
||||||
|
|
||||||
|
root.render(<MCL />);
|
17
src/MCL.jsx
Normal file
17
src/MCL.jsx
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
// Imports
|
||||||
|
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
||||||
|
import { BrowserRouter } from "react-router-dom";
|
||||||
|
// Create a query client for the app
|
||||||
|
const queryClient = new QueryClient();
|
||||||
|
// Export Minecluster
|
||||||
|
export default function MCL() {
|
||||||
|
return (
|
||||||
|
<div className="mcl">
|
||||||
|
<QueryClientProvider client={queryClient}>
|
||||||
|
<BrowserRouter>
|
||||||
|
<h1>Welcome to Minecluster!</h1>
|
||||||
|
</BrowserRouter>
|
||||||
|
</QueryClientProvider>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
32
vite.config.js
Normal file
32
vite.config.js
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
import { defineConfig } from "vite";
|
||||||
|
import react from "@vitejs/plugin-react";
|
||||||
|
import path from "node:path";
|
||||||
|
|
||||||
|
const { MCL_VITE_BACKEND_URL, MCL_VITE_DEV_PORT } = process.env;
|
||||||
|
const backendUrl = MCL_VITE_BACKEND_URL ?? "http://localhost:52000";
|
||||||
|
const vitePort = MCL_VITE_DEV_PORT ?? 52025;
|
||||||
|
export default () => {
|
||||||
|
return defineConfig({
|
||||||
|
plugins: [react()],
|
||||||
|
server: {
|
||||||
|
host: "0.0.0.0",
|
||||||
|
port: vitePort,
|
||||||
|
proxy: {
|
||||||
|
"/api": backendUrl,
|
||||||
|
"/socket.io": backendUrl,
|
||||||
|
},
|
||||||
|
hmr: {
|
||||||
|
protocol: process.env.MCL,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
build: {
|
||||||
|
outDir: "./build",
|
||||||
|
},
|
||||||
|
base: "/mcl/",
|
||||||
|
resolve: {
|
||||||
|
alias: {
|
||||||
|
"@mcl": path.resolve("./src"),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
};
|
Loading…
Add table
Add a link
Reference in a new issue