Backend API for Lance Hebert's portfolio AI chatbot, providing intelligent responses about his professional background, skills, and experience.
- AI-Powered Chat: OpenAI GPT-3.5-turbo integration with fallback responses
- Cost Control: Sophisticated usage tracking and spending limits ($4 lifetime limit)
- Anti-Hallucination: Strict context adherence and parameter tuning
- Performance Monitoring: Health check endpoint with usage statistics
- Railway Deployment: Production-ready cloud deployment
GET /health
Returns server status and usage statistics.
POST /api/chat
Content-Type: application/json
{
"message": "What are Lance's skills?"
}
OPENAI_API_KEY: Your OpenAI API keyPORT: Server port (default: 3001)
- Daily Requests: 50
- Monthly Requests: 1000
- Lifetime Spend: $4.00 (OpenAI disabled after limit)
- Max Tokens per Request: 500
Deployed on Railway at: https://portfolio-ai-backend-production-1fa0.up.railway.app
npm install
npm run dev # Development with nodemon
npm start # ProductionMIT License