<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.chuk.dev/index.php?action=history&amp;feed=atom&amp;title=Chuk_Chat_Architecture</id>
	<title>Chuk Chat Architecture - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.chuk.dev/index.php?action=history&amp;feed=atom&amp;title=Chuk_Chat_Architecture"/>
	<link rel="alternate" type="text/html" href="https://wiki.chuk.dev/index.php?title=Chuk_Chat_Architecture&amp;action=history"/>
	<updated>2026-04-15T01:55:03Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://wiki.chuk.dev/index.php?title=Chuk_Chat_Architecture&amp;diff=23&amp;oldid=prev</id>
		<title>AI-Assistant: Add architecture overview with platform and layer explanations</title>
		<link rel="alternate" type="text/html" href="https://wiki.chuk.dev/index.php?title=Chuk_Chat_Architecture&amp;diff=23&amp;oldid=prev"/>
		<updated>2026-03-13T18:09:08Z</updated>

		<summary type="html">&lt;p&gt;Add architecture overview with platform and layer explanations&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Chuk Chat Architecture =&lt;br /&gt;
&lt;br /&gt;
This page explains the system architecture at a level that is useful for curious users, product people, and technical readers.&lt;br /&gt;
&lt;br /&gt;
== Four-layer architecture ==&lt;br /&gt;
Chuk Chat is organized in four main layers:&lt;br /&gt;
&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;Presentation layer&amp;#039;&amp;#039;&amp;#039;: pages, chat UI, sidebars, settings screens.&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;Service layer&amp;#039;&amp;#039;&amp;#039;: business logic (chat handling, model config, sync, encryption helpers).&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;Data layer&amp;#039;&amp;#039;&amp;#039;: models and persisted chat data.&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;Platform layer&amp;#039;&amp;#039;&amp;#039;: platform-specific behavior for mobile, desktop, and web.&lt;br /&gt;
&lt;br /&gt;
== Why this architecture is used ==&lt;br /&gt;
* Easier maintenance and safer updates&lt;br /&gt;
* Better testing and reliability&lt;br /&gt;
* Clear separation between UI, logic, and storage&lt;br /&gt;
&lt;br /&gt;
== Platform structure ==&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Desktop&amp;#039;&amp;#039;&amp;#039; (Windows, macOS, Linux): multi-panel layout with sidebar plus chat workspace.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Mobile&amp;#039;&amp;#039;&amp;#039; (Android): single-panel chat with slide-out navigation and mobile input UX.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Web&amp;#039;&amp;#039;&amp;#039;: desktop-style layout with browser-safe platform stubs where needed.&lt;br /&gt;
&lt;br /&gt;
== State and sync model ==&lt;br /&gt;
* UI state (input focus, scroll position) stays local to screens.&lt;br /&gt;
* App state (chat content, selected model, preferences) is managed by services.&lt;br /&gt;
* Persisted state (chat history, preferences) is stored and synced, with encrypted chat content.&lt;br /&gt;
&lt;br /&gt;
== Streaming architecture ==&lt;br /&gt;
Chuk Chat supports both:&lt;br /&gt;
* HTTP SSE streaming (POST /v1/ai/chat)&lt;br /&gt;
* WebSocket streaming (/v1/ai/chat/ws)&lt;br /&gt;
&lt;br /&gt;
This gives good browser compatibility plus stable mobile streaming behavior.&lt;br /&gt;
&lt;br /&gt;
== Security architecture highlights ==&lt;br /&gt;
* End-to-end encrypted chat storage&lt;br /&gt;
* Certificate pinning on supported native platforms&lt;br /&gt;
* Zero-data-retention provider filtering at the routing layer&lt;br /&gt;
&lt;br /&gt;
== Related pages ==&lt;br /&gt;
* [[How Chuk Chat Works]]&lt;br /&gt;
* [[Chuk Chat AI Providers and Services]]&lt;br /&gt;
* [[Chuk Chat Backend and API]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Chuk Chat]]&lt;br /&gt;
[[Category:Architecture]]&lt;/div&gt;</summary>
		<author><name>AI-Assistant</name></author>
	</entry>
</feed>