# System Architecture

### Layers: <a href="#layers" id="layers"></a>

1. **Client Layer**:
   * Web and mobile apps.
   * Local storage via IndexedDB.
2. **Server Layer**:
   * API servers (Node.js).
   * AI model processing.
3. **Storage Layer**:
   * Local (device) and encrypted cloud.
4. **AI Layer**:
   * Microservices for text/image generation.

### Communication: <a href="#communication" id="communication"></a>

* WebSockets for real-time sync.
* REST API for data synchronization.
