Updates
This commit is contained in:
@@ -0,0 +1,167 @@
|
||||
import type { Metadata } from 'next';
|
||||
import Link from 'next/link';
|
||||
import { ExternalLink } from 'lucide-react';
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: 'Built-in Plugins - P2NS Documentation',
|
||||
description: 'Overview of P2NS built-in plugins: peer.directory, peer.paste, file.drop, and more.',
|
||||
keywords: ['P2NS plugins', 'peer.paste', 'peer.directory', 'file.drop', 'plugin system'],
|
||||
authors: [{ name: 'Raven Scott' }],
|
||||
openGraph: {
|
||||
title: 'Built-in Plugins - P2NS Documentation',
|
||||
description: 'Overview of P2NS built-in plugins.',
|
||||
url: 'https://p2ns.space/docs/plugins',
|
||||
siteName: 'P2NS',
|
||||
type: 'website',
|
||||
},
|
||||
alternates: {
|
||||
canonical: 'https://p2ns.space/docs/plugins',
|
||||
},
|
||||
};
|
||||
|
||||
const repoBase = 'https://git.ssh.surf/snxraven/p2ns/src/branch/main';
|
||||
|
||||
const plugins = [
|
||||
{
|
||||
name: 'p2ns.admin',
|
||||
url: 'https://p2ns.admin',
|
||||
description: 'Web-based admin interface for domains, Holesail, DNS, certificates, stats, logs, backups, and plugin management.',
|
||||
docHref: `${repoBase}/docs/RESTAPI.md`,
|
||||
docLabel: 'REST API',
|
||||
},
|
||||
{
|
||||
name: 'peer.directory',
|
||||
url: 'https://peer.directory',
|
||||
description: 'Browse and search domains registered across the P2NS network.',
|
||||
docHref: `${repoBase}/docs/plugins/README.md`,
|
||||
docLabel: 'Plugin index',
|
||||
},
|
||||
{
|
||||
name: 'peer.paste',
|
||||
url: 'https://peer.paste',
|
||||
description:
|
||||
'Temporary replicated text snippets with E2EE by default, optional public or passphrase mode, markdown and syntax highlighting, expiry, burn-after-read, and max-read limits.',
|
||||
docHref: `${repoBase}/docs/plugins/peer.paste.md`,
|
||||
docLabel: 'peer.paste docs',
|
||||
},
|
||||
{
|
||||
name: 'file.drop',
|
||||
url: 'https://file.drop',
|
||||
description:
|
||||
'Temporary file sharing with shareable links (24-hour storage). Disabled on master nodes via disable_on_master — use a joiner node to access file.drop.',
|
||||
docHref: `${repoBase}/plugin-sites/file.drop/README.md`,
|
||||
docLabel: 'file.drop README',
|
||||
note: 'Not available on master nodes',
|
||||
},
|
||||
{
|
||||
name: 'global.profile',
|
||||
url: 'https://global.profile',
|
||||
description: 'Distributed user profiles across the network.',
|
||||
docHref: `${repoBase}/docs/plugins/README.md`,
|
||||
docLabel: 'Plugin index',
|
||||
},
|
||||
{
|
||||
name: 'peer.visualize',
|
||||
url: 'https://peer.visualize',
|
||||
description: 'Visualize peer connections and network topology.',
|
||||
docHref: `${repoBase}/docs/plugins/README.md`,
|
||||
docLabel: 'Plugin index',
|
||||
},
|
||||
{
|
||||
name: 'domain.consensus',
|
||||
url: null,
|
||||
description: 'Consensus and domain voting utilities for the network.',
|
||||
docHref: `${repoBase}/docs/CONSENSUS.md`,
|
||||
docLabel: 'Consensus docs',
|
||||
},
|
||||
{
|
||||
name: 'example.plugin',
|
||||
url: null,
|
||||
description: 'Reference plugin for authors building custom internal domains.',
|
||||
docHref: `${repoBase}/docs/plugins/PLUGIN_SDK.md`,
|
||||
docLabel: 'Plugin SDK',
|
||||
},
|
||||
];
|
||||
|
||||
export default function PluginsPage() {
|
||||
return (
|
||||
<div className="min-h-screen">
|
||||
<section className="py-20 bg-gradient-to-b from-blue-50 to-white dark:from-gray-900 dark:to-gray-800">
|
||||
<div className="max-w-4xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||
<h1 className="text-4xl sm:text-5xl font-bold text-gray-900 dark:text-white mb-6">
|
||||
Built-in Plugins
|
||||
</h1>
|
||||
<p className="text-xl text-gray-600 dark:text-gray-300">
|
||||
Internal domains served by the P2NS plugin system
|
||||
</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="py-20 bg-white dark:bg-gray-900">
|
||||
<div className="max-w-4xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||
<p className="text-gray-600 dark:text-gray-300 mb-8">
|
||||
Plugin domains are auto-discovered from <code className="bg-gray-800 dark:bg-gray-700 text-gray-100 dark:text-gray-200 px-1.5 py-0.5 rounded">plugin-sites/{domain}/config.json</code>.
|
||||
<code className="bg-gray-800 dark:bg-gray-700 text-gray-100 dark:text-gray-200 px-1.5 py-0.5 rounded">p2ns.admin</code> is always treated as internal.
|
||||
Detailed API and development docs live in the{' '}
|
||||
<a href={`${repoBase}/docs/plugins/README.md`} target="_blank" rel="noopener noreferrer" className="text-blue-600 dark:text-blue-400 hover:underline">
|
||||
main repository
|
||||
</a>.
|
||||
</p>
|
||||
|
||||
<div className="space-y-6">
|
||||
{plugins.map((plugin) => (
|
||||
<div
|
||||
key={plugin.name}
|
||||
className="border border-gray-200 dark:border-gray-700 rounded-lg p-6 bg-white dark:bg-gray-800"
|
||||
>
|
||||
<div className="flex flex-wrap items-center gap-2 mb-2">
|
||||
<h2 className="text-xl font-semibold text-gray-900 dark:text-white">{plugin.name}</h2>
|
||||
{plugin.note && (
|
||||
<span className="text-xs font-medium px-2 py-0.5 rounded bg-amber-100 dark:bg-amber-900/40 text-amber-900 dark:text-amber-100">
|
||||
{plugin.note}
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
{plugin.url && (
|
||||
<p className="text-sm text-gray-500 dark:text-gray-400 mb-2">
|
||||
<code className="bg-gray-800 dark:bg-gray-700 text-gray-100 dark:text-gray-200 px-1.5 py-0.5 rounded">{plugin.url}</code>
|
||||
</p>
|
||||
)}
|
||||
<p className="text-gray-600 dark:text-gray-300 mb-4">{plugin.description}</p>
|
||||
<a
|
||||
href={plugin.docHref}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="inline-flex items-center gap-1 text-blue-600 dark:text-blue-400 hover:underline text-sm"
|
||||
>
|
||||
{plugin.docLabel}
|
||||
<ExternalLink className="h-3.5 w-3.5" />
|
||||
</a>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
|
||||
<h2 className="text-2xl font-bold text-gray-900 dark:text-white mt-12 mb-4">Plugin authors</h2>
|
||||
<p className="text-gray-600 dark:text-gray-300 mb-4">
|
||||
Custom plugins use protomux RPC via <code className="bg-gray-800 dark:bg-gray-700 text-gray-100 dark:text-gray-200 px-1.5 py-0.5 rounded">sdk.channels.register</code>.
|
||||
Legacy message channels are no longer supported.
|
||||
</p>
|
||||
<ul className="list-disc pl-6 space-y-2 text-gray-600 dark:text-gray-300">
|
||||
<li>
|
||||
<a href={`${repoBase}/docs/plugins/PLUGIN_SDK.md`} target="_blank" rel="noopener noreferrer" className="text-blue-600 dark:text-blue-400 hover:underline">Plugin SDK</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href={`${repoBase}/docs/plugins/PLUGIN_CHANNELS.md`} target="_blank" rel="noopener noreferrer" className="text-blue-600 dark:text-blue-400 hover:underline">Plugin RPC</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href={`${repoBase}/docs/plugins/HYPERDB.md`} target="_blank" rel="noopener noreferrer" className="text-blue-600 dark:text-blue-400 hover:underline">HyperDB</a>
|
||||
</li>
|
||||
<li>
|
||||
<Link href="/docs/upgrading" className="text-blue-600 dark:text-blue-400 hover:underline">Upgrading</Link> (breaking changes)
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user