AndesOps-AI / backend /README.md
Álvaro Valenzuela Valdes
πŸš€ Fix: Ensure app_port 7860 and simple health check
d4c0b3e
metadata
title: AndesOps AI Backend
emoji: πŸ€–
colorFrom: purple
colorTo: blue
sdk: docker
app_port: 7860
startup_duration_timeout: 30m
python_version: 3.11

AndesOps AI - Backend API

Real-time Chilean public procurement market intelligence with AI-powered analysis.

πŸš€ Features

  • Real-time Market Data: Access Mercado PΓΊblico (Chile's public procurement) API
  • Purchase Orders (OC): Monitor purchase orders across Chilean government agencies
  • Tender Analysis: AI-powered tender matching and recommendation
  • LLM Integration: Powered by Google Gemini, Groq, and Featherless AI
  • REST API: Full-featured FastAPI backend

πŸ“‹ Environment Variables Required

Add these in Settings β†’ Secrets on Hugging Face:

MERCADO_PUBLICO_TICKET=99B4CA8C-C1DF-4E3F-B5CF-C1672D432A91
GEMINI_API_KEY=your_gemini_api_key
GROQ_API_KEY=your_groq_api_key
FEATHERLESS_API_KEY=your_featherless_key
DATABASE_URL=sqlite:///./andesops.db
GEMINI_MODEL=gemini-2.5-flash

πŸ”— API Endpoints

  • GET /api/health - Health check
  • GET /api/tenders?keyword=... - Search tenders
  • GET /api/tenders/scrape?keyword=... - Scrape Compra Ágil
  • GET /api/purchase-orders?date=ddmmaaaa - Get purchase orders
  • POST /api/analyze - Analyze tender with AI
  • POST /api/company-profile - Save company profile

πŸ”Œ CORS Configuration

Automatically enabled for frontend at: https://{user}-andesai-frontend.hf.space

πŸ“¦ Backend Stack

  • Framework: FastAPI 0.109.0
  • Database: SQLite (local) / MySQL (production)
  • AI Models: Google Gemini, Groq, Featherless
  • Web Scraping: httpx, BeautifulSoup4
  • Validation: Pydantic v2

🚦 Status

  • βœ… Mercado PΓΊblico API integration
  • βœ… Real-time purchase order monitoring
  • βœ… Tender scraping (Compra Ágil)
  • βœ… AI-powered analysis
  • βœ… CORS configured for frontend integration

πŸ“ž Support

Part of AndesOps AI - a complete platform for Chilean public procurement intelligence.

Connect with the frontend space for the full application experience.