Overview of Doujin Game Manager
www directory of the game files). It allows users to host these games on their own server to play them in a browser without needing to install the games locally.website·Indexed 31 days ago
https://docs.mikn.devDocumentation for MikanDev projects, including gh-to-gitea (GitHub mirroring), releaselink (GitHub release redirector), rssfetch (RSS parser), CustomRP (Discord Rich Presence), Doujin Game Manager, MD Chat, ShortFlare, and next-discord-auth (JWT-based Discord authentication for Next.js).
www directory of the game files). It allows users to host these games on their own server to play them in a browser without needing to install the games locally./:user/:repo/latest endpoint to redirect a user to the correct asset from the repository's latest release based on their User-Agent and architecture. The response is a 302 redirect.# Example: Redirect for the latest release of mikndotdev/SiBuster
curl -IL "http://localhost:3000/mikndotdev/SiBuster/latest"MD Chat uses Logto for identity and access management. You can use a self-hosted Logto instance or Logto Cloud. To integrate, create a 'Traditional Web app' in Logto with the following configuration:
http://(your-app-url)/callbackSave the Client ID and Client Secret, as they are required for the MD Chat environment variables.
To deploy ShortFlare, you need a Cloudflare account with a D1 database and a Worker.
urls with two text columns: slug and destination.API_TOKEN: A secure token for managing URLs via API.NOT_FOUND_URL: The fallback URL for invalid slugs.TRACKING_API_TOKEN: A token for the analytics API.TRACKING_API_URL: The endpoint for tracking visits (e.g., https://your-frontend-url/api/worker/analytics).DB.index.js content with the provided ShortFlare worker implementation.// Example of the core worker logic for handling redirects and API calls
export default {
async fetch(request, env) {
return await handleRequest(request, env);
},
};
async function handleRequest(request, env) {
const url = new URL(request.url);
const path = url.pathname;
if (path.startsWith("/api/")) {
const authHeader = request.headers.get("Authorization");
if (!authHeader || !authHeader.startsWith("Bearer ")) {
return new Response("Unauthorized", { status: 401 });
}
const token = authHeader.split(" ")[1];
if (token !== env.API_TOKEN) {
return new Response("Unauthorized", { status: 401 });
}
// API routing logic follows...
}
return handleRedirect(request, env);
}rssfetch supports multiple deployment targets:
getSession function from @mikandev/next-discord-auth/server-actions to access the current user's session in server components, server actions, or route handlers. The returned Session object is AuthJS-compatible. If the session is null, the user is not authenticated.import { getSession } from "@mikandev/next-discord-auth/server-actions";
import "@/auth"; // Ensure auth setup is initialized
export default async function Page() {
const session = await getSession();
if (!session) {
return <h1>You are not signed in.</h1>;
}
return <h1>Welcome, {session.user.name}!</h1>;
}releaselink supports multiple deployment targets: