diff --git a/src/lib/plugins/loader.ts b/src/lib/plugins/loader.ts index c813e986..90043d6b 100644 --- a/src/lib/plugins/loader.ts +++ b/src/lib/plugins/loader.ts @@ -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 diff --git a/src/plugins/analytics/index.ts b/src/plugins/analytics/index.ts new file mode 100644 index 00000000..dd20897f --- /dev/null +++ b/src/plugins/analytics/index.ts @@ -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; diff --git a/src/plugins/api/index.ts b/src/plugins/api/index.ts new file mode 100644 index 00000000..b0044ab3 --- /dev/null +++ b/src/plugins/api/index.ts @@ -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; diff --git a/src/plugins/catalog/index.ts b/src/plugins/catalog/index.ts new file mode 100644 index 00000000..f75a5f9a --- /dev/null +++ b/src/plugins/catalog/index.ts @@ -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; diff --git a/src/plugins/news/index.ts b/src/plugins/news/index.ts new file mode 100644 index 00000000..47b6c2cd --- /dev/null +++ b/src/plugins/news/index.ts @@ -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; diff --git a/src/plugins/security/index.ts b/src/plugins/security/index.ts new file mode 100644 index 00000000..1803b6ca --- /dev/null +++ b/src/plugins/security/index.ts @@ -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; diff --git a/src/plugins/seo/index.ts b/src/plugins/seo/index.ts new file mode 100644 index 00000000..ba631113 --- /dev/null +++ b/src/plugins/seo/index.ts @@ -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; diff --git a/src/plugins/shop/index.ts b/src/plugins/shop/index.ts new file mode 100644 index 00000000..aa811119 --- /dev/null +++ b/src/plugins/shop/index.ts @@ -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; diff --git a/src/plugins/social/index.ts b/src/plugins/social/index.ts new file mode 100644 index 00000000..d6dde1d6 --- /dev/null +++ b/src/plugins/social/index.ts @@ -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;