diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index a8aaefa..0000000 --- a/.eslintrc.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": ["next/core-web-vitals"], - "rules": { - "react-hooks/exhaustive-deps": "off", - "react/no-unescaped-entities": "off", - "react/display-name": "off" - } -} diff --git a/.gitignore b/.gitignore index 36a6e5e..13a2492 100644 --- a/.gitignore +++ b/.gitignore @@ -1,48 +1,38 @@ # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. -# dependencies -/node_modules -/.pnp +# Dependencies +node_modules +.pnp .pnp.js -.yarn/install-state.gz + +# Local env files +.env +apps/www/.env.local +.env.development.local +.env.test.local +.env.production.local + +# Testing +coverage + +# Turbo .turbo -# contentlayer -.contentlayer +# Vercel +.vercel -# cron -/cron/dist -/cron/node_modules +# Build Outputs +.next/ +out/ +build +dist -# testing -/coverage -# next.js -/.next/ -/out/ - -# production -/build - -# misc -.DS_Store -*.pem - -# debug +# Debug npm-debug.log* yarn-debug.log* yarn-error.log* -# local env files -.env*.local - -# vercel -.vercel - -# typescript -*.tsbuildinfo -next-env.d.ts - -css-obfuscator - -*.sync-conflict* \ No newline at end of file +# Misc +.DS_Store +*.pem diff --git a/.idea/.gitignore b/.idea/.gitignore index 88bf7a7..13566b8 100644 --- a/.idea/.gitignore +++ b/.idea/.gitignore @@ -1,8 +1,8 @@ -# Ignore everything for IntelliJ except for project essential code-styles -* - -!copyright/* -!codeStyles/* -!.gitignore - -!*/ \ No newline at end of file +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/MHSF-Modern.iml b/.idea/MHSF-Modern.iml new file mode 100644 index 0000000..24643cc --- /dev/null +++ b/.idea/MHSF-Modern.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml deleted file mode 100644 index 5dcac8f..0000000 --- a/.idea/codeStyles/Project.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml deleted file mode 100644 index 79ee123..0000000 --- a/.idea/codeStyles/codeStyleConfig.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/copyright/MIT_License_f__MHSF.xml b/.idea/copyright/MIT_License_f__MHSF.xml index 2813261..77536ee 100644 --- a/.idea/copyright/MIT_License_f__MHSF.xml +++ b/.idea/copyright/MIT_License_f__MHSF.xml @@ -1,6 +1,6 @@ - \ No newline at end of file diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml index a915e37..2ebca56 100644 --- a/.idea/copyright/profiles_settings.xml +++ b/.idea/copyright/profiles_settings.xml @@ -1,3 +1,7 @@ - + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..03d9549 --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..3bd27f7 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..c94970a --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..e69de29 diff --git a/.tool-versions b/.tool-versions deleted file mode 100644 index e2a1032..0000000 --- a/.tool-versions +++ /dev/null @@ -1 +0,0 @@ -nodejs 23.3.0 diff --git a/.vercelignore b/.vercelignore deleted file mode 100644 index 465c6c3..0000000 --- a/.vercelignore +++ /dev/null @@ -1,2 +0,0 @@ -backend-mh-api/ -cron/ \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index e4ad59b..e68acd7 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,3 +1,3 @@ { - "copyright-header-injector.copyrightText": "/*\n * MHSF, Minehut Server List\n * All external content is rather licensed under the ECA Agreement\n * located here: https://mhsf.app/docs/legal/external-content-agreement\n *\n * All code under MHSF is licensed under the MIT License\n * by open source contributors\n *\n * Copyright (c) 2024 dvelo\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n * OTHER DEALINGS IN THE SOFTWARE.\n */" + "copyright-header-injector.copyrightText": "/*\n * MHSF, Minehut Server List\n * All external content is rather licensed under the ECA Agreement\n * located here: https://mhsf.app/docs/legal/external-content-agreement\n *\n * All code under MHSF is licensed under the MIT License\n * by open source contributors\n *\n * Copyright (c) 2025 dvelo\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n * OTHER DEALINGS IN THE SOFTWARE.\n */" } \ No newline at end of file diff --git a/LICENSE b/LICENSE deleted file mode 100644 index d5a32ef..0000000 --- a/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2024 dvelo - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/backend-mh-api/src/index.ts b/backend-mh-api/src/index.ts deleted file mode 100644 index a2ab335..0000000 --- a/backend-mh-api/src/index.ts +++ /dev/null @@ -1,27 +0,0 @@ -import * as express from "express"; -import { config } from "dotenv"; - -config(); -const app = express(); - -app.get("/", (req, res) => { - res.send({ status: "up" }); -}); - -app.get("/servers", (req, res) => { - if ( - req.headers.Authentication !== - `MHSF-Backend-Server ${process.env.MHSF_SECRET}` - ) - res.status(401).send({ error: "Unauthorized" }); - else - fetch("https://api.minehut.com/servers").then((c) => { - c.json().then((v) => { - res.send(v); - }); - }); -}); - -app.listen(6080, () => { - console.log("Backend API listening on port 6080"); -}); diff --git a/biome.json b/biome.json deleted file mode 100644 index faa0495..0000000 --- a/biome.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "$schema": "./node_modules/@biomejs/biome/configuration_schema.json", - "linter": { - "rules": { - "style": { - "useTemplate": "off", - "useImportType": "warn" - }, - "suspicious": { - "noExplicitAny": "off", - "noDoubleEquals": "warn" - }, - "complexity": { - "noForEach": "off" - } - } - } -} diff --git a/components.json b/components.json deleted file mode 100644 index 59e0a29..0000000 --- a/components.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "$schema": "https://ui.shadcn.com/schema.json", - "style": "new-york", - "rsc": true, - "tsx": true, - "tailwind": { - "config": "tailwind.config.ts", - "css": "src/app/globals.css", - "baseColor": "slate", - "cssVariables": true, - "prefix": "" - }, - "aliases": { - "components": "@/components", - "utils": "@/lib/utils" - } -} diff --git a/contentlayer.config.js b/contentlayer.config.js deleted file mode 100755 index c45fc27..0000000 --- a/contentlayer.config.js +++ /dev/null @@ -1,84 +0,0 @@ -/* - * MHSF, Minehut Server List - * All external content is rather licensed under the ECA Agreement - * located here: https://list.mlnehut.com/docs/legal/external-content-agreement - * - * All code under MHSF is licensed under the MIT License - * by open source contributors - * - * Copyright (c) 2024 dvelo - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES - * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - */ - -import { defineDocumentType, makeSource } from "contentlayer/source-files"; -import rehypeSlug from "rehype-slug"; -import GithubSlugger from "github-slugger"; - -export const Docs = defineDocumentType(() => ({ - name: "Docs", - filePathPattern: `**/*.mdx`, - contentType: "mdx", - fields: { - title: { - type: "string", - required: true, - }, - folder: { - type: "string", - required: false, - }, - lastUpdated: { - type: "string", - required: false, - }, - }, - computedFields: { - url: { - type: "string", - resolve: (docs) => `/docs/${docs._raw.flattenedPath}`, - }, - toc: { - type: "json", - resolve: async (doc) => { - const headingsRegex = /\n(?#{1,6})\s+(?.+)/g; - const slugger = new GithubSlugger(); - const headings = Array.from(doc.body.raw.matchAll(headingsRegex)).map( - ({ groups }) => { - const flag = groups?.flag; - const content = groups?.content; - return { - level: flag.length, - text: content, - slug: content ? slugger.slug(content) : undefined, - }; - }, - ); - return headings; - }, - }, - }, -})); - -export default makeSource({ - contentDirPath: "docs", - documentTypes: [Docs], - mdx: { rehypePlugins: [rehypeSlug] }, -}); diff --git a/docs/advanced/achievements.mdx b/docs/advanced/achievements.mdx deleted file mode 100644 index 7d6aee1..0000000 --- a/docs/advanced/achievements.mdx +++ /dev/null @@ -1,34 +0,0 @@ ---- -title: "Achievement Collection" -folder: "Advanced" ---- - -import { formalNames } from "@/config/achievements" - -# Achievements -Achievements are a page that every server gets which contains certain requirements which could be embedded in an servers history. - - - -These achievements are accessable using the "Achievements" tab on the left of any server page. -Achievements are *not* collected instantly, and are collected every 12 hours when the server is online (this is not timezone dependent). -There are currently {Object.keys(formalNames).length} possible achievements to get, ranging from easiest to hardest. - -## 1 thousand favorites achievement -After getting 1 thousand favorites on MHSF, and your server is online during the achievement collection, *you will get this achievement showing* when you got **1,000 users to favorite your server**. - - -## 1 thousand total joins achievement -After getting 1 thousand total joins on Minehut, and your server is online during the achievement collection, *you will get this achievement showing* when you got **1,000 users to join your server**. -
Here is a preview: - - -## 100 thousand favorites achievement -After getting 100 thousand favorites on MHSF, and your server is online during the achievement collection, *you will get this achievement showing* when you got **100 thousand users to favorite your server**. -
Here is a preview: - - -## 100 thousand total joins achievement -After getting 100 thousand total joins on Minehut, and your server is online during the achievement collection, *you will get this achievement showing* when you got **100 thousand users to join your server**. -
Here is a preview: - \ No newline at end of file diff --git a/docs/advanced/command-bar.mdx b/docs/advanced/command-bar.mdx deleted file mode 100644 index 21406ab..0000000 --- a/docs/advanced/command-bar.mdx +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: "Using the Command-bar" -folder: "Advanced" ---- - -# Using the Command-bar - -The command-bar has many mods and is a great tool for power-users to use as its built to be fast, while showing optimal information to the scenario - - - -## Triggering the command-bar - -There are two ways to trigger the command bar, using `Ctrl+K` and Ctrl + Shift + K. Both put you in a command-bar, however when using `Ctrl+K`, you go into a general page with other settings. -Using Ctrl + Shift + K opens a server viewer, and this may be faster then going through the general page. - -## Functions using Ctrl+K - -- **Servers** opens a server list, same as Ctrl + Shift + K -- **Sort Servers** allows you to go into a sorted server list quickly -- **Links** shows links useful for MHSF -- **Pick Random Server** picks a random server and shows the user what that server is, is similar to the one on [the server list](/) -

- **Profile (requires log-in):** -- **Favorites** shows the user their favorited servers -- **User Settings** shows the user the settings for Clerk - -## Servers - -This view shows the most popular 50 servers, and when searching, you can search for any server that exists (offline or online). -When clicking on a server, you see a simple view showing information about the server, along with a link to the server page. - -## Trigger from information popover - -Click the top-right info button, and click Open Commands. This will open the same `Ctrl+K` command-bar, if you would like to use it on mobile. diff --git a/docs/advanced/external.mdx b/docs/advanced/external.mdx deleted file mode 100644 index bccd615..0000000 --- a/docs/advanced/external.mdx +++ /dev/null @@ -1,94 +0,0 @@ ---- -title: "Troubleshooting: Making external servers on Minehut" -folder: "Advanced" ---- - -# External Servers on Minehut -I think creating external servers on Minehut is an advanced subject, and it is not documented well enough for the circumstances that -might occur with server owners. This is a [extension/rephrasing of the offical wiki guide](Wiki:External). All points in **bold** are things you shouldn't miss, and are commonly misread. - -
- -_Note: This is an unoffical guide, but the offical way of connecting! This is safe!_ -## Getting started -You must pick a host that allows the following when making external servers: - - **Editing server flags** Editing flags for the server to run is essential. There are many cases where you were not able to continue because your provider was resetting your flags back - - **A supported server software** For standalone servers, you must run on [Paper](https://papermc.io/software/paper). For proxy networks, you can use [Velocity](https://velocitypowered.com/), [Waterfall](https://papermc.io/software/waterfall) & [Lilypad](https://www.lilypadmc.org/). **BungeeCord is not supported by any means!** - -Minehut offically recommends Velocity, which you can find instructions [here](https://docs.papermc.io/velocity/getting-started) to get going! If you do not wish to use a proxy, using Paper is recommended, which you can find a guide [here](https://docs.papermc.io/paper/getting-started). -Before doing below, **make sure your proxy _actually works!_** - -## Changing flags -To ensure that Minehut can properly connect your players to your server, you need to add flags when booting up your server. These are commonly in `start.bat` or `start.sh` for Linux-based hosts. **Players cannot join your server from Minehut without adding these flags!** - - -### Velocity -Add the following `sessionserver` flag to your start script: - ``` - -Dmojang.sessionserver=https://api.minehut.com/mitm/proxy/session/minecraft/hasJoined - ``` - All flags put together should look like the following: - ``` - java -Dmojang.sessionserver=https://api.minehut.com/mitm/proxy/session/minecraft/hasJoined -jar velocity.jar - ``` - -### Paper - standalone - Like said above, if you run a proxy, add the flags for Velocity. **Adding both the Velocity (or any other proxy server) & Paper flags will cause your server to be unauthenticatable!**
- Add the following `auth.host`, `account.host`, `services.host` & `session.host` flags: - ``` - -Dminecraft.api.auth.host=https://authserver.mojang.com/ - -Dminecraft.api.account.host=https://api.mojang.com/ - -Dminecraft.api.services.host=https://api.minecraftservices.com/ - -Dminecraft.api.session.host=https://api.minehut.com/mitm/proxy - ``` - All the script together - ``` - java -Dminecraft.api.auth.host=https://authserver.mojang.com/ -Dminecraft.api.account.host=https://api.mojang.com/ -Dminecraft.api.services.host=https://api.minecraftservices.com/ -Dminecraft.api.session.host=https://api.minehut.com/mitm/proxy -jar paper.jar - ``` - **Along with this,** make sure to set the `enforce-secure-profile` flag in the `server.properties` file to `false`. - ``` - enable-status=true - # Set this to false! - enforce-secure-profile=false - enforce-whitelist=false - ``` - - -### Lilypad -Set the following environment variable `LILYPAD_MOJANG_SESSIONSERVER_URL` to `https://api.minehut.com/mitm/proxy/session/minecraft/hasJoined`. Environment variables are set as a seperate command in the start script: -``` -LILYPAD_MOJANG_SESSIONSERVER_URL="https://api.minehut.com/mitm/proxy/session/minecraft/hasJoined" -``` -If above doesn't work, try this: -``` -export LILYPAD_MOJANG_SESSIONSERVER_URL="https://api.minehut.com/mitm/proxy/session/minecraft/hasJoined" -``` - -## Enable Proxy Protocol -_Note: Skip this step if you're using [TCPShield](https://tcpshield.com/) for DDoS protection._ - -Enable proxy protocol in your proxy's configuration file: -### Velocity - -In `velocity.toml` under advanced, set -``` -haproxy-protocol = true -``` -### Waterfall - -In `config.yml` under listeners, set -``` -proxy_protocol: true -``` -### Paper - -In `config/paper-global.yml` under proxies, set -``` -proxy-protocol: true -``` - -## Thats it! -After this, there are mostly no more common issues. Continue on [the wiki](Wiki:External#Connect_Your_External_Server_Plan_on_Minehut)! - -## Have any issues? -Go to the offical Minehut Discord server and go into the [#ask-for-help](https://discord.com/channels/239599059415859200/1014801630295760897) channel and create a thread. \ No newline at end of file diff --git a/docs/advanced/tech-stack.mdx b/docs/advanced/tech-stack.mdx deleted file mode 100644 index f8768cc..0000000 --- a/docs/advanced/tech-stack.mdx +++ /dev/null @@ -1,24 +0,0 @@ ---- -title: "Tech-stack" -folder: "Advanced" ---- - -# Teck Stack of MHSF -The tech stack of MHSF is relatively modern to ensure MHSF keeps up with standards set for accessibility and usability. - -## Front-end -- **React** is used as a way to replicate components already used, and use the eco-system of pre-existing components -- **shadcn/ui** is the UI framework used to keep the whole website consistent. -- **Contentlayer** manages all the pages used for documentation -- **TailwindCSS** makes MHSF use (mostly) no CSS for better efficency -- **Sonner** provides the Toast used for MHSF - -## Back-end -- **Inngest** runs periodic tasks -- **MongoDB** is the database of choice for MHSF - -## Both -- **Clerk** is used for authentication of users -- **Next.js** is used to make sure API endpoints and front-end endpoints are on the same domain, along with lots of convient features -- **Vercel** is hosting MHSF (along with non-tracking analytics) - diff --git a/docs/getting-started.mdx b/docs/getting-started.mdx deleted file mode 100644 index b91b255..0000000 --- a/docs/getting-started.mdx +++ /dev/null @@ -1,31 +0,0 @@ ---- -title: "Getting Started" ---- - -# Getting Started to MHSF - -MHSF is an open-source wrapper for the traditional Minehut server list, either in the lobby or the one [built-in to the minehut.com website directly](https://app.minehut.com/servers). -The way MHSF communicates with Minehut is using the closed Minehut API discovered by using DevTools on the original Minehut page. -Along with this, there are entries that are completely third-party like for adding descriptions or banners. - -## What is a wrapper? - -Wrappers are usually free & open-source software that goes on-top of existing software that may be proprietary. There are many reasons for a wrapper to exist (privacy, automation, etc.), in MHSF's case, its because the Minehut server list provided by default just doesn't cut it. -Wrappers usually communicate using an API that was provided by the service its self, making software like MHSF completely legal. - -## Why to use MHSF - -- **Faster response times** MHSF is completely ad-free, and as a result of being open-source, constantly tries to cut down on unnecessary things slowing down the page. -- **Open-source & no tracking** As a result of being open-source, MHSF will never track or sell your data to advertisers. Anybody can look at the code, and can be verified to be completely secure. -- **Make your server stand out** Server owners can configure after appropriate verification banners, Discord widgets, descriptions & color schemes. -- **Customize your experience** Filters, sorts & different spacing settings can make your experience just how you like it while you are browsing servers. -- **Better & more intuitive UX/UI** UI is a big point for MHSF, using UI designed to be more user friendly, and to be more straight-forward then Minehut's -- **One focus** Because MHSF is only a server-list, it only has to be, _a server list!_ This means more updates and higher quality ones because all MHSF has to worry about, is the server list! - -## Will you get banned for this? - -No. Your Minehut account is not associated with your MHSF one, and consequently, you cannot be banned. There is no risk of getting banned by Minehut, as we are posing no threat to them. As long as you aren't spamming MHSF (or the API in general), you should be good. - -## Conclusion - -If you'd like to use MHSF, go to the server list [here](Special:Root) to try it out! You may also give MHSF a star on GitHub if you feel like this project deserves it. diff --git a/docs/guides/customization.mdx b/docs/guides/customization.mdx deleted file mode 100644 index 5f16cae..0000000 --- a/docs/guides/customization.mdx +++ /dev/null @@ -1,26 +0,0 @@ ---- -title: "Customization" -folder: "Guides" ---- - -# Customize your server -Customizing your server is very easy after you have [linked your account](Docs:guides/linking). Make sure you have done that before then. - -## Getting started -Make sure you've also [owned your server](Docs:guides/owning-a-server). - -## Customization Types -### Discord Server -Enable the server widget in your Discord server settings, and copy and paste in the Discord server ID, and your Discord server will appear! - -### Banner -Your server must have an image from [Imgur](https://imgur.com), and can be any image type that can be rendered on the web. Copy and paste the link (not the link after uploading the image, but by right clicking and hitting "Copy Image Address") into the input box! - -### Color Scheme -You can pick any color in the box and choosing a color scheme to show on your server specificly. - -### Description -You can use Markdown formatting to add a description to describe what your server is. - -## Thats it! -If you have additional customization types or other things you'd like us to add, [feel free to hit us with an issue on GitHub!](Special:GitHub) \ No newline at end of file diff --git a/docs/guides/linking.mdx b/docs/guides/linking.mdx deleted file mode 100644 index f5d0c5c..0000000 --- a/docs/guides/linking.mdx +++ /dev/null @@ -1,29 +0,0 @@ ---- -title: "Linking your account" -folder: "Guides" ---- - -# Linking your Minecraft account - -MHSF uses a safe & secure system to link your account that **doesn't use your Microsoft account in any way**. MHSF uses a simple system of logging into a server, and then putting a code into the website. - - - -## Prerequisites - -- An active account with MHSF (either linked through GitHub or Discord, or just a standard email account) -- A Minecraft Java Edition account (Bedrock accounts are not guaranteed to work, and could malfunction at some times) - -## Linking - -To get started, go into your account settings (your profile picture in top-right, and Profile & Security) and click Link Account. -Login to the server `MHSFPV.minehut.gg`. (its on a free plan, you may have to start it in the lobby) Take the code shown in chat, and put it into the OTP box. Hit Submit, and if the code is correct, your account will be linked! Congratulations! - -## Functions - -You can do many things with a linked account: - -- [Own a server](Docs:guides/owning-a-server) -- [Customize a server](Docs:guides/customization) - -More will be coming in future updates, however the only thing you can do with a linked account is server-based functions. diff --git a/docs/guides/owning-a-server.mdx b/docs/guides/owning-a-server.mdx deleted file mode 100644 index 702f0df..0000000 --- a/docs/guides/owning-a-server.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: "Own a server" -folder: "Guides" ---- - -# Owning a server - -Owning a server is quite simple and allows you to [customize your server](/docs/guides/customization) and make it stand out from other servers. Before owning your server, make sure you agree to the [ECA](Docs:legal/external-content-agreement). - -## Linking - -Find the server you would like to own (either by looking for it, or using the keyboard shortcut Ctrl+Shift+K and searching for it), and make sure your account has [already been linked with your Minecraft account](Docs:guides/linking). Go to the server, and hit the Customization tab. If the owner of the server, and the user your linked to match, you will gain access to the server. -If they match, you should see a button named Click to own. Press that button, and you should automagically own the server. Congratulations! - -## I can't link my server, because my server doesn't have a author - -Your server must have an author in-order to be automagically linked, and if it doesn't have an author, that means you will have to manually link your server. To do that, make an issue on GitHub, showing that your server has no author, but needs to be linked. Show proof that you own the server, along with your account username, and your account will own the server you need. - -## There is an error while linking my server! -This most likely is because the Minehut API is blocking the server-side request to verify your the owner of that server, or your server [has no author](#i-cant-link-my-server-because-my-server-doesnt-have-a-author). -Try again in 30 minute intervals, or just make an issue on GitHub to link your server. \ No newline at end of file diff --git a/docs/guides/reporting-server.mdx b/docs/guides/reporting-server.mdx deleted file mode 100644 index 394ff81..0000000 --- a/docs/guides/reporting-server.mdx +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: "Reporting a server" -folder: "Guides" ---- - -# Reporting a server - -If you believe a server that you've seen is under breach of the [ECA Agreement](Docs:legal/external-content-agreement), you may request the server in question to be taken down. -Make sure you are logged into a account, and go to the server page and hit the customization tab. Hit the Report button, and add a reason to your report. -Your report will be processed and the appropriate action will be taken. - -## Issue inside the server -If an issue is inside of the server, because MHSF doesn't provide the server list source (Minehut API), you must [go to Minehut and make a ticket](https://support.minehut.com/hc/en-us/requests/new?tf_subject=Reporting%20Server&tf_27062997154195=reports_appeals&tf_27063229498259=report_server). \ No newline at end of file diff --git a/docs/legal/external-content-agreement.mdx b/docs/legal/external-content-agreement.mdx deleted file mode 100644 index 8a322db..0000000 --- a/docs/legal/external-content-agreement.mdx +++ /dev/null @@ -1,51 +0,0 @@ ---- -title: "External Content Agreement" -folder: "Legal" -lastUpdated: "Sep. 10th 2024" ---- - -# External Content Agreement (ECA) - -By making external content available for anyone to see, there needs to -be an agreement to keep MHSF ("Minehut Server List") a friendly place -for anyone to look at. _As such, this agreement outlines what you can't and can do, when making content on the platform._ The goal by making an agreement like this, is not to make you worried -what you can upload, its just showing what the limits of content -uploaded onto the platform are. - -## Source Code - -The source code for MHSF is defined by the [MIT License](Special:GitHub/blob/main/LICENSE). You are free to use MHSF for commercial use, and you may modify the software however you'd like. Taking copies of the software (aka _"forking"_) is also freely allowed. - -## What your limits are - -When creating content, if its a matter of making a profile picture, -or editing the description for a server, (and more), you must follow -the underlying agreements below.
-For making banners & descriptions, you must follow [Minehuts Terms of Service](Wiki:Rules) _as all content made is associated to Minehut (as the server is mostly on a community for Minehut)._
-For making Discord server embeds, you must follow [Discords Terms of Service](https://discord.com/terms/) _as all content made is associated to Discord._ - -### All other content - -For all other content, they must follow the following: - -- No inappropriate/adult images -- No swear words of any kind or slurs -- Endorsing unethical client modifications (aka cheating or hacking) - -## When you agree to the ECA - -When you add customization to your server, or add a profile picture (linking an account is included), you must follow the ECA. - -## When linking an account - -When linking an account, you must follow the privacy policy and terms of service to the associated service that you linked your MHSF account to. Additionally, if you link an external account{" "} -_after_ account creation, everything said before is still true. - -## Violations - -Violations from above have 1 warning. Your first interaction is a warning by removing the content from MHSF, and your 2nd is banning/deleting your account. (some violations are an instant delete) - -## Reporting - -If you personally see a violation of the ECA, you can report it by clicking the customization tab on a server, and hitting the Report -button (it doesn't appear when the server was never owned). If you misuse this feature, you may get your account deleted. diff --git a/docs/reading.mdx b/docs/reading.mdx deleted file mode 100644 index 4505313..0000000 --- a/docs/reading.mdx +++ /dev/null @@ -1,30 +0,0 @@ ---- -title: "Reading the docs" ---- - -# Reading the docs -The documentation in MHSF has some special symbols used in the docs that might be useful to know. - - - -## Icons -When looking at a link, there will be symbols used that indicate where the link is going: *(these apply to the whole site)* - - indicates the link will link to the [official Minehut wiki](Wiki:/) - - indicates the link will link to another page on the docs - - indicates the link will go to an external site - -When contributing, these links are as follows: -``` -Wiki: -Docs: -Special:Root (links back to /) -https://example.com - -**Example:** -[Ranks](Wiki:Ranks) -[Getting Started](Docs:Getting-started) -https://google.com -``` - -The icons above will be automatically added when using the syntax above.
-The source code for above is stored [here](Special:GitHub/edit/main/src/components/misc/Link.tsx) \ No newline at end of file diff --git a/next-sitemap.config.js b/next-sitemap.config.js deleted file mode 100644 index b35e009..0000000 --- a/next-sitemap.config.js +++ /dev/null @@ -1,5 +0,0 @@ -/** @type {import('next-sitemap').IConfig} */ -module.exports = { - siteUrl: "https://mhsf.app", - generateRobotsTxt: true -} \ No newline at end of file diff --git a/next.config.mjs b/next.config.mjs deleted file mode 100644 index fad225d..0000000 --- a/next.config.mjs +++ /dev/null @@ -1,54 +0,0 @@ -/* - * MHSF, Minehut Server List - * All external content is rather licensed under the ECA Agreement - * located here: https://list.mlnehut.com/docs/legal/external-content-agreement - * - * All code under MHSF is licensed under the MIT License - * by open source contributors - * - * Copyright (c) 2024 dvelo - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES - * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - */ - -import { withContentlayer } from "next-contentlayer"; - -/** @type {import('next').NextConfig} */ -const nextConfig = { - images: { - remotePatterns: [ - { - protocol: "https", - hostname: "img.clerk.com", - }, - ], - }, - async redirects() { - return [ - { - source: '/docs', - destination: '/docs/getting-started', - permanent: true, - }, - ] - }, -}; - -export default withContentlayer(nextConfig); diff --git a/package.json b/package.json index 316dbdb..82abfd2 100644 --- a/package.json +++ b/package.json @@ -1,125 +1,23 @@ { - "name": "mh-stats", - "version": "1.3.0", - "private": true, - "packageManager": "yarn@1.22.22", - "scripts": { - "dev": "next dev", - "build": "next build", - "start": "next start", - "lint": "next lint", - "obfuscate": "next-css-obfuscator", - "check-types": "tsc --noEmit", - "inngest": "npx inngest-cli@latest dev", - "postbuild": "next-sitemap" - }, - "dependencies": { - "@babel/parser": "^7.24.7", - "@biomejs/biome": "^1.8.3", - "@clerk/elements": "^0.22.2", - "@clerk/nextjs": "^6.9.2", - "@emotion/is-prop-valid": "^1.3.0", - "@linear/sdk": "^31.0.0", - "@monaco-editor/react": "^4.6.0", - "@radix-ui/react-aspect-ratio": "^1.1.1", - "@radix-ui/react-avatar": "^1.1.1", - "@radix-ui/react-collapsible": "^1.1.1", - "@radix-ui/react-hover-card": "^1.1.1", - "@radix-ui/react-icons": "^1.3.0", - "@radix-ui/react-menubar": "^1.1.1", - "@radix-ui/react-primitive": "^2.0.0", - "@radix-ui/react-select": "^2.1.2", - "@radix-ui/react-switch": "^1.1.0", - "@unocss/eslint-plugin": "^0.61.5", - "@unocss/postcss": "^0.61.5", - "@unocss/transformer-directives": "^0.61.5", - "@unocss/webpack": "^0.61.5", - "ag-grid-react": "^33.0.3", - "contentlayer": "^0.3.4", - "cron": "^3.1.7", - "discord.js": "^14.15.3", - "github-slugger": "^2.0.0", - "inngest": "^3.21.2", - "input-otp": "^1.2.4", - "json-beautify": "^1.1.1", - "lucide-react": "^0.454.0", - "minimessage-2-html": "1.6.0", - "minimessage-js": "^1.1.3", - "mongodb": "^6.8.0", - "next": "14.2.10", - "next-contentlayer": "^0.3.4", - "next-css-obfuscator": "^2.2.16", - "next-sitemap": "^4.2.3", - "next-themes": "^0.4.3", - "nextjs-toploader": "^1.6.12", - "nprogress": "^0.2.0", - "postcss-obfuscator": "^1.6.1", - "prettier": "^3.3.1", - "react": "^18", - "react-dom": "^18", - "react-fade-in": "^2.0.1", - "react-fast-marquee": "^1.6.5", - "react-hot-toast": "^2.4.1", - "react-qr-code": "^2.0.15", - "react-snowfall": "^2.2.0", - "rehype-slug": "^6.0.0", - "remark-gfm": "^4.0.0", - "sonner": "^1.7.0", - "stripe-gradient": "^1.0.1", - "tailwind-merge": "^2.3.0", - "tailwindcss-animate": "^1.0.7", - "tailwindcss-patch": "^4.0.0", - "turbo": "^2.4.0", - "unplugin-tailwindcss-mangle": "^3.0.1" - }, - "devDependencies": { - "@clerk/themes": "^2.1.19", - "@hookform/resolvers": "^3.9.0", - "@radix-ui/react-checkbox": "^1.1.1", - "@radix-ui/react-context-menu": "^2.1.5", - "@radix-ui/react-dialog": "^1.1.2", - "@radix-ui/react-dropdown-menu": "^2.1.2", - "@radix-ui/react-label": "^2.1.0", - "@radix-ui/react-navigation-menu": "^1.1.4", - "@radix-ui/react-popover": "^1.0.7", - "@radix-ui/react-radio-group": "^1.2.0", - "@radix-ui/react-scroll-area": "^1.1.0", - "@radix-ui/react-separator": "^1.1.0", - "@radix-ui/react-slot": "^1.1.0", - "@radix-ui/react-tabs": "^1.1.0", - "@radix-ui/react-tooltip": "^1.1.3", - "@tailwindcss/typography": "^0.5.13", - "@types/canvas-confetti": "^1.6.4", - "@types/node": "^20", - "@types/nprogress": "^0.2.3", - "@types/react": "^18", - "@types/react-dom": "^18", - "@types/react-twemoji": "^0.4.3", - "@unocss/eslint-config": "^0.61.5", - "@unocss/preset-uno": "^0.61.5", - "@unocss/transformer-compile-class": "^0.61.5", - "@vercel/analytics": "^1.3.1", - "@vercel/speed-insights": "^1.0.12", - "canvas-confetti": "^1.9.3", - "class-variance-authority": "^0.7.0", - "clsx": "^2.1.1", - "cmdk": "^1.0.0", - "eslint": "^8", - "eslint-config-next": "14.2.3", - "framer-motion": "^11.3.8", - "geist": "^1.3.0", - "mangle-css-class-webpack-plugin": "^5.1.0", - "postcss": "^8", - "react-hook-form": "^7.52.2", - "react-hotkeys-hook": "^4.5.0", - "react-infinite-scroll-component": "^6.1.0", - "react-markdown": "^9.0.1", - "react-resizable-panels": "^2.0.23", - "recharts": "^2.12.7", - "shiki": "^1.23.0", - "tailwindcss": "^3.4.1", - "typescript": "^5", - "vaul": "^0.9.1", - "zod": "^3.23.8" - } + "name": "MHSF-Modern", + "private": true, + "scripts": { + "build": "turbo build", + "dev": "turbo dev --filter=!cron", + "lint": "turbo lint", + "format": "prettier --write \"**/*.{ts,tsx,md}\"" + }, + "devDependencies": { + "prettier": "^3.5.0", + "turbo": "^2.4.2", + "typescript": "5.7.3" + }, + "engines": { + "node": ">=18" + }, + "packageManager": "yarn@1.22.22", + "workspaces": [ + "apps/*", + "packages/*" + ] } diff --git a/backend-mh-api/.gitignore b/packages/backend-mh-api/.gitignore similarity index 100% rename from backend-mh-api/.gitignore rename to packages/backend-mh-api/.gitignore diff --git a/backend-mh-api/README.md b/packages/backend-mh-api/README.md similarity index 100% rename from backend-mh-api/README.md rename to packages/backend-mh-api/README.md diff --git a/backend-mh-api/package.json b/packages/backend-mh-api/package.json similarity index 100% rename from backend-mh-api/package.json rename to packages/backend-mh-api/package.json diff --git a/src/lib/hooks/use-status.tsx b/packages/backend-mh-api/src/index.ts similarity index 69% rename from src/lib/hooks/use-status.tsx rename to packages/backend-mh-api/src/index.ts index f01c171..f1c1b90 100644 --- a/src/lib/hooks/use-status.tsx +++ b/packages/backend-mh-api/src/index.ts @@ -6,7 +6,7 @@ * All code under MHSF is licensed under the MIT License * by open source contributors * - * Copyright (c) 2024 dvelo + * Copyright (c) 2025 dvelo * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -28,22 +28,30 @@ * OTHER DEALINGS IN THE SOFTWARE. */ -import { useEffect, useState } from "react"; +import * as express from "express"; +import { config } from "dotenv"; -export default function useStatus() { - const [loading, setLoading] = useState(true); - const [incidents, setIncidents] = useState(null); - const [statusURL, setStatusURL] = useState(null); +config(); +const app = express(); - useEffect(() => { - fetch("/api/v1/get-status") - .then((c) => c.json()) - .then((d) => { - setLoading(false); - setIncidents(d.incidents); - setStatusURL(d.url); +app.get("/", (req, res) => { + res.send({ status: "up" }); +}); + +app.get("/servers", (req, res) => { + if ( + req.headers.Authentication !== + `MHSF-Backend-Server ${process.env.MHSF_SECRET}` + ) + res.status(401).send({ error: "Unauthorized" }); + else + fetch("https://api.minehut.com/servers").then((c) => { + c.json().then((v) => { + res.send(v); }); - }, []); + }); +}); - return { loading, incidents, statusURL }; -} +app.listen(6080, () => { + console.log("Backend API listening on port 6080"); +}); diff --git a/backend-mh-api/tsconfig.json b/packages/backend-mh-api/tsconfig.json similarity index 100% rename from backend-mh-api/tsconfig.json rename to packages/backend-mh-api/tsconfig.json diff --git a/backend-mh-api/yarn.lock b/packages/backend-mh-api/yarn.lock similarity index 100% rename from backend-mh-api/yarn.lock rename to packages/backend-mh-api/yarn.lock diff --git a/cron/.gitignore b/packages/cron/.gitignore similarity index 100% rename from cron/.gitignore rename to packages/cron/.gitignore diff --git a/cron/Dockerfile b/packages/cron/Dockerfile similarity index 100% rename from cron/Dockerfile rename to packages/cron/Dockerfile diff --git a/cron/README.md b/packages/cron/README.md similarity index 100% rename from cron/README.md rename to packages/cron/README.md diff --git a/cron/config.yaml b/packages/cron/config.yaml similarity index 100% rename from cron/config.yaml rename to packages/cron/config.yaml diff --git a/cron/package.json b/packages/cron/package.json similarity index 90% rename from cron/package.json rename to packages/cron/package.json index 4fc32d6..62f71e9 100644 --- a/cron/package.json +++ b/packages/cron/package.json @@ -4,7 +4,7 @@ "description": "In version 1.0, MHSF moved from using Inngest to collect statistics to a self-hosted `crontab` Node.js script.", "main": "dist/index.js", "scripts": { - "dev": "npx tsx src/index.ts", + "dev": "MHC_DOCKER=true npx tsx src/index.ts", "build": "npx tsc -p ./tsconfig.json" }, "author": "", diff --git a/cron/src/index.ts b/packages/cron/src/index.ts similarity index 98% rename from cron/src/index.ts rename to packages/cron/src/index.ts index 102f628..41cad9f 100644 --- a/cron/src/index.ts +++ b/packages/cron/src/index.ts @@ -1,12 +1,12 @@ /* * MHSF, Minehut Server List * All external content is rather licensed under the ECA Agreement - * located here: https://list.mlnehut.com/docs/legal/external-content-agreement + * located here: https://mhsf.app/docs/legal/external-content-agreement * * All code under MHSF is licensed under the MIT License * by open source contributors * - * Copyright (c) 2024 dvelo + * Copyright (c) 2025 dvelo * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to diff --git a/cron/src/types/achievement.ts b/packages/cron/src/types/achievement.ts similarity index 93% rename from cron/src/types/achievement.ts rename to packages/cron/src/types/achievement.ts index d13e511..c5db78e 100644 --- a/cron/src/types/achievement.ts +++ b/packages/cron/src/types/achievement.ts @@ -1,12 +1,12 @@ /* * MHSF, Minehut Server List * All external content is rather licensed under the ECA Agreement - * located here: https://list.mlnehut.com/docs/legal/external-content-agreement + * located here: https://mhsf.app/docs/legal/external-content-agreement * * All code under MHSF is licensed under the MIT License * by open source contributors * - * Copyright (c) 2024 dvelo + * Copyright (c) 2025 dvelo * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to diff --git a/cron/src/types/mh-server.ts b/packages/cron/src/types/mh-server.ts similarity index 96% rename from cron/src/types/mh-server.ts rename to packages/cron/src/types/mh-server.ts index 7048d56..18ebd72 100644 --- a/cron/src/types/mh-server.ts +++ b/packages/cron/src/types/mh-server.ts @@ -1,12 +1,12 @@ /* * MHSF, Minehut Server List * All external content is rather licensed under the ECA Agreement - * located here: https://list.mlnehut.com/docs/legal/external-content-agreement + * located here: https://mhsf.app/docs/legal/external-content-agreement * * All code under MHSF is licensed under the MIT License * by open source contributors * - * Copyright (c) 2024 dvelo + * Copyright (c) 2025 dvelo * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to diff --git a/cron/tsconfig.json b/packages/cron/tsconfig.json similarity index 100% rename from cron/tsconfig.json rename to packages/cron/tsconfig.json diff --git a/cron/yarn.lock b/packages/cron/yarn.lock similarity index 100% rename from cron/yarn.lock rename to packages/cron/yarn.lock diff --git a/postcss.config.mjs b/postcss.config.mjs deleted file mode 100644 index b713959..0000000 --- a/postcss.config.mjs +++ /dev/null @@ -1,38 +0,0 @@ -/* - * MHSF, Minehut Server List - * All external content is rather licensed under the ECA Agreement - * located here: https://list.mlnehut.com/docs/legal/external-content-agreement - * - * All code under MHSF is licensed under the MIT License - * by open source contributors - * - * Copyright (c) 2024 dvelo - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES - * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - */ - -/** @type {import('postcss-load-config').Config} */ -const config = { - plugins: { - tailwindcss: {}, - }, -}; - -export default config; diff --git a/public/branding/dark-banner.png b/public/branding/dark-banner.png deleted file mode 100644 index ccecbf6..0000000 Binary files a/public/branding/dark-banner.png and /dev/null differ diff --git a/public/branding/full-desktop-light.png b/public/branding/full-desktop-light.png deleted file mode 100644 index e6f1ffb..0000000 Binary files a/public/branding/full-desktop-light.png and /dev/null differ diff --git a/public/branding/full-desktop.png b/public/branding/full-desktop.png deleted file mode 100644 index 071c21b..0000000 Binary files a/public/branding/full-desktop.png and /dev/null differ diff --git a/public/branding/light-banner.png b/public/branding/light-banner.png deleted file mode 100644 index 9d09f93..0000000 Binary files a/public/branding/light-banner.png and /dev/null differ diff --git a/public/branding/meta-banner.png b/public/branding/meta-banner.png deleted file mode 100644 index fab38f5..0000000 Binary files a/public/branding/meta-banner.png and /dev/null differ diff --git a/public/favicon.ico b/public/favicon.ico deleted file mode 100644 index 9a1e9d5..0000000 Binary files a/public/favicon.ico and /dev/null differ diff --git a/public/imgs/badge1.gif b/public/imgs/badge1.gif deleted file mode 100644 index aea3d57..0000000 Binary files a/public/imgs/badge1.gif and /dev/null differ diff --git a/public/imgs/icon-cf.png b/public/imgs/icon-cf.png deleted file mode 100644 index 09cfcb4..0000000 Binary files a/public/imgs/icon-cf.png and /dev/null differ diff --git a/public/imgs/icon-gd.png b/public/imgs/icon-gd.png deleted file mode 100644 index 45a71b9..0000000 Binary files a/public/imgs/icon-gd.png and /dev/null differ diff --git a/public/imgs/icon-gl.png b/public/imgs/icon-gl.png deleted file mode 100644 index 20914ae..0000000 Binary files a/public/imgs/icon-gl.png and /dev/null differ diff --git a/public/imgs/icon-p.png b/public/imgs/icon-p.png deleted file mode 100644 index 9988606..0000000 Binary files a/public/imgs/icon-p.png and /dev/null differ diff --git a/public/imgs/icon-scf.png b/public/imgs/icon-scf.png deleted file mode 100644 index b7700ac..0000000 Binary files a/public/imgs/icon-scf.png and /dev/null differ diff --git a/public/imgs/icon-sgd.png b/public/imgs/icon-sgd.png deleted file mode 100644 index 5aa66ca..0000000 Binary files a/public/imgs/icon-sgd.png and /dev/null differ diff --git a/public/imgs/icon-sgl.png b/public/imgs/icon-sgl.png deleted file mode 100644 index a10f459..0000000 Binary files a/public/imgs/icon-sgl.png and /dev/null differ diff --git a/public/imgs/icon-sp.png b/public/imgs/icon-sp.png deleted file mode 100644 index d43243a..0000000 Binary files a/public/imgs/icon-sp.png and /dev/null differ diff --git a/public/itemsCSS/icons.png b/public/itemsCSS/icons.png deleted file mode 100644 index 384b3ce..0000000 Binary files a/public/itemsCSS/icons.png and /dev/null differ diff --git a/public/robots.txt b/public/robots.txt deleted file mode 100644 index 1c6d398..0000000 --- a/public/robots.txt +++ /dev/null @@ -1,9 +0,0 @@ -# * -User-agent: * -Allow: / - -# Host -Host: https://mhsf.app - -# Sitemaps -Sitemap: https://mhsf.app/sitemap.xml diff --git a/public/sitemap.xml b/public/sitemap.xml deleted file mode 100644 index 39fed00..0000000 --- a/public/sitemap.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/public/svg/icon-cf.svg b/public/svg/icon-cf.svg deleted file mode 100644 index f3aa775..0000000 --- a/public/svg/icon-cf.svg +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/public/svg/icon-gd.svg b/public/svg/icon-gd.svg deleted file mode 100644 index fde9310..0000000 --- a/public/svg/icon-gd.svg +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/public/svg/icon-gl.svg b/public/svg/icon-gl.svg deleted file mode 100644 index 6ca9108..0000000 --- a/public/svg/icon-gl.svg +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/public/svg/icon-p.svg b/public/svg/icon-p.svg deleted file mode 100644 index c0e241f..0000000 --- a/public/svg/icon-p.svg +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/public/svg/icon-scf.svg b/public/svg/icon-scf.svg deleted file mode 100644 index 203902b..0000000 --- a/public/svg/icon-scf.svg +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/public/svg/icon-sgd.svg b/public/svg/icon-sgd.svg deleted file mode 100644 index 5cbcd07..0000000 --- a/public/svg/icon-sgd.svg +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/public/svg/icon-sgl.svg b/public/svg/icon-sgl.svg deleted file mode 100644 index 1b6d886..0000000 --- a/public/svg/icon-sgl.svg +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/public/svg/icon-sp.svg b/public/svg/icon-sp.svg deleted file mode 100644 index 2b275ad..0000000 --- a/public/svg/icon-sp.svg +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/public/videos/imgurTutorial.mp4 b/public/videos/imgurTutorial.mp4 deleted file mode 100644 index eea10d1..0000000 Binary files a/public/videos/imgurTutorial.mp4 and /dev/null differ diff --git a/src/app/(docs)/docs/[[...slug]]/page.tsx b/src/app/(docs)/docs/[[...slug]]/page.tsx deleted file mode 100644 index 1b563f2..0000000 --- a/src/app/(docs)/docs/[[...slug]]/page.tsx +++ /dev/null @@ -1,129 +0,0 @@ -/* - * MHSF, Minehut Server List - * All external content is rather licensed under the ECA Agreement - * located here: https://list.mlnehut.com/docs/legal/external-content-agreement - * - * All code under MHSF is licensed under the MIT License - * by open source contributors - * - * Copyright (c) 2024 dvelo - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES - * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - */ - -import TableOfContent from "@/components/docs/TOC"; -import { ALegacy } from "@/components/misc/Link"; -import { MDXElements } from "@/components/misc/MDXElements"; -import { ScrollArea } from "@/components/ui/scroll-area"; -import { Separator } from "@/components/ui/separator"; -import { allDocs } from "contentlayer/generated"; -import { useMDXComponent } from "next-contentlayer/hooks"; -import NextLink from "next/link"; -import { notFound } from "next/navigation"; - -export const generateStaticParams = async () => - allDocs.map((post) => ({ slug: [post._raw.flattenedPath] })); - -export const generateMetadata = ({ - params, -}: { - params: { slug: string[] }; -}) => { - const post = allDocs.find( - (post) => post._raw.flattenedPath === params.slug.join("/"), - ); - if (!post) notFound(); - return { title: post.title + " | MHSF Docs", themeColor: "#000000" }; -}; - -const PostLayout = ({ params }: { params: { slug: string[] } }) => { - const doc = allDocs.find( - (post) => post._raw.flattenedPath === params.slug.join("/"), - ); - - if (!doc) notFound(); - console.log(doc); - const MDXContent = useMDXComponent(doc.body.code); - - return ( -
-
-
- {doc.folder && {doc.folder}}{" "} - {doc.lastUpdated && - last updated {doc.lastUpdated}}{" "} - , - ...MDXElements, - }} - /> -
-
- {doc.toc && ( -
-
- -
-

On This Page

- {doc.toc.map( - (c: { level: number; text: string; slug: string }) => ( - - ), - )} -
-
-

Contribute

-
    -
  • - - - - - Edit page on GitHub - -
  • -
-
-
-
-
-
- )} -
- ); -}; -export default PostLayout; diff --git a/src/app/(docs)/layout.tsx b/src/app/(docs)/layout.tsx deleted file mode 100644 index 3577caf..0000000 --- a/src/app/(docs)/layout.tsx +++ /dev/null @@ -1,102 +0,0 @@ -/* - * MHSF, Minehut Server List - * All external content is rather licensed under the ECA Agreement - * located here: https://list.mlnehut.com/docs/legal/external-content-agreement - * - * All code under MHSF is licensed under the MIT License - * by open source contributors - * - * Copyright (c) 2024 dvelo - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES - * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - */ - -"use client"; - -import { Sidebar } from "@/components/docs/Sidebar"; -import { Button } from "@/components/ui/button"; -import { Drawer, DrawerContent, DrawerTrigger } from "@/components/ui/drawer"; -import { ScrollArea } from "@/components/ui/scroll-area"; -import { - SidebarInset, - SidebarProvider, - SidebarTrigger, -} from "@/components/ui/sidebar"; -import { version } from "@/config/version"; -import { HamburgerMenuIcon } from "@radix-ui/react-icons"; -import { GeistMono } from "geist/font/mono"; -import { GeistSans } from "geist/font/sans"; -import "../globals.css"; -import "../../themes.css"; -import { ThemeProvider } from "@/components/ThemeProvider"; -import { ClerkThemeProvider } from "@/components/clerk/ClerkThemeProvider"; -import { - Breadcrumb, - BreadcrumbItem, - BreadcrumbLink, - BreadcrumbList, - BreadcrumbPage, - BreadcrumbSeparator, -} from "@/components/ui/breadcrumb"; -import { Separator } from "@/components/ui/separator"; -import NextTopLoader from "@/lib/top-loader"; -import { useRouter } from "@/lib/useRouter"; -import { allDocs } from "contentlayer/generated"; -import { GetServerSideProps } from "next"; -import { usePathname } from "next/navigation"; - -interface Props { - pathname: string; -} - -export default async function RootLayout({ - children, -}: Readonly<{ - children: React.ReactNode; -}>) { - const pathname = usePathname(); - return ( - -
- - - - -
- - - { - allDocs.find( - (c) => - c._raw.flattenedPath === - pathname - ?.split("/") - .splice(2, pathname?.split("/").length) - .join("/"), - )?.title - } -
-
{children}
-
-
-
-
- ); -} diff --git a/src/app/(embeds)/embed/[server]/page.tsx b/src/app/(embeds)/embed/[server]/page.tsx deleted file mode 100644 index b2a739e..0000000 --- a/src/app/(embeds)/embed/[server]/page.tsx +++ /dev/null @@ -1,39 +0,0 @@ -/* - * MHSF, Minehut Server List - * All external content is rather licensed under the ECA Agreement - * located here: https://mhsf.app/docs/legal/external-content-agreement - * - * All code under MHSF is licensed under the MIT License - * by open source contributors - * - * Copyright (c) 2024 dvelo - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES - * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - */ - -import Embed from "@/components/feat/Embed"; - -export default function EmbedPage({ - params, -}: { - params: { server: string }; -}) { - return ; -} diff --git a/src/app/(embeds)/layout.tsx b/src/app/(embeds)/layout.tsx deleted file mode 100644 index 7469149..0000000 --- a/src/app/(embeds)/layout.tsx +++ /dev/null @@ -1,57 +0,0 @@ -/* - * MHSF, Minehut Server List - * All external content is rather licensed under the ECA Agreement - * located here: https://mhsf.app/docs/legal/external-content-agreement - * - * All code under MHSF is licensed under the MIT License - * by open source contributors - * - * Copyright (c) 2024 dvelo - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES - * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - */ - -"use client"; -import { TooltipProvider } from "@/components/ui/tooltip"; -import "../globals.css"; -import { ThemeProvider } from "@/components/ThemeProvider"; -import { useSearchParams } from "next/navigation"; - -export default function RootLayout({ - children, -}: { - children: React.ReactNode; -}) { - const searchParams = useSearchParams(); - const search = searchParams?.get("theme") || "light"; - return ( - - - - {children} - - - - ); -} diff --git a/src/app/(main)/account/favorites/page.tsx b/src/app/(main)/account/favorites/page.tsx deleted file mode 100644 index c69c599..0000000 --- a/src/app/(main)/account/favorites/page.tsx +++ /dev/null @@ -1,41 +0,0 @@ -/* - * MHSF, Minehut Server List - * All external content is rather licensed under the ECA Agreement - * located here: https://list.mlnehut.com/docs/legal/external-content-agreement - * - * All code under MHSF is licensed under the MIT License - * by open source contributors - * - * Copyright (c) 2024 dvelo - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES - * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - */ - -import FavoritesView from "@/components/FavoritesView"; - -export default function Favorites() { - return ( -
-
- -
-
- ); -} diff --git a/src/app/(main)/account/settings/layout.tsx b/src/app/(main)/account/settings/layout.tsx deleted file mode 100644 index b1e73bf..0000000 --- a/src/app/(main)/account/settings/layout.tsx +++ /dev/null @@ -1,47 +0,0 @@ -/* - * MHSF, Minehut Server List - * All external content is rather licensed under the ECA Agreement - * located here: https://list.mlnehut.com/docs/legal/external-content-agreement - * - * All code under MHSF is licensed under the MIT License - * by open source contributors - * - * Copyright (c) 2024 dvelo - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES - * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - */ - -"use client"; -import { Sidebar } from "@/components/PreferencesSidebar"; -import { usePathname } from "next/navigation"; - -export default function RootLayout({ - children, -}: Readonly<{ - children: React.ReactNode; -}>) { - const pathname = usePathname(); - - return ( - - {children} - - ); -} diff --git a/src/app/(main)/account/settings/options/page.tsx b/src/app/(main)/account/settings/options/page.tsx deleted file mode 100644 index 89c1b4e..0000000 --- a/src/app/(main)/account/settings/options/page.tsx +++ /dev/null @@ -1,53 +0,0 @@ -/* - * MHSF, Minehut Server List - * All external content is rather licensed under the ECA Agreement - * located here: https://list.mlnehut.com/docs/legal/external-content-agreement - * - * All code under MHSF is licensed under the MIT License - * by open source contributors - * - * Copyright (c) 2024 dvelo - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES - * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - */ - -"use client"; -import { useClerk, useUser } from "@clerk/nextjs"; -import { useEffect, useState } from "react"; -import { SLCustomize } from "@/components/SLCustomizePage"; - -export default function Settings() { - const clerk = useClerk(); - - const { user, isSignedIn } = useUser(); - const [linked, setLinked] = useState(false); - useEffect(() => { - setLinked(user?.publicMetadata.player != undefined); - }, [user, isSignedIn]); - - return ( -
- Profile Preferences -
-
- -
- ); -} diff --git a/src/app/(main)/account/settings/page.tsx b/src/app/(main)/account/settings/page.tsx deleted file mode 100644 index 9d253d2..0000000 --- a/src/app/(main)/account/settings/page.tsx +++ /dev/null @@ -1,137 +0,0 @@ -/* - * MHSF, Minehut Server List - * All external content is rather licensed under the ECA Agreement - * located here: https://list.mlnehut.com/docs/legal/external-content-agreement - * - * All code under MHSF is licensed under the MIT License - * by open source contributors - * - * Copyright (c) 2024 dvelo - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES - * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - */ - -"use client"; -import { Button } from "@/components/ui/button"; -import { useClerk, useUser } from "@clerk/nextjs"; -import { toast } from "sonner"; -import { unlinkMCAccount } from "@/lib/api"; -import { useEffect, useState } from "react"; -import { Dialog } from "@/components/ui/dialog"; -import { DialogContent, DialogTrigger } from "@/components/ui/dialog"; -import CodeDialog from "@/components/misc/LinkDialog"; - -export default function Settings() { - const clerk = useClerk(); - - const { user, isSignedIn } = useUser(); - const [linked, setLinked] = useState(false); - useEffect(() => { - setLinked(user?.publicMetadata.player != undefined); - }, [user, isSignedIn]); - - const forceUnlink = async () => { - if (!linked) await toast.promise(unlinkMCAccount(), { - success: "Unlinked account!", - loading: "Unlinking...", - error: "Error while unlinking account.", - }); - else - await toast.warning("Please use the normal unlink option before using the force unlink one.") - }; - - return ( -
- Linking -
-
- Link Account -
-

- Link a Minecraft account to customize a server you own. -
{" "} - {user?.publicMetadata.player != undefined && linked && ( - <>Currently linked to {user?.publicMetadata.player as string} - )} -

- - - - {!linked && } - - - { - setLinked(c); - }} - /> - - - - {linked && ( - - )} -
-
- Unlink Account -
-

Unlink your Minecraft account if you have already linked one.

- - {!linked && ( - - )} - - {linked && ( - - )} -
- - All of your customizations stay the same, and can be changed if another - account links your Minecraft account.{" "} -
- Still linked in-game? Force unlink your account. -
-
-
- ); -} diff --git a/src/app/(main)/dashboard/page.tsx b/src/app/(main)/dashboard/page.tsx deleted file mode 100644 index 5bef59f..0000000 --- a/src/app/(main)/dashboard/page.tsx +++ /dev/null @@ -1,50 +0,0 @@ -import { Sidebar } from "@/components/docs/Sidebar"; -import { - Breadcrumb, - BreadcrumbItem, - BreadcrumbLink, - BreadcrumbList, - BreadcrumbPage, - BreadcrumbSeparator, -} from "@/components/ui/breadcrumb"; -import { Separator } from "@/components/ui/separator"; -import { - SidebarInset, - SidebarProvider, - SidebarTrigger, -} from "@/components/ui/sidebar"; - -export default function Page() { - return ( - - - -
- - - - - - - Building Your Application - - - - - Data Fetching - - - -
-
- {Array.from({ length: 24 }).map((_, index) => ( -
- ))} -
- - - ); -} diff --git a/src/app/(main)/layout.tsx b/src/app/(main)/layout.tsx deleted file mode 100644 index 9cfe6a2..0000000 --- a/src/app/(main)/layout.tsx +++ /dev/null @@ -1,93 +0,0 @@ -/* - * MHSF, Minehut Server List - * All external content is rather licensed under the ECA Agreement - * located here: https://list.mlnehut.com/docs/legal/external-content-agreement - * - * All code under MHSF is licensed under the MIT License - * by open source contributors - * - * Copyright (c) 2024 dvelo - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES - * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - */ - -import { Analytics } from "@vercel/analytics/react"; -import { SpeedInsights } from "@vercel/speed-insights/next"; -import { GeistSans } from "geist/font/sans"; -import "../globals.css"; -import { CommandBarer } from "@/components/CommandBar"; -import { ThemeProvider } from "@/components/ThemeProvider"; -import { ClerkThemeProvider } from "@/components/clerk/ClerkThemeProvider"; -import NewDomainDialog from "@/components/misc/NewDomainDialog"; -import ThemedToaster from "@/components/misc/ThemedToaster"; -import { TooltipProvider } from "@/components/ui/tooltip"; -import type { Metadata, Viewport } from "next"; -import { Inter as interFont } from "next/font/google"; -import LayoutPart from "@/components/feat/LayoutPart"; -import AllBanners from "@/components/feat/AllBanners"; -import Footer from "@/components/misc/Footer"; -import { SwitchEnvPopup } from "@/components/misc/SwitchEnvPopup"; - -export const extraMetadata = { - twitter: { - images: [ - { - url: "/imgs/icon-cf.png", - }, - ], - }, - themeColor: "#000000", - openGraph: { - images: [ - { - url: "/imgs/icon-cf.png", - }, - ], - }, -} satisfies Metadata; -export const viewport: Viewport = { - themeColor: "black", - colorScheme: "dark", -}; - -const inter = interFont({ variable: "--font-inter", subsets: ["latin"] }); -export default async function RootLayout({ - children, -}: Readonly<{ - children: React.ReactNode; -}>) { - return ( - - - - - {children} - - - - - - -