Afsheenkhi/chatbot-phase3
0
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 infoGET /health- Health check endpointPOST /auth/register- User registrationPOST /auth/login- User authenticationPOST /chat- Chat endpoint for todo managementGET /history- Get chat historyGET /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 modelDATABASE_URL- PostgreSQL database connection stringBETTER_AUTH_SECRET- Authentication secret keyPHASE2_API_URL- Phase 2 backend API URLINTERNAL_SERVICE_TOKEN- Internal service authentication tokenENVIRONMENT- Set toproductionALLOWED_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
