Skip to content

feat/self host page#13

Open
imranux-ui wants to merge 2 commits intoContextVM:masterfrom
imranux-ui:feat/self-host-page
Open

feat/self host page#13
imranux-ui wants to merge 2 commits intoContextVM:masterfrom
imranux-ui:feat/self-host-page

Conversation

@imranux-ui
Copy link
Copy Markdown

@imranux-ui imranux-ui commented Apr 9, 2026

Summary

This PR adds a new Self-Host a Server documentation page as the primary entry point for anyone who wants to host on ContextVM. It was discussed in issues #10 and #11 and agreed upon with the maintainers.

Currently, there are two hosting paths — CVMI (no-code CLI) and the TypeScript SDK (custom integrations) — but no single page that acknowledges both exist, explains the difference, or guides a new user toward the right one. This page fills that gap.

What this PR adds

New page: /self-hosting (or /getting-started/self-host)

The page is structured in three parts:

1. Path chooser (top of page)

A two-option section presented before any technical content, so the visitor makes one decision and follows one track:

Option Who it's for
Quick Setup with CVMI No code required. Run any MCP server on Nostr with a single npx command
Custom Integration with the TypeScript SDK Building an app or custom server? Implement ContextVM directly in your codebase

2. CVMI path — end-to-end walkthrough

A single linear guide that consolidates what is currently split across /cvmi/overview, /cvmi/installation, /cvmi/commands, and /cvmi/configuration. The existing pages remain intact as detailed reference
material — this guide is the beginner entry point that links out to them for deeper reading.

Steps covered:

  1. Check Node.js version (18+ required)
  2. Verify CVMI with npx cvmi --help
  3. Start your server with cvmi serve
  4. Note your public key (npub1...)
  5. Connect a client with cvmi use <pubkey>
  6. Optional: configure relays, encryption, and persistent keys via .cvmi.json

3. TypeScript SDK path — hosted server quickstart

A short section pointing to the SDK Quick Overview with a framing specifically for the hosting use case — NostrMCPGateway for exposing an existing server, NostrMCPProxy for connecting clients — so SDK users land in the right place without having to read the full module list to figure out what applies to them.

What this PR does NOT change

  • No existing pages are removed or restructured
  • No content is duplicated — the new page summarises and links, it doesn't copy
  • The four CVMI reference pages remain as-is

Related changes recommended (outside this PR)

  • Add Self-Host a Server to the Getting Started sidebar above the Specification section
  • Link to this page from the homepage "Explore CVMI" button once that is implemented
  • Add a nav bar entry pointing here alongside Docs and Servers

How to review

The page is self-contained. Read it as a brand new user who has just landed on the site and wants to run a server — the goal is to get from zero to a running server without opening any other page first.

Closes

Resolves #10 and Resolves #11 — Homepage CTAs don't surface self-hosting as an entry point and Getting Started page presents two hosting paths (CVMI vs TypeScript SDK) without helping users choose

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 9, 2026

@imranux-ui is attempting to deploy a commit to the ContextVM's projects Team on Vercel.

A member of the Team first needs to authorize it.

@imranux-ui imranux-ui changed the title docs: add Self-Host a Server page as a unified onboarding entry point feat/self host page Apr 9, 2026
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 9, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
contextvm-site Ready Ready Preview, Comment Apr 20, 2026 10:09am

Copy link
Copy Markdown
Contributor

@ContextVM-org ContextVM-org left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general, I like the page’s content, but I would not use the gateway or proxy components for these examples since those components are specifically for exposing an already-existing server or for using a CVM server as if it were local. To create custom servers, users should use the Nostr server transport; for custom clients, use the Nostr client transport. We can still mention the gateway and proxy components, but only for their specific use cases: exposing an already-existing server or consuming a CVM server in MCP hosts.

Also, you haven’t followed the current site guidelines. Custom color schemes, CSS usage, custom components, etc., must follow the site’s guidelines, avoid reinventing features that already exist. Finally, I think you should add a link to the new Self-Host page; I had to navigate to it by typing the path directly into the URL.

Comment thread src/routes/self-host/+page.svelte Outdated
const ACCENT_LIGHT = '#FDE9DF';
const ACCENT_DARK = '#A33A05';

function copyCode(text: string, btn: HTMLButtonElement) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already have a 'copyToClipboard' function in 'utils.ts' please use that one to avoid duplicated code

Comment thread src/routes/self-host/+page.svelte Outdated
</div>
</main>

<style>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use tailwind not css

Comment thread src/routes/self-host/+page.svelte Outdated
let activePath = $state<'cvmi' | 'ts'>('cvmi');

// Orange accent — matches contextvm.org "Read docs" button
const ACCENT = '#E8550A';
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already have a color scheme that we are using all over the site. No need to invent new colors

Comment thread src/routes/self-host/+page.svelte Outdated
<script lang="ts">
import Seo from '$lib/components/SEO.svelte';

let activePath = $state<'cvmi' | 'ts'>('cvmi');
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already have a 'tab' component in our site that we are using in each servers page. No need to create a new custom component

…pyToClipboard from utils, correct SDK transport descriptions
@imranux-ui
Copy link
Copy Markdown
Author

Thanks for the detailed feedback. I've pushed an updated commit that addresses all points:

  • Replaced custom tab state with the existing Tabs component from $lib/components/ui/tabs
  • Removed all custom CSS — page now uses Tailwind and the site's colour tokens only
  • Replaced custom copyCode function with copyToClipboard from $lib/utils
  • Corrected the SDK section to use NostrServerTransport for custom servers and NostrClientTransport for custom clients. Gateway and proxy are now mentioned only for their specific use cases: exposing an already-existing server and consuming a CVM server in an MCP host respectively

Let me know if anything else needs adjusting.

@ContextVM-org
Copy link
Copy Markdown
Contributor

It looks good. I would suggest adding a brief explanation to the cvmi server command so users understand that it works with any existing stdio or HTTP MCP server. We also need to decide where to place this new page in the menu (or a similar navigation element). Currently, the page can only be accessed if you already know it exists.

@imranux-ui
Copy link
Copy Markdown
Author

@ContextVM-org Thanks for the feedback. Two things:

For the command explanation, I'll update the description in Step 3 to clarify that cvmi serve works with any existing stdio or HTTP MCP server — not just the filesystem example — and that users can pass their own server command after the -- separator.

On navigation placement, I'd suggest a small restructure that solves both the discoverability problem and reduces nav clutter at the same time. FAQs, Blog, Docs, and Slides could be grouped under a single "Resources" dropdown, freeing up space in the top nav. That freed space would give "Self-Host" room to live as a dedicated secondary button — visually distinct from the primary nav links and immediately visible to any visitor who lands on the site, without needing to dig through a dropdown to find it. Happy to implement both the Resources dropdown and the Self-Host button if the team is open to it — just let me know.

I've created what it looks like here: https://le6hx5cbsmasc.ok.kimi.link

It will definitely be more refined than what you see in the link.

@ContextVM-org
Copy link
Copy Markdown
Contributor

ContextVM-org commented Apr 20, 2026

Sounds great! go for it

I've created what it looks like here: https://le6hx5cbsmasc.ok.kimi.link/

Wow this looks awesome! but definetely our of scope for this pr

@imranux-ui
Copy link
Copy Markdown
Author

@ContextVM-org Yes, I agree it's out of scope for this pr. I'm planning to add it to my proposal for SoB. Hopefully, if I get selected, I'll work on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants