Major site overhaul: reflect all current product features + logo + Stripe Payment Links

Homepage: AI-powered hero, 9 feature cards (AI Intent Router, MCP Server,
Security Center, Fleet Management, Service Discovery, Plugin System),
expanded comparison table (7→13 rows), Smart Wizard in How It Works

Features page: Complete rewrite — 8 feature sections led by AI-Powered
Self-Hosting, Free vs Premium comparison grid

Pricing page: Fixed broken Stripe checkout (was 503 stub). Subscribe
button now uses Stripe Payment Links. Core tier lists all 18 features.

All 7 docs pages: Updated to reflect current architecture (AI, MCP,
Security Center, SDK, Caddyfile-as-Code, Service Discovery, etc.)

About page: AI-Native value prop, updated tech stack, by-the-numbers

Navbar: Fixed broken #anchor links → proper routes, added DashCaddy logo

AppShowcase: 50+ → 76+ templates

Logo: Dark + light versions deployed, wired into navbar/footer/favicon
This commit is contained in:
Krystie
2026-08-12 16:53:58 -07:00
parent 3b2023e97a
commit 34704066c3
20 changed files with 1037 additions and 339 deletions
+90 -16
View File
@@ -8,26 +8,100 @@ export default function DocsApiPage() {
<Navbar />
<DocsLayout
title="API and Automation"
intro="DashCaddy includes a real API surface for service management, deployment, DNS/proxy automation, certificates, and operational visibility."
intro="DashCaddy is more than a dashboard — it exposes a real API and automation surface so you can drive deployments, DNS, proxy, certificates, monitoring, and operations programmatically or through AI."
>
<h2>What the API is for</h2>
<ul>
<li>service management</li>
<li>app deployment</li>
<li>DNS automation</li>
<li>Caddy integration</li>
<li>certificate-related workflows</li>
<li>health and status reporting</li>
</ul>
<h2>REST API</h2>
<p>
All platform operations are available under <code>/api/v1/</code>. The API covers service management,
app deployment, DNS automation, Caddy reverse-proxy integration, certificate workflows, health and status
reporting, user/admin operations, and backup/restore. The repository ships with an OpenAPI definition so the
public contract can mature into a full reference.
</p>
<pre className="mt-4 overflow-x-auto rounded-lg border border-surface-700/50 bg-surface-950/80 p-4 text-sm"><code>{`# List all services
curl -H "Authorization: Bearer $TOKEN" \\
https://dashcaddy-host/api/v1/services
# Deploy from a template
curl -X POST -H "Authorization: Bearer $TOKEN" \\
-H "Content-Type: application/json" \\
-d '{"template":" jellyfin","name":"media","hostname":"media.lab"}' \\
https://dashcaddy-host/api/v1/services`}</code></pre>
<h2>JavaScript SDK</h2>
<p>
For programmatic automation, DashCaddy ships a typed JavaScript SDK with <strong>39 methods</strong> and full
<strong> TypeScript types</strong>. It mirrors the REST API and handles authentication, retries, and structured
error handling for you.
</p>
<pre className="mt-4 overflow-x-auto rounded-lg border border-surface-700/50 bg-surface-950/80 p-4 text-sm"><code>{`import { DashCaddy } from '@dashcaddy/sdk';
const dc = new DashCaddy({ baseUrl: 'https://dashcaddy-host', token: process.env.DC_TOKEN });
// List services
const services = await dc.services.list();
// Deploy a template
const svc = await dc.services.deploy({
template: 'jellyfin',
name: 'media',
hostname: 'media.lab',
});
// Adopt a discovered container
await dc.services.adopt({ containerId: 'abc123', hostname: 'wiki.lab' });`}</code></pre>
<h2>Structured error codes</h2>
<p>
The API and SDK return <strong>80 structured error codes</strong> rather than opaque messages, so your
automation can branch on specific failure conditions (DNS token invalid, Caddy unreachable, license expired,
etc.) instead of parsing strings.
</p>
<h2>AI Intent Router</h2>
<p>
The <strong>AI Intent Router</strong> accepts natural-language commands and translates them into real
infrastructure actions through the same API. This turns ad-hoc operator requests into reproducible, logged
operations.
</p>
<pre className="mt-4 overflow-x-auto rounded-lg border border-surface-700/50 bg-surface-950/80 p-4 text-sm"><code>{`# Natural-language operation
POST /api/v1/ai/intent
{ "message": "Restart the media server and check its health" }`}</code></pre>
<h2>MCP Server</h2>
<p>
The built-in <strong>MCP (Model Context Protocol) Server</strong> exposes DashCaddy operations as tools that
AI assistants and external automation can call directly. Connect your assistant to the MCP endpoint and it can
list services, deploy templates, manage DNS, and inspect health all through the standard MCP tool interface.
</p>
<h2>WebSocket real-time updates</h2>
<p>
The dashboard subscribes to a <strong>WebSocket channel</strong> for live updates: service health changes,
container starts/stops, deployment progress, and fleet events arrive in real time without polling. You can
consume the same channel in your own dashboards or automation.
</p>
<h2>Prometheus metrics endpoint</h2>
<p>
DashCaddy exposes a Prometheus-format metrics endpoint at <code>/metrics</code> for service health, container
status, request counts, and system indicators. Scrape it with Prometheus and visualize in Grafana.
</p>
<pre className="mt-4 overflow-x-auto rounded-lg border border-surface-700/50 bg-surface-950/80 p-4 text-sm"><code>{`# Health and readiness probes
GET /healthz # liveness — is the process up?
GET /readyz # readiness — is it ready to serve (deps connected)?`}</code></pre>
<h2>Plugin &amp; extension hooks</h2>
<p>
DashCaddy includes a <strong>plugin/extension system</strong> with hooks into the deployment, DNS, proxy, and
monitoring pipelines. Write extensions to react to service lifecycle events, inject custom Caddy directives,
emit additional metrics, or integrate third-party tools without forking the core.
</p>
<h2>Why automation matters</h2>
<p>
DashCaddy is more than a dashboard because it can execute the infrastructure chain around a service, not just show service state after the fact.
</p>
<h2>Reference direction</h2>
<p>
The repo already includes an OpenAPI file, which means the public API docs can mature into a proper reference section as the external contract is stabilized.
DashCaddy can execute the full infrastructure chain around a service, not just report its state after the
fact. Between the REST API, the JS SDK, the AI Intent Router, MCP, WebSockets, Prometheus, and the plugin
system, you have every surface you need to make DashCaddy a first-class citizen of your automation stack.
</p>
</DocsLayout>
<Footer />