Ghost’s publishing model, rebuilt on Phoenix LiveView.
Members, newsletters, paid tiers, comments and eighteen themes, as you would expect from a Ghost-style platform. Then the parts that are Wraith’s own: widgets readers use together in real time, one table on DynamoDB or Postgres, and an MCP server that lets an agent run the whole site.
$ git clone https://github.com/bmalum/wraith.git
$ cd wraith && mix setup
$ mix phx.server
# then open localhost:4000/admin/setup
Needs Elixir 1.17 or newer and Erlang/OTP. Development uses an in-memory store, so there is no database to set up.
Eighteen themes in the box.
Six layouts with three skins each, picked in Settings. A theme covers every page a reader sees: front page, posts, tags, authors, search and sign-up. It is a Phoenix layout plus a map of CSS tokens, compiled into the release, so no template code is loaded at runtime.
Editorial masthead, lead story, card feed
List dated rows, a narrow column
Grid centred logo, image-first cards
Magazine a hero story and a sidebar
Minimal one narrow column
Journal dated entries, the date in the margin
Posts that stay live.
Put a counter, a poll, reactions or a countdown in a post with one line of Markdown. Every reader of the page shares the widget’s state, so a vote in one tab shows up in every other open tab at once.
{{widget poll question="Tabs or spaces?" options="Tabs|Spaces" id=tabs}}
Widgets are Lua. You write them in the admin next to a live preview, every save is a version you can roll back to, and they run in a sandbox: no file access, network only to hosts you allow, 250 ms per call and 64 KB of state.
A whole widget: a clap button every reader shares.
function init(props) return { claps = 0 } end
function render(state, props, meta)
return '<button class="w-btn" ' .. wraith.action("clap") .. '>👏 '
.. wraith.format(state.claps) .. '</button>'
end
function handle(state, event, payload, meta)
if event == "clap" then state.claps = state.claps + 1 end
return state
end
An agent can run the whole site.
Everything the admin can do is an MCP tool, 53 of them: drafting and
publishing posts, sending newsletters, managing members, writing and testing
widgets, changing the theme. Connect Kiro CLI, Claude or Cursor to
/mcp with an Admin key. Tools respect staff roles, and a Content key
gets 6 read tools that see only what the public site shows.
kiro-cli mcp add --name wraith \
--url https://your-site/mcp \
--header "Authorization: Bearer <admin key>"
Inside the admin, the agent studio runs a Kiro agent on a Lambda MicroVM with the same tools. You watch the transcript and approve each change before it is made. Without a MicroVM configured it runs a scripted offline agent, so the flow works on a laptop too.
| Area | Examples | Tools |
|---|---|---|
| Posts, pages, newsletters | posts_list, post_get, post_revisions | 13 |
| Widgets | widgets_list, widget_get, widget_docs | 11 |
| Members | members_list, member_get, member_create | 8 |
| Site, settings, themes | site_info, settings_get, settings_update | 6 |
| Authors | authors_list, author_create, author_update | 4 |
| Tags | tags_list, tag_upsert, tag_delete | 3 |
| Uploads | uploads_list, upload_from_url, upload_base64 | 3 |
| API keys | api_keys_list, api_key_create, api_key_delete | 3 |
| Comments | comments_list, comment_moderate | 2 |
Coming from Ghost.
Export your site in Ghost under Settings, Labs, Export, and upload the file in Wraith’s admin under Integrations. Existing slugs and emails are skipped, so you can run the import again.
Comes across
- Posts and pages, with their HTML turned into Markdown.
- Tags and authors. Authors set a new password by mail.
- Members, with their status and labels.
- The Content API, in Ghost’s JSON shape. A front-end written against it needs a new key and little else.
Not there yet
- Ghost themes. Handlebars templates don’t run; Wraith themes are Phoenix components.
- Stripe links. Paid members keep their status, but billing has to be connected again.
- Ghost Admin API clients. The JSON is Ghost-shaped, the authentication is a Bearer key, not Ghost’s signed tokens.
- ActivityPub and the social web.
One table, three databases.
Wraith keeps everything in a single table with one secondary index. Run it on
DynamoDB, PostgreSQL or Aurora DSQL; development uses an in-memory store. The
adapters are small, and the same test suite runs against each one.
mix wraith.table creates the table on any of them.
| Store | Good for |
|---|---|
| Memory | Development and tests, the default in dev. Nothing persists. |
| DynamoDB | AWS with no database server to run. A TTL clears expired sessions. |
| PostgreSQL | Any Postgres you already operate. One items table, JSON per row. |
| Aurora DSQL | Serverless and Postgres-compatible, with an IAM token per connection. |