# PROMPT FOR AI: Project "Posimai" Architecture Context (Synology VMM Edition) # Project Context: "Posimai" Digital Factory (Local VMM) This prompt establishes the architectural context for the "Posimai" project. We have decided on the **"Synology VMM (Virtual Machine Manager)"** architecture. ## 1. Core Architecture: "The Zero-Cost Local Factory" We are leveraging the user's high-spec NAS (16GB RAM) to host the entire stack locally. | Layer | Technology | Role | | :--- | :--- | :--- | | **Hardware** | **Synology NAS (16GB RAM)** | The physical host. | | **Virtualization** | **Synology VMM** | Running an **Ubuntu Server VM** inside the NAS. | | **Control Plane** | **Dokploy** (inside VM) | CI/CD Engine. Manages containers inside the VM. | | **App Runtime** | **Docker** (inside VM) | Hosting Sake/Incense App APIs. | | **Data Plane** | **PostgreSQL** (on DSM/Docker) | Master Data, accessible from VM via local IP. | | **Network** | **Tailscale** | Exposing the VM services securely (Funnel/VPN). | ## 2. Resource Split & AI Location * **Host (DSM): 12GB** for Database, Immich (CLIP), Ollama (Nightly). * **Guest (VM): 4GB** for Dokploy & Apps. * **Cloud: Google Cloud** for Gemini 2.5 (Real-time Vision). ## 3. Optimization & Safety Rules * **Fallback**: If Cloud is down, use **Ollama** locally for low-res analysis. * **Scheduling**: Heavy tasks (Immich scan) must run at **3 AM**. * **Safety**: Google Cloud Quota limits MUST be set to prevent billing runaway. * **Caching**: Future goal is Vector Search to reuse Gemini results. ## 4. Product Roadmap * **Product A**: **Sake Note** (Existing) * **Product B**: **Incense Note** (Upcoming) * **Posimai Core**: Shared Flutter Library. ---