# Cursor Agent — server-connection Proyek ini memiliki **Cursor project rules** aktif di `.cursor/rules/`. ## Rules aktif | File | Scope | Isi | |------|-------|-----| | `00-project-context` | Selalu | Host SSH, deploy, struktur repo | | `01-enterprise-principles` | Selalu | Prinsip enterprise & UX wajib | | `02-implementation-status` | Selalu | Status fitur geonet-console (audit) | | `03-ai-behavior` | Selalu | Perilaku agent, larangan, bahasa | | `04-geonet-uiux` | `geonet-console/`, `databaselist/` | Standar UI/UX | | `05-laravel-backend` | `*.php` di apps | Service layer, API, audit | | `06-infrastructure` | `scripts/`, `server/` | SSH, Mikrotik, deploy | ## Aplikasi utama - **geonet-console** — https://console.gisportal.id - **databaselist** — https://databaselist.gisportal.id - **sqlservercheck** — https://sqlservercheck.gisportal.id ## Dokumentasi sumber (referensi lengkap) - `Cursor-Enterprise-Full-Documentation/` — baseline enterprise - `cursor-exsisting/` — audit UI/UX detail - `cursor-exsisting-ask/` — status implementasi detail - `rules`, `rules-adv` — requirement bisnis manual - `server/ollama-nas-project-search-requirements.md` — requirement lengkap Ollama + NAS search + license extraction --- ## Ollama + NAS Project Search (ringkasan agent) **Status:** direncanakan (belum diimplementasi di geonet-console). **Dokumen lengkap:** `server/ollama-nas-project-search-requirements.md` ### Ringkasan keputusan | Pertanyaan | Jawaban | |------------|---------| | Ollama bisa langsung scan `\\10.100.1.10\project`? | **Tidak** — perlu **indexer + PostgreSQL** | | Multi-folder (project, Marketing, dll.)? | **Ya** — via env **indexer**, bukan env Ollama | | Host Ollama POC & CPU | **VM `10.100.1.26` (aiopr)** — dedicated Ubuntu 22.04 | | Host Ollama GPU (target) | Migrasi **Windows 11 + GPU** (~6 bulan) → ganti `OLLAMA_BASE_URL` | | Model Ubuntu → Windows portable? | **Ya** — copy `~/.ollama/models/` atau `ollama pull` ulang | | Indeks RAG pindah ke PC Windows? | **Tidak perlu** — tetap di PostgreSQL `10.100.1.25` | | License code / tanggal expired dari PDF? | **Ya** — `license_registry` + parser terstruktur (bukan tebakan LLM) | **Prinsip:** Ollama = bahasa alami. Indexer + PostgreSQL = otak pencarian. NAS = storage saja. ### Arsitektur ``` User → geonet-console (chat UI / API v1) │ ▼ Project Search Service (Laravel / worker) - query natural language, filter source, audit log │ ┌────┴────┐ ▼ ▼ PostgreSQL Ollama 10.100.1.26 (aiopr) 10.100.1.25 qwen2.5 + nomic-embed-text - project_index - project_chunks - license_registry - pgvector ▲ │ Indexer Worker (VM) — mount SMB QNAP, crawl, ekstrak, embed │ ▼ QNAP TS-932X 10.100.1.10 (\\10.100.1.10\project, Marketing, …) ``` | Host | IP | Peran | |------|-----|-------| | QNAP NAS | `10.100.1.10` | SMB storage (~2,6 TB project, ~1,4 juta file) | | **Ollama VM** | **`10.100.1.26`** | **Ollama inference + indexer POC** (`aiopr`) | | Reverse proxy | `10.100.1.24` | Nginx, Docker, geonet-console | | Main database | `10.100.1.25` | PostgreSQL + pgvector | | geonet-console | via `.24` | UI + API | SSH: `.\scripts\ssh-ollama.ps1`, `.\scripts\ssh-qnap.ps1`, `.\scripts\ssh-remote.ps1` ### API (target geonet-console) | Endpoint | Method | Fungsi | |----------|--------|--------| | `/api/v1/project-search/ask` | POST | Query natural language + optional `sources[]` | | `/api/v1/project-search/index/status` | GET | Status indeks per source | | `/api/v1/project-search/sources` | GET | Daftar source dari env | | `/api/v1/license-search/ask` | POST | Query license natural language | | `/api/v1/license-search/code/{code}` | GET | Lookup exact license code | | `/api/v1/license-search/expiring` | GET | License mendekati expired | | `/api/v1/license-search/reindex` | POST | Re-parse file (admin, audit) | **Wajib enterprise:** LDAP/API token, audit log, throttle, RBAC per `source_id`. ### Timeline rekomendasi | Tahap | Durasi | Deliverable | |-------|--------|-------------| | POC metadata | 1–2 minggu | Index `project`, chat di console | | Multi-source | +1 minggu | Marketing/GIS via env | | Fase 2 RAG | 2–4 minggu | pgvector + ekstrak dokumen | | License extraction P1 | +1–2 minggu | `license_registry` + parser GM & ESRI | | Migrasi GPU | ~6 bulan | Windows 11 + GPU, ganti `OLLAMA_BASE_URL` | ### Checklist go-live #### Host `10.100.1.26` - [x] vCPU **16** (upgraded 2026-06-15) - [ ] Ollama + model terinstall - [ ] `ufw` + bind `11434` internal - [ ] Mount SMB QNAP untuk indexer POC #### Stack - [ ] PostgreSQL pgvector + `project_index` di `10.100.1.25` - [ ] `OLLAMA_BASE_URL=http://10.100.1.26:11434` di geonet-console - [ ] Indeks awal `project` (metadata) selesai - [ ] Audit log pencarian aktif - [ ] RBAC source sensitif (Marketing/Sales) - [ ] Rencana migrasi Windows GPU terdokumentasi - [ ] Tabel `license_registry` + parser P1 (`geonet_global_mapper_v1`, `esri_certificate_id_v1`) - [ ] Index license folder `project/2025`–`2026` terlebih dahulu --- ## Verifikasi agent aktif Di Cursor: **Settings → Rules** — pastikan project rules dari `.cursor/rules/` terdeteksi.