TermiBot is a lightweight, prod-ready chat backend API built using FastAPI and Docker, designed to accept raw text input and return plain-text responses. It is deployed on Render with environment-based configuration and custom domain support.
The project was my forte into backend development, API design, containerization, and cloud deployment.
-
FastAPI – async Python backend, REST API design
-
Docker – containerized development and deployment
-
Google Gemini API – LLM integration via environment variables
-
Render – cloud deployment, CI/CD, HTTPS hosting
-
Environment Variables (.env) – secure secret management
-
curl / API testing – backend testing and debugging
-
Cloudflare DNS – custom domain routing
-
Linux / CLI workflows
- No JSON required (I/O using plaintext)
- Preserves formatting for multi-line text and code
- Async request handling
- Fully Dockerized for portability
- Live deployment with HTTPS
- Interactive terminal chat client – chat directly from your terminal
A lightweight Python CLI client that connects to the TermiBot API for an interactive chat experience right in your terminal.
Quick start:
curl -o termichat.py https://chat.dannoby.xyz/client
python3 termichat.pyFeatures:
- Interactive REPL-style chat interface
- Commands:
quit,exit,clear,help - Error handling for connection issues and timeouts
- Cross-platform (macOS, Linux, Windows)
Endpoint: POST /
Request (raw text):
curl -X POST https://chat.dannoby.xyz/ -d "Explain Docker in simple terms"Response (plain text):
Imagine you want to bake a cake for a friend. You have your recipe and all the ingredients. But what if your friend has a different oven, or different sized bowls, or runs out of flour? Your cake might not turn out the same way at their house.
Docker solves this problem for software, like a standardized, self-contained baking kit.
Here's the breakdown: ....
If the model returns code, formatting is preserved.
1. Create a .env file:
GEMINI_API_KEY = your_api_key_here
2. Install dependencies:
pip install -r requirements.txt3. Run the server:
uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload4. Test:
curl -X POST http://localhost:8000/ -d "Hello"Build the image:
docker build -t termichat-backend .Run the container:
docker run -p 8000:8000 --env-file .env termichat-backendTest:
curl -X POST http://localhost:8000/ -d "Hello"- Deployed on Render as a Dockerized Web Service
- Environment variables configured via Render dashboard
- Custom domain routed using Cloudflare DNS
- HTTPS enabled automatically by Render
- The Gemini API free tier has daily request limits.
- If quota is exceeded, the API returns a 429 error from Gemini.
- Frontend UI integration
- Streaming responses
- Rate limiting & request validation
- Authentication layer
- Multi-model support
