CoolFace
Apppublic

Afsheenkhi/chatbot-phase3

sourceHugging Faceupdated 7mo agoView on Hugging Face
0likes
App README

Todo Chatbot API - Phase 3

AI-powered conversational todo management system with JWT authentication and MCP integration.

Features

  • โ€”๐Ÿค– AI-powered natural language todo management
  • โ€”๐Ÿ” JWT-based authentication
  • โ€”๐Ÿ’พ PostgreSQL database with file-based fallback
  • โ€”๐Ÿ”ง MCP (Model Context Protocol) integration
  • โ€”๐Ÿš€ FastAPI backend
  • โ€”๐Ÿ“ Complete CRUD operations for todos
  • โ€”๐Ÿ”„ Real-time chat history management

API Endpoints

  • โ€”GET / - Root endpoint with API info
  • โ€”GET /health - Health check endpoint
  • โ€”POST /auth/register - User registration
  • โ€”POST /auth/login - User authentication
  • โ€”POST /chat - Chat endpoint for todo management
  • โ€”GET /history - Get chat history
  • โ€”GET /prompts - Get conversation prompts

Configuration

This Space requires the following environment variables (set in Space Settings โ†’ Variables):

Required Variables:

  • โ€”OPEN_ROUTER_API_KEY - OpenRouter API key for AI model
  • โ€”DATABASE_URL - PostgreSQL database connection string
  • โ€”BETTER_AUTH_SECRET - Authentication secret key
  • โ€”PHASE2_API_URL - Phase 2 backend API URL
  • โ€”INTERNAL_SERVICE_TOKEN - Internal service authentication token
  • โ€”ENVIRONMENT - Set to production
  • โ€”ALLOWED_ORIGINS - Comma-separated list of allowed CORS origins

Optional Variables:

  • โ€”MODEL_NAME - AI model name (default: google/gemini-2.0-flash-001)
  • โ€”AGENT_TEMPERATURE - AI temperature (default: 0.7)
  • โ€”AGENT_MAX_TOKENS - Max tokens (default: 500)
  • โ€”LOG_LEVEL - Logging level (default: INFO)
  • โ€”RATE_LIMIT_REQUESTS - Rate limit requests (default: 30)
  • โ€”RATE_LIMIT_WINDOW - Rate limit window in seconds (default: 60)

Documentation

  • โ€”Deployment Guide
  • โ€”Environment Variables Template
  • โ€”API Documentation: /docs (Swagger UI)

Tech Stack

  • โ€”Framework: FastAPI
  • โ€”Database: PostgreSQL (Neon)
  • โ€”AI Model: Google Gemini 2.0 Flash (via OpenRouter)
  • โ€”Authentication: JWT tokens
  • โ€”Containerization: Docker

Development

Local development instructions available in the repository.

License

MIT