A minimal, production-ready chatbot powered by Google's Gemini API with real-time streaming support.
-
Backend Setup:
cd backend # Create .env file with your Gemini API key echo "GEMINI_API_KEY=your_key_here" > .env echo "GEMINI_MODEL=gemini-1.5-pro" >> .env # Option A: Local Python pip install -r requirements.txt uvicorn main:app --reload --port 8000 # Option B: Docker docker-compose up --build
-
Frontend Setup:
cd frontend npm install npm run dev
-
Open http://localhost:3000 and start chatting!
See CHATBOT_SETUP.md for detailed documentation including:
- Architecture overview
- API reference
- Configuration options
- How to swap LLM providers
- Production deployment guide
- Troubleshooting
✅ Real-time streaming responses (SSE)
✅ Clean, accessible UI with Tailwind CSS
✅ Generic LLM interface (easy to swap providers)
✅ Error handling and loading states
✅ Keyboard shortcuts (Enter to send, Shift+Enter for newline)
✅ Auto-scroll and focus management
✅ Request telemetry and logging
Minimal boilerplate for a Next.js frontend and FastAPI backend.
Located in frontend/
directory.
- Next.js with TypeScript
- Tailwind CSS
- App Router (no src directory)
- No ESLint
cd frontend
npm install
npm run dev
The frontend will run on http://localhost:3000
Located in backend/
directory.
- FastAPI with CORS enabled
- Domain-based structure in
app/domains/
- Example domain included
- Docker support with hot reload
cd backend
pip install -r requirements.txt
uvicorn main:app --reload
cd backend
docker build -t backend .
docker run -p 8000:8000 -v $(pwd):/app backend
The backend will run on http://localhost:8000
- API docs:
http://localhost:8000/docs
- Health check:
http://localhost:8000/health
A proof of concept that demonstrates image-to-3D model generation:
- Upload an image via the web interface
- Generate 3D models using the Trellis API
- View and interact with the generated GLB model in real-time using Three.js
- Download the generated 3D model
Access at: http://localhost:3000/trellis
HTV/
├── frontend/ # Next.js application
│ ├── app/ # Next.js App Router
│ │ ├── trellis/ # Trellis 3D generator POC
│ │ └── ...
│ ├── lib/ # Utilities
│ ├── components/ # React components
│ └── public/ # Static assets
└── backend/ # FastAPI application
├── app/
│ ├── endpoints/ # API endpoints
│ │ ├── redis/ # Redis operations
│ │ ├── trellis/ # Trellis 3D generation
│ │ └── ...
│ ├── integrations/ # Third-party API integrations
│ │ └── trellis.py
│ └── core/ # Core services (config, redis)
├── main.py # FastAPI entry point
├── Dockerfile # Docker configuration
└── requirements.txt