--- title: NegoptimAi emoji: ⚡ colorFrom: indigo colorTo: gray sdk: docker app_port: 7860 pinned: false --- # Negoptim AI Bilingual (EN/FR) RAG chatbot for **Users Love IT (ULiT)** — answers questions about the NegOptim platform, commercial negotiations, procurement, promotions and assortment, renders rich dashboard cards for common questions, and can compose & send emails (demo requests, contact, follow-ups) with explicit user confirmation. | Layer | Stack | |---|---| | Frontend | Next.js 15 · TypeScript · Tailwind (deployed on Vercel) | | Backend | FastAPI · ChromaDB · sentence-transformers e5-small (Docker on HF Spaces) | | LLM | Groq free tier, with optional Cerebras/Gemini fallback — no paid LLMs | 📖 **Documentation** - [ARCHITECTURE.md](ARCHITECTURE.md) — system design, services, data flows - [DEPLOYMENT.md](DEPLOYMENT.md) — local development + production deployment & redeploy workflow --- ## Quick start (local) ```bash # 1. Backend deps cd backend pip install -r requirements.txt # 2. Configure — backend/.env needs at least: # GROQ_API_KEY=gsk_... (free key: https://console.groq.com/keys) # 3. Build the vector index (first run, and after editing knowledge/) python ../scripts/ingest.py # 4. Run backend uvicorn app.main:app --reload --port 8000 ``` ```bash # 5. Frontend (second terminal) cd frontend npm install npm run dev ``` Open **http://localhost:3000**. API docs at http://localhost:8000/docs. ### Useful commands | Command (from `backend/`) | Purpose | |---|---| | `python ../scripts/ingest.py [folder]` | (Re)build the vector index | | `python ../scripts/test_email.py` | Verify SMTP config (simulation or real) | Email runs in **simulation mode** (logged, not delivered) until `SMTP_USER`/`SMTP_PASSWORD` are set — see DEPLOYMENT.md §4 for all variables.