Add 8 more built-in plugins (News, Shop, Catalog, Analytics, Social, SEO, Security, API)
Local Build and Deploy / deploy (push) Successful in 1m14s

All 12 plugins now show in Admin > Settings > Plugins with toggle switches and
per-plugin configuration forms.
This commit is contained in:
openhands committed 2026-07-18 14:12:34 +02:00
1 parent 90cebad68d
commit be5d2bfec4
9 files changed
+168

No files matched your search

+16
View File
@@ -3,11 +3,27 @@ import gamesPlugin from "@/plugins/games";
import radioPlugin from "@/plugins/radio";
import notificationsPlugin from "@/plugins/notifications";
import moderationPlugin from "@/plugins/moderation";
import newsPlugin from "@/plugins/news";
import shopPlugin from "@/plugins/shop";
import catalogPlugin from "@/plugins/catalog";
import analyticsPlugin from "@/plugins/analytics";
import socialPlugin from "@/plugins/social";
import seoPlugin from "@/plugins/seo";
import securityPlugin from "@/plugins/security";
import apiPlugin from "@/plugins/api";
pluginRegistry.register(gamesPlugin);
pluginRegistry.register(radioPlugin);
pluginRegistry.register(notificationsPlugin);
pluginRegistry.register(moderationPlugin);
pluginRegistry.register(newsPlugin);
pluginRegistry.register(shopPlugin);
pluginRegistry.register(catalogPlugin);
pluginRegistry.register(analyticsPlugin);
pluginRegistry.register(socialPlugin);
pluginRegistry.register(seoPlugin);
pluginRegistry.register(securityPlugin);
pluginRegistry.register(apiPlugin);
export function ensurePluginsLoaded(): void {
// Plugins registered at import time
+18
View File
@@ -0,0 +1,18 @@
import { BarChart3 } from "lucide-react";
import type { PluginDefinition } from "@/lib/plugins";
const plugin: PluginDefinition = {
id: "analytics",
name: "Analytics & Observability",
description: "Hotel analytics, activity logs, economy tracking, DevOps health checks and Sentry errors",
version: "1.0.0",
enabled: true,
configFields: [
{ key: "track_page_views", label: "Track page views", type: "boolean", default: true },
{ key: "track_economy", label: "Track economy stats", type: "boolean", default: true },
{ key: "log_retention_days", label: "Log retention (days)", type: "text", default: "90" },
{ key: "enable_health_checks", label: "Enable DevOps health checks", type: "boolean", default: true },
],
};
export default plugin;
+19
View File
@@ -0,0 +1,19 @@
import { Globe } from "lucide-react";
import type { PluginDefinition } from "@/lib/plugins";
const plugin: PluginDefinition = {
id: "api",
name: "API & Integrations",
description: "REST API tokens, webhooks, Discord integration, radio API keys and developer portal",
version: "1.0.0",
enabled: true,
configFields: [
{ key: "enable_api", label: "Enable REST API", type: "boolean", default: true },
{ key: "enable_webhooks", label: "Enable outgoing webhooks", type: "boolean", default: true },
{ key: "enable_discord", label: "Enable Discord bot integration", type: "boolean", default: false },
{ key: "rate_limit_per_minute", label: "API rate limit (requests/min)", type: "text", default: "60" },
{ key: "enable_developer_portal", label: "Enable developer portal", type: "boolean", default: true },
],
};
export default plugin;
+18
View File
@@ -0,0 +1,18 @@
import { Store } from "lucide-react";
import type { PluginDefinition } from "@/lib/plugins";
const plugin: PluginDefinition = {
id: "catalog",
name: "Catalog & Rares",
description: "Furniture catalog, rare values, badges, achievements and sounds",
version: "1.0.0",
enabled: true,
configFields: [
{ key: "enable_rares", label: "Enable rare values page", type: "boolean", default: true },
{ key: "enable_badges", label: "Enable badge catalog", type: "boolean", default: true },
{ key: "enable_draw_badge", label: "Enable badge drawing tool", type: "boolean", default: true },
{ key: "rares_update_interval", label: "Rares auto-update interval (hours)", type: "text", default: "6" },
],
};
export default plugin;
+18
View File
@@ -0,0 +1,18 @@
import { Newspaper } from "lucide-react";
import type { PluginDefinition } from "@/lib/plugins";
const plugin: PluginDefinition = {
id: "news",
name: "News & Media",
description: "News articles, photo gallery, banners, advertisements and media library",
version: "1.0.0",
enabled: true,
configFields: [
{ key: "articles_per_page", label: "Articles per page", type: "text", default: "12" },
{ key: "enable_comments", label: "Enable article comments", type: "boolean", default: true },
{ key: "enable_reactions", label: "Enable article reactions", type: "boolean", default: true },
{ key: "auto_approve_photos", label: "Auto-approve user photos", type: "boolean", default: false },
],
};
export default plugin;
+20
View File
@@ -0,0 +1,20 @@
import { Shield } from "lucide-react";
import type { PluginDefinition } from "@/lib/plugins";
const plugin: PluginDefinition = {
id: "security",
name: "Security & Access",
description: "IP blacklist/whitelist, VPN detection, word filter, ban system and permission ACLs",
version: "1.0.0",
enabled: true,
configFields: [
{ key: "enable_vpn_detection", label: "Enable VPN/proxy detection", type: "boolean", default: true },
{ key: "enable_ip_whitelist", label: "Enable IP whitelist", type: "boolean", default: false },
{ key: "enable_word_filter", label: "Enable word filter", type: "boolean", default: true },
{ key: "max_login_attempts", label: "Max login attempts before ban", type: "text", default: "5" },
{ key: "lockout_duration_minutes", label: "Account lockout duration (minutes)", type: "text", default: "15" },
{ key: "enforce_2fa_staff", label: "Require 2FA for staff", type: "boolean", default: true },
],
};
export default plugin;
+20
View File
@@ -0,0 +1,20 @@
import { Search } from "lucide-react";
import type { PluginDefinition } from "@/lib/plugins";
const plugin: PluginDefinition = {
id: "seo",
name: "SEO & Metadata",
description: "Meta tags, Open Graph, sitemap generation, robots.txt and search engine optimization",
version: "1.0.0",
enabled: true,
configFields: [
{ key: "enable_sitemap", label: "Auto-generate sitemap.xml", type: "boolean", default: true },
{ key: "enable_og_tags", label: "Enable Open Graph meta tags", type: "boolean", default: true },
{ key: "default_description", label: "Default meta description", type: "text", default: "" },
{ key: "default_keywords", label: "Default meta keywords", type: "text", default: "" },
{ key: "index_articles", label: "Index articles in search engines", type: "boolean", default: true },
{ key: "index_profiles", label: "Index user profiles", type: "boolean", default: false },
],
};
export default plugin;
+19
View File
@@ -0,0 +1,19 @@
import { ShoppingCart } from "lucide-react";
import type { PluginDefinition } from "@/lib/plugins";
const plugin: PluginDefinition = {
id: "shop",
name: "Shop & Payments",
description: "Web shop, PayPal top-up, vouchers, subscriptions and calendar rewards",
version: "1.0.0",
enabled: true,
configFields: [
{ key: "enable_paypal", label: "Enable PayPal payments", type: "boolean", default: true },
{ key: "enable_vouchers", label: "Enable voucher codes", type: "boolean", default: true },
{ key: "enable_subscriptions", label: "Enable recurring subscriptions", type: "boolean", default: false },
{ key: "currency_symbol", label: "Currency symbol", type: "text", default: "€" },
{ key: "min_topup_amount", label: "Minimum top-up amount", type: "text", default: "1" },
],
};
export default plugin;
+20
View File
@@ -0,0 +1,20 @@
import { Users } from "lucide-react";
import type { PluginDefinition } from "@/lib/plugins";
const plugin: PluginDefinition = {
id: "social",
name: "Social Features",
description: "Friends list, messaging, guilds, user profiles, guestbook and referrals",
version: "1.0.0",
enabled: true,
configFields: [
{ key: "enable_friends", label: "Enable friends system", type: "boolean", default: true },
{ key: "enable_messages", label: "Enable private messages", type: "boolean", default: true },
{ key: "enable_guilds", label: "Enable guilds", type: "boolean", default: true },
{ key: "enable_guestbook", label: "Enable profile guestbook", type: "boolean", default: true },
{ key: "enable_referrals", label: "Enable referral system", type: "boolean", default: true },
{ key: "max_friends", label: "Max friends per user", type: "text", default: "300" },
],
};
export default plugin;