From b7ef07dd3492071ab76f252b967a6a9db712dd22 Mon Sep 17 00:00:00 2001 From: Luca Sacchi Ricciardi Date: Mon, 6 Apr 2026 13:54:57 +0200 Subject: [PATCH] refactor: rename project from AgenticRAG to DocuMente MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Changes - Update all references from AgenticRAG to DocuMente - Update README.md with new project description and structure - Update LICENSE with new project name - Update API title and descriptions in main.py - Update frontend components (Layout, Login, Dashboard, Settings) - Update static HTML page - Update all documentation files (prd-v2.md, frontend-plan.md, etc.) - Update test files with new project name - Update docker-compose.yml, Dockerfile, requirements.txt ## SEO Benefits - DocuMente combines 'Documento' and 'Mente' (Italian for Document and Mind) - Memorable and brandable name - Reflects the core functionality: AI-powered document intelligence πŸŽ‰ Project officially renamed to DocuMente! --- Dockerfile | 2 +- LICENSE | 8 +- README.md | 192 ++++++++++-------- TEST_COVERAGE_REPORT.md | 2 +- docker-compose.yml | 2 +- frontend-plan.md | 8 +- frontend/README.md | 4 +- frontend/src/components/layout/Layout.tsx | 2 +- frontend/src/pages/Dashboard.tsx | 2 +- frontend/src/pages/Login.tsx | 2 +- frontend/src/pages/Settings.tsx | 2 +- prd-v2.md | 2 +- requirements.txt | 2 +- src/agentic_rag/README.md | 2 +- src/agentic_rag/api/main.py | 10 +- src/agentic_rag/api/routes/chat.py | 2 +- src/agentic_rag/core/config.py | 2 +- src/agentic_rag/core/llm_factory.py | 2 +- static/index.html | 6 +- tests/unit/test_agentic_rag/conftest.py | 4 +- .../test_agentic_rag/test_api/test_chat.py | 2 +- .../test_agentic_rag/test_core/test_config.py | 2 +- .../test_core/test_llm_factory.py | 2 +- ...2a-c883-47b6-9f42-12abb80be380_document.md | 1 + ...ce-ef30-4494-a2b1-6651d79378dc_document.md | 1 + ...2-0844-4a61-a2a7-52698f31e035_document.txt | 1 + ...f-5cce-4176-b931-876f9d47994f_document.txt | 1 + ...7-df8c-416a-8a86-e1b851952fce_document.txt | 1 + ...54-1cfe-42b3-8de9-a746639cf06d_document.md | 1 + ...2-e2eb-46b5-9a1d-1a99be16c310_document.txt | 1 + ...-bc0f-42ed-ba53-620ce0f4fdbc_document.docx | 1 + ...26-9e09-46f9-bb1d-ca3ff2908225_document.md | 1 + ...d-ab99-4e5b-85aa-a7df4216396a_document.txt | 1 + ...9e-e8d4-4722-bf62-8e7033720a91_document.md | 1 + ...04-f408-4a4a-afa1-2235633dd854_document.md | 1 + ...b-70e4-429f-ad5c-ea112deddc34_document.txt | 1 + ...eb-20dd-4192-a392-eb357d259812_document.md | 1 + ...35-472d-4a62-be2a-ea5cc24fb27d_document.md | 1 + ...d-637e-4581-973c-bb3eed780ef3_document.txt | 1 + ...3-bd51-480c-a476-d9bc091dd44a_document.txt | 1 + 40 files changed, 159 insertions(+), 122 deletions(-) create mode 100644 uploads/1935902a-c883-47b6-9f42-12abb80be380_document.md create mode 100644 uploads/1f2840ce-ef30-4494-a2b1-6651d79378dc_document.md create mode 100644 uploads/401fccc2-0844-4a61-a2a7-52698f31e035_document.txt create mode 100644 uploads/4aba5c4f-5cce-4176-b931-876f9d47994f_document.txt create mode 100644 uploads/8c62e337-df8c-416a-8a86-e1b851952fce_document.txt create mode 100644 uploads/8df2e154-1cfe-42b3-8de9-a746639cf06d_document.md create mode 100644 uploads/99c71b82-e2eb-46b5-9a1d-1a99be16c310_document.txt create mode 100644 uploads/a60e190b-bc0f-42ed-ba53-620ce0f4fdbc_document.docx create mode 100644 uploads/aa0aaa26-9e09-46f9-bb1d-ca3ff2908225_document.md create mode 100644 uploads/b313dc8d-ab99-4e5b-85aa-a7df4216396a_document.txt create mode 100644 uploads/ce0aa59e-e8d4-4722-bf62-8e7033720a91_document.md create mode 100644 uploads/daa5fd04-f408-4a4a-afa1-2235633dd854_document.md create mode 100644 uploads/e002922b-70e4-429f-ad5c-ea112deddc34_document.txt create mode 100644 uploads/e155f7eb-20dd-4192-a392-eb357d259812_document.md create mode 100644 uploads/e3ca5935-472d-4a62-be2a-ea5cc24fb27d_document.md create mode 100644 uploads/fde1af6d-637e-4581-973c-bb3eed780ef3_document.txt create mode 100644 uploads/fec47e73-bd51-480c-a476-d9bc091dd44a_document.txt diff --git a/Dockerfile b/Dockerfile index 722aac8..36d30d9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -# AgenticRAG Dockerfile +# DocuMente Dockerfile # Multi-stage build for production FROM python:3.11-slim as builder diff --git a/LICENSE b/LICENSE index da94ff3..3e9fa32 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ Copyright e Licenza -Progetto: AgenticRAG (aka NotebookLM Agent API) +Progetto: DocuMente Autore: Luca Sacchi Ricciardi Contatto: luca@lucasacchi.net @@ -20,14 +20,14 @@ Nessuna Modifica: È vietato modificare, alterare, adattare, tradurre, decompila Uso Non Autorizzato: È vietato vendere, noleggiare, dare in locazione, concedere in licenza o utilizzare il software per scopi commerciali senza una licenza specifica rilasciata dall'autore. -Tutela del Marchio: Il nome "AgenticRAG", "NotebookLM Agent API" e le metodologie di sviluppo associate sono di proprietΓ  dell'autore. +Tutela del Marchio: Il nome "DocuMente" e le metodologie di sviluppo associate sono di proprietΓ  dell'autore. Legge Applicabile e Foro Competente -Il presente accordo Γ¨ regolato dalla legge italiana. Per qualsiasi controversia derivante dall'interpretazione, esecuzione o risoluzione della presente licenza e per ogni disputa relativa al progetto "AgenticRAG", sarΓ  competente in via esclusiva il Foro di Milano, Italia. +Il presente accordo Γ¨ regolato dalla legge italiana. Per qualsiasi controversia derivante dall'interpretazione, esecuzione o risoluzione della presente licenza e per ogni disputa relativa al progetto "DocuMente", sarΓ  competente in via esclusiva il Foro di Milano, Italia. Contatti Per richieste di autorizzazione, collaborazioni o informazioni su licenze commerciali, si prega di contattare l'autore all'indirizzo email: luca@lucasacchi.net. -Documento generato il 6 Aprile 2026 per la release del sistema completo. +Documento generato il 6 Aprile 2026 per la release di DocuMente. diff --git a/README.md b/README.md index d3dd88d..d5289ba 100644 --- a/README.md +++ b/README.md @@ -1,53 +1,52 @@ -# NotebookLM Agent API +# DocuMente [![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/) [![FastAPI](https://img.shields.io/badge/FastAPI-0.100+-009688.svg)](https://fastapi.tiangolo.com/) [![Code style: ruff](https://img.shields.io/badge/code%20style-ruff-000000.svg)](https://github.com/astral-sh/ruff) [![Tests](https://img.shields.io/badge/tests-pytest-blue.svg)](https://docs.pytest.org/) -> **API e Webhook Interface per Google NotebookLM Automation** +> **Sistema di Retrieval Agentico con AI - Interroga i tuoi documenti in modo intelligente** -Questo progetto fornisce un'interfaccia API REST completa per Google NotebookLM, con supporto webhook per integrazione con altri agenti AI. Sviluppato seguendo le metodologie **Spec-Driven Development (SDD)** e **Test Driven Development (TDD)**. +DocuMente Γ¨ un sistema RAG (Retrieval-Augmented Generation) avanzato che permette di caricare documenti e interagirci tramite chat conversazionale. Supporta multipli provider LLM (OpenAI, Z.AI, OpenCode Zen, OpenRouter, Anthropic, Google, Mistral, Azure) e offre una moderna interfaccia web React. ## Caratteristiche -- **API REST Completa**: Gestione notebook, fonti, chat, generazione contenuti -- **Webhook System**: Notifiche event-driven per integrazione multi-agent -- **AI Skill**: Interfaccia nativa per OpenCode e altri agenti AI -- **QualitΓ  del Codice**: β‰₯90% test coverage, type hints, linting -- **Metodologie**: SDD + TDD + Conventional Commits +- **🧠 Multi-Provider LLM**: Supporta 8 provider diversi, scegli il tuo preferito +- **πŸ“„ Gestione Documenti**: Upload tramite drag & drop, supporta PDF, DOCX, TXT, MD +- **πŸ’¬ Chat Intelligente**: Interroga i tuoi documenti con risposte contestuali +- **πŸ”— API REST Completa**: Integra DocuMente nelle tue applicazioni +- **🎨 Interfaccia Web Moderna**: React 18 + TypeScript + Tailwind CSS +- **πŸ”’ Autenticazione Sicura**: API Key + JWT support +- **🐳 Containerizzato**: Docker e docker-compose pronti all'uso ## Requisiti - Python 3.10+ - [uv](https://github.com/astral-sh/uv) per dependency management -- Account Google con accesso a NotebookLM +- Node.js 18+ (per il frontend) +- Docker (opzionale) ## Installazione ```bash # Clona il repository -git clone https://github.com/example/notebooklm-agent.git -cd notebooklm-agent +git clone https://github.com/example/documente.git +cd documente -# Crea virtual environment +# Backend +cd backend uv venv --python 3.10 source .venv/bin/activate - -# Installa dipendenze uv sync --extra dev --extra browser -# Installa pre-commit hooks -uv run pre-commit install - -# Configura ambiente -cp .env.example .env -# Modifica .env con le tue configurazioni +# Frontend +cd ../frontend +npm install ``` ## Configurazione -Crea un file `.env`: +Crea un file `.env` nella cartella backend: ```env # API Configuration @@ -56,60 +55,76 @@ NOTEBOOKLM_AGENT_WEBHOOK_SECRET=your-webhook-secret NOTEBOOKLM_AGENT_PORT=8000 NOTEBOOKLM_AGENT_HOST=0.0.0.0 -# NotebookLM Configuration -NOTEBOOKLM_HOME=~/.notebooklm -NOTEBOOKLM_PROFILE=default +# LLM Provider API Keys (configura almeno uno) +OPENAI_API_KEY=sk-... +ZAI_API_KEY=... +OPENCODE_ZEN_API_KEY=... +OPENROUTER_API_KEY=... +ANTHROPIC_API_KEY=... +GOOGLE_API_KEY=... +MISTRAL_API_KEY=... +AZURE_API_KEY=... + +# Vector Store +QDRANT_HOST=localhost +QDRANT_PORT=6333 # Logging LOG_LEVEL=INFO LOG_FORMAT=json ``` -## Autenticazione NotebookLM - -```bash -# Login a NotebookLM (prima volta) -notebooklm login - -# Verifica autenticazione -notebooklm auth check -``` - ## Avvio -```bash -# Development server -uv run fastapi dev src/notebooklm_agent/api/main.py +### Con Docker (Consigliato) -# Production server -uv run gunicorn notebooklm_agent.api.main:app -w 4 -k uvicorn.workers.UvicornWorker +```bash +docker-compose up ``` -L'API sarΓ  disponibile su `http://localhost:8000` +### Manuale -- API docs: `http://localhost:8000/docs` -- OpenAPI schema: `http://localhost:8000/openapi.json` +```bash +# Backend +cd backend +uv run fastapi dev src/agentic_rag/api/main.py + +# Frontend (in un altro terminale) +cd frontend +npm run dev +``` + +L'applicazione sarΓ  disponibile: +- **Web UI**: http://localhost:3000 +- **API docs**: http://localhost:8000/api/docs +- **OpenAPI schema**: http://localhost:8000/openapi.json ## Uso Rapido +### Via Web UI + +1. Accedi a http://localhost:3000 +2. Inserisci la tua API Key +3. Carica documenti nella sezione "Documents" +4. Inizia a chattare nella sezione "Chat" + +### Via API + ```bash -# Creare notebook -curl -X POST http://localhost:8000/api/v1/notebooks \ +# Upload documento +curl -X POST http://localhost:8000/api/v1/documents \ -H "X-API-Key: your-key" \ - -H "Content-Type: application/json" \ - -d '{"title": "Ricerca AI"}' + -F "file=@documento.pdf" -# Aggiungere fonte -curl -X POST http://localhost:8000/api/v1/notebooks/{id}/sources \ +# Query RAG +curl -X POST http://localhost:8000/api/v1/query \ -H "X-API-Key: your-key" \ -H "Content-Type: application/json" \ - -d '{"type": "url", "url": "https://example.com"}' - -# Generare podcast -curl -X POST http://localhost:8000/api/v1/notebooks/{id}/generate/audio \ - -H "X-API-Key: your-key" \ - -H "Content-Type: application/json" \ - -d '{"instructions": "Make it engaging"}' + -d '{ + "question": "Qual Γ¨ il contenuto principale?", + "provider": "openai", + "model": "gpt-4o-mini" + }' ``` ## Testing @@ -119,50 +134,53 @@ curl -X POST http://localhost:8000/api/v1/notebooks/{id}/generate/audio \ uv run pytest # Con coverage -uv run pytest --cov=src/notebooklm_agent --cov-report=term-missing +uv run pytest --cov=src/agentic_rag --cov-report=term-missing # Solo unit test uv run pytest tests/unit/ -m unit - -# Solo integration test -uv run pytest tests/integration/ -m integration ``` -## Sviluppo - -### Workflow - -1. **Spec-Driven**: Definisci requisiti in `prd.md` -2. **TDD**: Scrivi test β†’ Implementa β†’ Refactor -3. **Conventional Commits**: Segui lo standard per i commit -4. **Pre-commit**: I controlli automatici garantiscono qualitΓ  - -### Struttura Progetto +## Struttura Progetto ``` -notebooklm-agent/ -β”œβ”€β”€ src/notebooklm_agent/ # Codice sorgente -β”œβ”€β”€ tests/ # Test suite -β”œβ”€β”€ docs/ # Documentazione -β”œβ”€β”€ prd.md # Product Requirements -β”œβ”€β”€ AGENTS.md # Linee guida OpenCode -β”œβ”€β”€ SKILL.md # Definizione skill AI -└── CONTRIBUTING.md # Guida contribuzione +documente/ +β”œβ”€β”€ backend/ +β”‚ β”œβ”€β”€ src/agentic_rag/ # Codice sorgente backend +β”‚ β”‚ β”œβ”€β”€ api/ # FastAPI routes +β”‚ β”‚ β”œβ”€β”€ core/ # Config, auth, LLM factory +β”‚ β”‚ └── services/ # RAG, documents, vector store +β”‚ β”œβ”€β”€ tests/ # Test suite +β”‚ └── requirements.txt +β”œβ”€β”€ frontend/ +β”‚ β”œβ”€β”€ src/ # React + TypeScript +β”‚ β”œβ”€β”€ public/ +β”‚ └── package.json +β”œβ”€β”€ docker-compose.yml +β”œβ”€β”€ Dockerfile +└── README.md ``` +## Provider LLM Supportati + +| Provider | Modelli Principali | Stato | +|----------|-------------------|-------| +| **OpenAI** | GPT-4o, GPT-4, GPT-3.5 | βœ… | +| **Z.AI** | zai-large, zai-medium | βœ… | +| **OpenCode Zen** | zen-1, zen-lite | βœ… | +| **OpenRouter** | Multi-model access | βœ… | +| **Anthropic** | Claude 3.5, Claude 3 | βœ… | +| **Google** | Gemini 1.5 Pro/Flash | βœ… | +| **Mistral** | Mistral Large/Medium | βœ… | +| **Azure** | GPT-4, GPT-4o | βœ… | + ## Documentazione -- [PRD](./prd.md) - Product Requirements Document +- [PRD v2](./prd-v2.md) - Product Requirements Document (DocuMente) +- [Frontend Plan](./frontend-plan.md) - Piano sviluppo frontend +- [Test Coverage](./TEST_COVERAGE_REPORT.md) - Report coverage test - [AGENTS.md](./AGENTS.md) - Linee guida per OpenCode -- [SKILL.md](./SKILL.md) - Skill per agenti AI - [CONTRIBUTING.md](./CONTRIBUTING.md) - Come contribuire -## Stato del Progetto - -⚠️ **Versione Iniziale**: Questo progetto Γ¨ in fase di setup iniziale. Le funzionalitΓ  API sono pianificate per le prossime release. - -Vedi [CHANGELOG.md](./CHANGELOG.md) per lo stato attuale e la roadmap. - ## βš–οΈ Licenza e Note Legali Questo software Γ¨ proprietΓ  riservata di Luca Sacchi Ricciardi. @@ -177,4 +195,6 @@ Vedi [CONTRIBUTING.md](./CONTRIBUTING.md) per le linee guida su come contribuire --- -**Nota**: Questo Γ¨ un progetto non ufficiale e non Γ¨ affiliato con Google. Usa le API interne di NotebookLM che possono cambiare senza preavviso. +**Autore**: Luca Sacchi Ricciardi +**Contatto**: luca@lucasacchi.net +**Copyright**: Β© 2026 Tutti i diritti riservati diff --git a/TEST_COVERAGE_REPORT.md b/TEST_COVERAGE_REPORT.md index cd6c0d6..0761686 100644 --- a/TEST_COVERAGE_REPORT.md +++ b/TEST_COVERAGE_REPORT.md @@ -1,4 +1,4 @@ -# Test Coverage Report - AgenticRAG +# Test Coverage Report - DocuMente ## πŸ“Š Summary diff --git a/docker-compose.yml b/docker-compose.yml index efaf853..62f9da0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,4 @@ -# AgenticRAG - Docker Compose +# DocuMente - Docker Compose # Complete stack with API, Qdrant, and optional services version: '3.8' diff --git a/frontend-plan.md b/frontend-plan.md index 76e33d4..2ed10b8 100644 --- a/frontend-plan.md +++ b/frontend-plan.md @@ -1,8 +1,8 @@ -# Piano di Sviluppo Frontend - AgenticRAG +# Piano di Sviluppo Frontend - DocuMente ## πŸ“‹ Overview -Sviluppo di un'interfaccia web moderna per AgenticRAG utilizzando **React 18 + Vite + TypeScript + Tailwind CSS + shadcn/ui**. +Sviluppo di un'interfaccia web moderna per DocuMente utilizzando **React 18 + Vite + TypeScript + Tailwind CSS + shadcn/ui**. --- @@ -319,7 +319,7 @@ npm run preview ### Dashboard ``` β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” -β”‚ 🧠 AgenticRAG Dashboard Documents Chat Settingsβ”‚ +β”‚ 🧠 DocuMente Dashboard Documents Chat Settingsβ”‚ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ β”‚ β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ @@ -343,7 +343,7 @@ npm run preview ### Chat Interface ``` β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” -β”‚ 🧠 AgenticRAG [User β–Ό] β”‚ +β”‚ 🧠 DocuMente [User β–Ό] β”‚ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ β”‚ πŸ’¬ Chat 1 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚ πŸ’¬ Chat 2 β”‚ β”‚ β”‚ diff --git a/frontend/README.md b/frontend/README.md index 048bd9a..852304e 100644 --- a/frontend/README.md +++ b/frontend/README.md @@ -1,6 +1,6 @@ -# AgenticRAG Frontend +# DocuMente Frontend -Modern React-based web interface for AgenticRAG - Agentic Retrieval System powered by datapizza-ai. +Modern React-based web interface for DocuMente - Sistema di Retrieval Agentico con AI. ## πŸš€ Features diff --git a/frontend/src/components/layout/Layout.tsx b/frontend/src/components/layout/Layout.tsx index 5fee257..f1d37b7 100644 --- a/frontend/src/components/layout/Layout.tsx +++ b/frontend/src/components/layout/Layout.tsx @@ -57,7 +57,7 @@ export function Layout({ children }: LayoutProps) {
- AgenticRAG + DocuMente