# Pankoblitz

> Multi-tenant landing page builder with API-first design, 8 visual themes, block-based content, and subdomain hosting on panko.page. Manageable via REST API, MCP, or web UI.

## Instructions

- Authenticate with a Bearer token: either a JWT from POST /auth/token, or an API key (pk_ prefix) from the dashboard.
- Always create a site first, then publish it to make it live. Draft sites are not publicly visible.
- Set a subdomain before publishing if you want the site at {name}.panko.page.
- Block content uses instance keys like "hero:0", "features:0", "cta:0". The number allows multiple blocks of the same type.
- Available themes: clean, sleek, bubble, glass, paper, brutalist, mono, neon.
- Available block types: hero, logo_cloud, features, stats, testimonials, faq, cta.
- Feature icons: zap, shield, chart, globe, code, star, clock, lock.
- The free tier allows 1 site. Developer ($9/mo) allows 10. Pro ($29/mo) has expanded site limits.
- The MCP endpoint is POST /mcp (Streamable HTTP transport). Same Bearer auth.

## API Quick Start

1. Register: POST /auth/register (form: email, password, name)
2. Get token: POST /auth/token (JSON: {email, password}) -> {token}
3. List orgs: GET /api/orgs (auto-created on registration)
4. Create site: POST /api/orgs/{orgId}/sites (JSON: {slug, title, theme, content, blockOrder})
5. Publish: POST /api/orgs/{orgId}/sites/{siteId}/publish
6. Set subdomain: PUT /api/orgs/{orgId}/sites/{siteId}/subdomain (JSON: {subdomain})
7. Visit: https://{subdomain}.panko.page

## API Reference

- [OpenAPI Spec](https://pankoblitz.com/openapi.json): Full OpenAPI 3.1 specification with all endpoints, schemas, and examples
- [Interactive Docs](https://pankoblitz.com/docs): Scalar API explorer with curl/JS/Python code generation

## MCP Server

- Endpoint: POST https://pankoblitz.com/mcp
- Transport: Streamable HTTP (stateless)
- Auth: Bearer token in Authorization header
- Tools: list-orgs, create-org, list-sites, create-site, update-site, publish-site, set-subdomain, delete-site, list-templates

## Content Block Reference

### Hero Block
```json
{"hero:0": {"headline": "...", "subheadline": "...", "button_text": "...", "button_url": "...", "badge": "...", "text_align": "center"}}
```

### Features Block (array)
```json
{"features:0": [{"title": "...", "description": "...", "icon": "zap"}]}
```

### CTA Block
```json
{"cta:0": {"heading": "...", "subtext": "...", "button_text": "...", "button_url": "..."}}
```

### Stats Block
```json
{"stats:0": {"heading": "...", "items": [{"value": "10K+", "label": "Users"}]}}
```

### Testimonials Block (array)
```json
{"testimonials:0": [{"quote": "...", "author": "...", "role": "...", "avatar": "A"}]}
```

### FAQ Block
```json
{"faq:0": {"heading": "FAQ", "items": [{"question": "...", "answer": "..."}]}}
```

### Logo Cloud Block
```json
{"logo_cloud:0": {"heading": "Trusted by", "logos": [{"name": "Acme", "url": "https://..."}]}}
```

## Example: Create a Complete Landing Page

```bash
# Get token
TOKEN=$(curl -s https://pankoblitz.com/auth/token -X POST -H "Content-Type: application/json" -d '{"email":"you@example.com","password":"yourpass"}' | jq -r .token)

# Create site
curl -s https://pankoblitz.com/api/orgs/YOUR_ORG_ID/sites -X POST \
  -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
  -d '{
    "slug": "my-launch",
    "title": "My Product",
    "theme": "glass",
    "primaryColor": "#8b5cf6",
    "content": {
      "hero:0": {"headline": "Ship efficiently", "subheadline": "Publish landing pages with structured metadata", "button_text": "Try Free", "button_url": "#", "text_align": "center"},
      "features:0": [
        {"title": "Fast", "description": "Built on edge", "icon": "zap"},
        {"title": "Secure", "description": "SSL included", "icon": "shield"}
      ],
      "cta:0": {"heading": "Ready?", "subtext": "Start building", "button_text": "Sign Up", "button_url": "#"}
    },
    "blockOrder": ["hero:0", "features:0", "cta:0"]
  }'

# Publish + set subdomain
curl -s https://pankoblitz.com/api/orgs/YOUR_ORG_ID/sites/SITE_ID/publish -X POST -H "Authorization: Bearer $TOKEN"
curl -s https://pankoblitz.com/api/orgs/YOUR_ORG_ID/sites/SITE_ID/subdomain -X PUT \
  -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
  -d '{"subdomain": "my-launch"}'

# Live at: https://my-launch.panko.page
```

## Optional

- [Homepage](https://pankoblitz.com): Marketing site with pricing and feature overview
- [Health Check](https://pankoblitz.com/health): Returns {"status": "ok"} — use to verify the API is up
