Mammoth Templates logomammoth templates

Home / AI Apps / Chatbots

Video preview

Orbit Chat is a complete chat application front end in the style people already know: a conversation sidebar, a streaming message thread and a composer. Everything a real product needs is wired up - create, rename, search and delete chats, regenerate or stop a reply, copy messages and code, export a conversation, switch persona, and tune settings. State is kept in localStorage, so it survives reloads.

No AI backend is included, by design. A convincing mock engine in js/ai.js answers with rule-based, markdown-rich replies (tables, lists, code, quick maths, jokes) streamed token by token, so the app behaves exactly like it is talking to a real model. The engine sits behind one small provider interface; there are commented, working fetch examples for OpenAI-compatible and Anthropic-style streaming APIs, switched on from Settings with a key that is stored only in the visitor's browser.

The markdown renderer is written from scratch and escapes everything before adding markup, so model output can never inject HTML. It renders headings, lists, tables, quotes, links and fenced code blocks with a language label, light syntax colouring and a copy button.

Highlights

  • Streaming, token-by-token replies with Stop and Regenerate
  • Custom safe markdown renderer: tables, lists, quotes, code blocks with copy button and syntax colouring
  • Conversation sidebar: new, rename, delete, search, date groups, persisted in localStorage
  • Six persona / system-prompt presets plus a free-text system prompt per chat
  • Export any chat as Markdown, JSON or plain text
  • Settings: light/dark/system theme, model name, temperature, reply speed
  • One-file provider interface (js/ai.js) with OpenAI-compatible and Anthropic-style examples; keys never hardcoded
  • Responsive down to phone width, keyboard accessible, reduced-motion aware