Skip to content

Commit

Permalink
Docs/browser x (#54)
Browse files Browse the repository at this point in the history
* docs(browser): Introducing Minekube Browser

* docs(games): Enrich Minekube Games docs

* docs(games): Update developers

* docs: Fix dead link

* docs: Fix titles

* docs(games): Improvements

* docs(games): The Three Ways of Minekube

* docs(games): Add CD

* docs(games): Kubernetes Levels

* docs(browser) Adjust wording on browser index and vision.md

* docs(games): Add comparison table for Kubernetes Levels

* docs(games): add links

* Add .pnp.cjs and .pnp.loader.mjs to .gitignore

* docs: removed local build files

* docs: update .gitignore

* docs: Update .gitignore to include /docs/.vitepress/cache/ and /.yarn/

* docs(browser): Update navigation links in config.ts for Community Engagement and API

* Update navigation links in config.ts for Community Engagement and API

* docs(browser): Rearrange nav items to own sections

* Fix editLink (#53)

---------

Co-authored-by: tygastoFX <95508140+tygastoFX@users.noreply.github.com>
  • Loading branch information
robinbraemer and tygastoFX authored Apr 17, 2024
1 parent 0de7431 commit 19c264b
Show file tree
Hide file tree
Showing 44 changed files with 1,311 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .web/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
/docs/.vitepress/dist/
/docs/.vitepress/cache/
/node_modules/
/.yarn/
.pnp.cjs
.pnp.loader.mjs
130 changes: 129 additions & 1 deletion .web/docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {defineConfig} from 'vitepress'
import {DefaultTheme, defineConfig} from 'vitepress'

import {discordLink, editLink, gitHubLink, projects} from '../shared'
import {additionalTitle, commitRef} from "../shared/cloudflare";
Expand All @@ -9,6 +9,14 @@ const ogImage = `${ogUrl}/og-image.png`
const ogTitle = 'Minekube Connect'
const ogDescription = 'The Ingress Tunnel for Minecraft Servers'

const services: DefaultTheme.SidebarItem = {
text: 'Services', items: [
{text: 'Minekube Browser →', link: '/browser/'},
{text: 'Minekube Connect →', link: '/guide/'},
{text: 'Minekube Games →', link: '/games/'},
]
}

export default defineConfig({
title: `Minekube Connect${additionalTitle}`,
description: ogDescription,
Expand Down Expand Up @@ -89,6 +97,8 @@ export default defineConfig({
nav: [
{text: 'Quick Start', link: '/guide/quick-start'},
{text: 'Connectors', link: '/guide/connectors/', activeMatch: '^/guide/connectors/'},
{text: 'Browser', link: '/browser/', activeMatch: '^/browser/'},
{text: 'Games', link: '/games/', activeMatch: '^/games/'},
{text: 'Blog', link: '/blog/', activeMatch: '^/blog/'},
{text: 'Plans', link: '/plans'},
...projects,
Expand Down Expand Up @@ -192,6 +202,7 @@ export default defineConfig({
{text: 'Why', link: '/guide/why'},
]
},
services
// {
// text: 'APIs',
// items: [
Expand All @@ -202,6 +213,123 @@ export default defineConfig({
// ]
// }
],
'/browser/': [
{
text: 'Minekube Browser',
items: [
{
text: 'Introduction', link: '/browser/', items: [
{text: 'Platform', link: '/browser/platform'},
{text: 'Vision', link: '/browser/vision'},
{text: `It's about You`, link: '/browser/you'},
]
},
{
text: 'FAQ', link: '/browser/faq/', items: []
},
]
},
{
text: 'Guides', items: [
{
text: 'Launch Guide', link: '/browser/launch/', items: [
{text: 'Launch Your Server', link: '/browser/launch/server'},
{text: 'Launch Your Game', link: '/browser/launch/game'},
]
},
{
text: 'Community Engagement', link: '/browser/engage/', items: [
{text: 'Best Practices', link: '/browser/engage/tips'},
{text: 'Update Launches', link: '/browser/engage/updates'},
{text: 'Event Management', link: '/browser/engage/events'},
]
},
]
},
{
text: 'API', items: [
{text: 'Overview', link: '/browser/api/'},
{text: 'Authentication', link: '/browser/api/auth'},
{text: 'Versioning', link: '/browser/api/versions'},
{text: 'Endpoints', link: '/browser/api/endpoints'},
{text: 'Rate Limits', link: '/browser/api/ratelimits'},
{text: 'SDK and Resources', link: '/browser/api/developers'},
]
},
services,
],
'/games/': [
{
text: 'Minekube Games',
items: [
{text: 'Introduction', link: '/games/'},
{text: 'Vision', link: '/games/vision'},
]
},
{
text: 'Hosting Options', items: [
{text: 'Overview', link: '/games/hosting/'},
{text: 'Managed Providers', link: '/games/hosting/provider'},
{
text: 'Kubernetes', link: '/games/hosting/kubernetes/', items: [
{text: 'Levels Overview', link: '/games/hosting/kubernetes/levels'},
{text: 'Level 4', link: '/games/hosting/kubernetes/level-4'},
{text: 'Level 3', link: '/games/hosting/kubernetes/level-3'},
{text: 'Level 2', link: '/games/hosting/kubernetes/level-2'},
{text: 'Level 1', link: '/games/hosting/kubernetes/level-1'},
]
},
{text: 'Docker', link: '/games/hosting/container'},
]
},
{
text: 'Guides', items: [
{text: 'Developing Games →', link: '/games/developers/'},
{text: 'Becoming Provider →', link: '/games/providers/'},
{text: 'Creating Game Servers →', link: '/games/servers/create'},
]
},
services,
],
'/games/developers/': [
{
text: 'Minekube Games Developers',
items: [
{text: 'Overview', link: '/games/developers/'},
{text: 'The Three Ways', link: '/games/developers/the-three-ways'},
]
},
{
text: 'Continuous Delivery', items: [
{text: 'Packaging Games', link: '/games/developers/cd/packaging'},
{text: 'Dockerfiles', link: '/games/developers/cd/dockerfiles'},
{text: 'GitHub Action Templates', link: '/games/developers/cd/github-actions'},
]
},
{text: '← Back', link: '/games/'},
],
'/games/providers/': [
{
text: 'Minekube Games Providers',
items: [
{text: 'Overview', link: '/games/providers/'},
{text: 'Start Selling', link: '/games/providers/selling'},
{text: 'Payouts', link: '/games/providers/payouts'},
]
},
{text: '← Back', link: '/games/'},
],
'/games/servers/': [
{
text: 'Minekube Games Servers',
items: [
{text: 'Server Owners', link: '/games/servers/'},
{text: 'Creating a Game Server', link: '/games/servers/create'},
{text: 'Players & Friends', link: '/games/servers/players'},
]
},
{text: '← Back', link: '/games/'},
],
}
}
})
42 changes: 42 additions & 0 deletions .web/docs/browser/api/auth.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Minekube Browser - API Authentication

## Overview
Authentication in the Minekube Browser API is handled through API keys. This section explains how to obtain and use your API keys to access the API securely.

## Generating API Keys
1. **Login to Dashboard:** Access the [Minekube Dashboard](https://dashboard.minekube.com) with your user credentials.
2. **Navigate to API Section:** Locate the API management section.
3. **Create New Key:** Follow the prompts to generate a new API key.
4. **Set Permissions:** Assign the necessary permissions based on your application needs.

## Using API Keys
- **Include in Headers:** Always include your API key in the request headers:
```http
Authorization: Bearer <your_api_key>
### Endpoint Protection
- **Unauthorized Access:** All protected endpoints will return a `401 Unauthorized` response if a valid API key is not included in the request headers.
## Rate Limiting
- **Purpose:** To prevent abuse and ensure fair usage, API requests are rate-limited. View specific rate limit details in the [Rate Limits](ratelimits.md) section.
- **Limits:** Rate limits are defined by the number of requests per minute, varying by API key.
## Security Best Practices:
::: tip
**Ensure secure storage of your API keys to prevent unwanted abuse. View our [Security Guide](../../guide/protections.html) for more info**
:::
### 1. Key Rotation
- **Security Recommendation:** Periodic rotation of API keys is advised to maintain security.
- **Regeneration:** Keys can be regenerated through the dashboard as needed.
### 2. IP Whitelisting
- **Added Security:** API keys can be associated with specific IP addresses or ranges, restricting access to whitelisted IPs only.
### 3. Fine Tuned Access
- **Access Control:** API keys are assigned different permission levels to control access to various endpoints or features within your [Minekube Organization](../../guide/quick-start.md).
## Next Steps
- **API Versioning:** Detailed documentation on versioning for proper use of API keys is available in the [Versioning](./versions.md) section.
- **API Endpoints:** View available endpoints and example responses in [Endpoints](./endpoints.md) section.
16 changes: 16 additions & 0 deletions .web/docs/browser/api/developers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Minekube Browser - SDK and Resources

## Overview
We provide SDKs and additional resources to facilitate easy integration of our API into your applications.

## SDK Downloads
Download our SDKs tailored for different programming environments:

- [Java SDK](/browser/api/developers/java)

## Integration Examples
Example using the Java SDK to access server listings:

```java
MinekubeAPI api = new MinekubeAPI("<your_api_key>");
ServerList servers = api.getServers();
49 changes: 49 additions & 0 deletions .web/docs/browser/api/endpoints.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Brower API Endpoints

The Minekube Browser API provides a range of endpoints to interact with the platform:

## Server Listing

### `GET /servers`
- **Description:** Retrieve a list of all public servers.

### `GET /servers/{id}`
- **Description:** Get details of a specific server by its ID.

## User Authentication

### `POST /auth/login`
- **Description:** Authenticate a user and retrieve an access token.

### `GET /auth/me`
- **Description:** Get the currently authenticated user's details.

### `PUT /auth/me`
- **Description:** Update the currently authenticated user's details.

## Server Management

### `GET /my-servers`
- **Description:** Retrieve a list of servers owned by the authenticated user.

### `GET /my-servers/{id}`
- **Description:** Get details of a specific server owned by the authenticated user.

### `PUT /my-servers/{id}`
- **Description:** Update the details of a specific server owned by the authenticated user.

## Player Statistics

### `GET /stats/players`
- **Description:** Retrieve overall player statistics, including total players, online players, and unique players.

### `GET /stats/players/top`
- **Description:** Get a list of the top servers by player count.

## Error Responses

- **400 Bad Request:** Invalid request format or missing parameters.
- **401 Unauthorized:** Authentication failed or invalid API key.
- **403 Forbidden:** Access forbidden due to insufficient permissions.
- **404 Not Found:** Requested resource not found.
- **500 Internal Server Error:** An unexpected server error occurred.
61 changes: 61 additions & 0 deletions .web/docs/browser/api/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Minekube Browser - API Documentation

Welcome to the Minekube Browser API documentation. This guide provides all the necessary details to integrate with our API, focusing on server listings initially, with plans to expand to games, plugins, and mods.

**Table of Contents**

[[TOC]]

## Authentication

Secure access to the API is controlled through API keys and other authentication mechanisms. Here, you'll find how to obtain and manage your API keys, including:

- **Generating API Keys:** Step-by-step guide to generate your unique API keys through the Minekube Browser dashboard.
- **Using API Keys:** How to include your API key in API requests to authenticate.
- **Security Best Practices:** Recommendations for securing your API keys.

[Explore Authentication Details](/browser/api/auth)

## Versioning

To maintain stability and backward compatibility, our API implements a versioning system. This section covers:

- **Version Formats:** Explanation of our semantic versioning format.
- **Handling Versions:** How to specify API versions in your requests.
- **Deprecation and Migration:** Guidelines on deprecated features and migrating to newer API versions.

[Learn More About Versioning](/browser/api/versions)

## Endpoints

This section describes all the available API endpoints, their functions, and how to use them. Highlights include:

- **Server Listing Endpoints:** Access information about servers, including details, listings, and management functions.
- **User and Authentication Endpoints:** How to manage user authentication and user-specific data.

[Detailed Endpoint Information](/browser/api/endpoints)

## Rate Limits

Understanding the rate limits is crucial to ensure fair use and system stability. This section provides:

- **Rate Limit Rules:** Specific limits on the number of requests that can be made to the API.
- **Best Practices:** Tips on how to handle and respond to rate limit conditions.

[Check Our Rate Limit Policies](/browser/api/ratelimits)

## SDK and Resources

For developers looking to integrate quickly, we offer SDKs and other resources. This section includes:

- **SDK Downloads:** Links to our official SDKs for various programming environments.
- **Integration Examples:** Practical examples showing how to use the API in common scenarios.
- **Developer Support:** Information on how to get help if you encounter issues or have questions.

[Access SDK and Developer Resources](/browser/api/developers)


## Support
If you have any questions or issues please join our [Discord](https://minekube.com/discord).
The team and community is always happy to help you out.

Empty file.
38 changes: 38 additions & 0 deletions .web/docs/browser/api/versions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Minekube Browser - API Versioning

## Overview
To ensure backward compatibility and smooth updates, the Minekube Browser API follows a clear versioning system.

## Version Numbering
API versions are indicated by a semantic version number, e.g., `v1`, `v2`. This number is included in the base URL of each API endpoint.

## Version Stability
- **Major Updates:** Transitioning from `v1` to `v2` may introduce breaking changes.
- **Minor Updates:** Upgrades such as `v1.0` to `v1.1` will remain backward-compatible.

## Deprecation Policy
Deprecated endpoints or features will be clearly marked in the documentation, including the expected removal date.

## Version Migration
When a new major version is released, a migration path will be provided to help users transition smoothly to the new version.

## Version Header
API requests can include an optional `Accept-Version` header to specify the desired API version. If not provided, the latest stable version will be used.

## Versioning in Responses
API responses may include an `API-Version` header, indicating the version used to process the request.

## Version-Specific Documentation
The API documentation will provide separate sections for each major version, outlining any changes or additions.

## Release Notes
Release notes will be provided for each API version, detailing any changes, improvements, or fixes.

## Sunset Policy
Deprecated versions will continue to be supported for a defined period, after which they may be sunset. Advance notice will be provided before sunsetting a version.

## Client Libraries
Official client libraries will be updated to support new API versions, and older versions will be maintained for a reasonable period.

## Version Negotiation
The API may support version negotiation in the future, allowing clients to specify their preferred version and receive a response in that version.
Empty file.
Empty file.
Empty file.
Empty file.
Loading

0 comments on commit 19c264b

Please sign in to comment.