Add Telegram Bot notification node to n8n workflow: New Features: - Telegram notification node for critical severity logs - Italian message template with emoji and MarkdownV2 formatting - Smart routing: Telegram only for critical logs - Error handling: continueOnFail prevents workflow interruption - Environment-based configuration (TELEGRAM_CHAT_ID) Message Template Includes: - 🚨 Alert header with severity - 📍 Server hostname identification - 📝 AI-generated problem summary - 💡 Suggested bash command in code block - ⚠️ Confirmation required flag - 📝 Additional notes from AI - 📊 AI processing status - 🤖 Model used (openai/gpt-4o-mini) - ⏰ Localized Italian timestamp Workflow Flow: Webhook → HMAC → Validation → PostgreSQL → OpenRouter → Critical? → Telegram → Response ↓ FALSE Success Response Configuration Required: 1. Create Telegram Bot via @BotFather 2. Get TELEGRAM_BOT_TOKEN 3. Get TELEGRAM_CHAT_ID via @userinfobot 4. Configure credentials in n8n UI 5. Set TELEGRAM_CHAT_ID environment variable Documentation: - docs/telegram_setup.md: Setup instructions - .env.example: Environment variables template - .gitignore: Protect sensitive telegram_setup.md - docs/prd.md: Updated Sprint 2 completion status Sprint 2 Complete: ✅ Secure log ingestion (bash) ✅ n8n webhook workflow ✅ OpenRouter AI integration ✅ PostgreSQL storage ✅ HMAC authentication ✅ Telegram notifications Refs: docs/specs/ai_pipeline.md, docs/specs/bash_ingestion_secure.md
4.4 KiB
4.4 KiB
Product Requirements Document (PRD) - MVP
Progetto: LogWhisperer AI (aka Sacchi's Server Sentinel)
Status: 🟢 MVP Active Development - Sprint 1 Completed
Last Updated: 2026-04-02
Version: 0.1.0
Sprint Progress:
- ✅ Sprint 1: Log Ingestion Script (Completed)
- 🔄 Sprint 2: AI Processing Pipeline (In Progress)
- ✅ Feature 2.1: LLM System Prompt (Metodo Sacchi)
- ✅ Feature 2.2: Telegram Bot Configuration
- ⏳ Feature 2.3: n8n Workflow Integration
- ⏳ Sprint 3: Alerting & Onboarding
- ⏳ Sprint 4: Landing Page & Payments
1. Executive Summary & UVP
Vision: Trasformare log di server e database incomprensibili in alert azionabili e in "plain language" per non-addetti ai lavori. Unique Value Proposition (UVP): "Il DevOps tascabile che traduce i crash del tuo server e ti dice l'esatto comando per risolverli in sicurezza, senza farti perdere ore su StackOverflow."
2. Target & Problema (Customer Discovery / Market Fit)
- Buyer Persona (Early Adopters): Piccole Web Agency, sviluppatori freelance frontend/fullstack e startup early-stage.
- Problema (Pain): Gestiscono VPS o piccoli cluster (es. AWS, DigitalOcean) ma non hanno budget o volume per un DevOps/Sistemista senior interno. Quando c'è un downtime, c'è il panico. Ore perse a decifrare log = siti down = clienti persi = danni economici e d'immagine.
3. Core Features (Scope dell'MVP)
Regola d'oro: Nessuna feature inutile. Sviluppiamo solo ciò che serve per validare l'ipotesi di mercato.
- Feature 1: Log Ingestion (Edge to Cloud). Uno script bash super leggero fornito al cliente da installare sul proprio server. Lo script fa un
tail -fsui log critici (es. syslog, nginx, postgresql) e spara il payload via POST request a un Webhook quando rileva stringhe di errore (es. "FATAL", "ERROR", "OOM"). - Feature 2: AI Processing Pipeline. Workflow su n8n che riceve il payload dal Webhook, formatta il testo e fa una chiamata API a un LLM. Il System Prompt deve integrare il "Metodo Sacchi" (Safety first, little often, double check) per garantire risposte sicure e conservative.
- Feature 3: Alerting Umano. L'LLM restituisce un JSON strutturato che n8n formatta e invia come notifica su Telegram o Slack del cliente. La notifica deve contenere:
- Sintesi del problema in italiano semplice (es. "PostgreSQL è crashato per mancanza di spazio disco").
- Severità (Low, Medium, Critical).
- Lo snippet di codice/comando esatto da lanciare per la mitigazione immediata.
4. Stack Tecnologico (Approccio Micro-SaaS)
- Core Logic & API Gateway: n8n (self-hosted o cloud).
- Database & Auth: Supabase / PostgreSQL (per gestire gli user_id, mappare i webhook_url univoci per cliente, e tracciare il piano di abbonamento).
- AI Engine: API OpenAI (GPT-4o-mini per velocità/costo) o Anthropic (Claude 3.5 Sonnet per coding task).
- Frontend MVP & Pagamenti: Landing page in HTML/CSS o builder No-Code integrata con Stripe Payment Links.
5. Business Model & Pricing
- SaaS B2B a ricorrenza mensile (Tiered Pricing).
- Tier 1 (Hobby/Solo): 19€/mese (Max 1 server collegato, max X alert/mese).
- Tier 2 (Pro): 49€/mese (Fino a 5 server collegati).
- Go-to-Market Offer: 14-day Free Trial (Cardless) per abbassare al minimo l'attrito in fase di "Activation".
6. Funnel di Crescita (Modello AARRR)
- Acquisition (ToFu): Content marketing tecnico/dimostrativo su YouTube e LinkedIn ("Ho automatizzato il troubleshooting del mio server Linux con l'AI. Ecco i risultati"). Call To Action verso la Landing Page.
- Activation: L'utente atterra sulla Landing Page, inserisce la mail, riceve il suo Webhook URL e lo script bash. L'Aha Moment scatta quando riceve il primo alert tradotto su Telegram dopo aver simulato un errore.
- Retention: Valore passivo e continuo (il bot monitora silenziosamente 24/7). Zero lavoro per l'utente finché non c'è un problema.
- Revenue: Trigger automatico via email allo scadere del giorno 14 per inserire la carta di credito su Stripe.
- Referral: TBD in fase post-lancio (es. affiliazioni B2B o link "Powered by" nei report).
7. Metriche di Successo Iniziali (OMTM)
- Activation Rate: % di iscritti alla Trial che installano effettivamente lo script e triggherano almeno 1 alert (se non lo installano, la Trial è inutile).
- Trial-to-Paid Conversion Rate: % di utenti che inseriscono la carta al termine dei 14 giorni.x