Full-stack AI chat application for Python developers and database administrators. It provides a ChatGPT-style UI, secure authentication, and routing between n8n, Groq, and Ollama.
- Modern, responsive UI built with React 19 and Tailwind CSS.
- Provider routing between n8n workflows, Groq Cloud, and local Ollama.
- JWT authentication with bcrypt password hashing and rate limiting.
- Syntax-highlighted code blocks with one-click copy.
- Pre-configured for Python (
cx_Oracle) and Oracle SQL optimization. - Usage limits (10 chats per user, 20 messages per chat) to control local resources.
- Frontend: React 19, Vite, Tailwind CSS, React Markdown.
- Backend: Node.js (ESM), Express, MongoDB.
- Security: Helmet, CORS, Express Rate Limit, JWT.
- AI integration: n8n Webhook, Groq API, Ollama API.
Chat ai/
|-- backend/ # Express API and AI routing
|-- frontend/ # React application (Vite)
|-- n8n-chat-ai-template.json # Ready-to-import n8n workflow
`-- README.md # Documentation
- Navigate to the backend directory:
cd backend - Configure environment variables:
Ensure
cp .env.example .env
JWT_SECRETis at least 32 characters long. - Install dependencies:
npm install
- Start the server:
API runs at
npm run dev
http://localhost:4000.
- Navigate to the frontend directory:
cd frontend - Configure API URL:
Set
cp .env.example .env
VITE_API_URL=http://localhost:4000/api. - Install dependencies:
npm install
- Run in development mode:
Open
npm run dev
http://localhost:5173in your browser.
The backend sends a POST request to N8N_WEBHOOK_URL with chat history and message.
- Import: use
n8n-chat-ai-template.jsonin n8n. - Response format: n8n must return
{ "reply": "..." }.
High-speed inference using Llama 3 models on Groq Cloud.
- Set
GROQ_API_KEYinbackend/.env.
Local LLM execution.
- Ensure Ollama is running (
ollama serve). - Set
OLLAMA_URL(usuallyhttp://localhost:11434/api/chat).
- Security headers via Helmet and aggressive rate limiting on auth routes.
- Backend validates message lengths and JSON payloads.
- MongoDB connection includes retry logic and index setup.
- Structured logging for debugging and monitoring.
Distributed under the MIT License. See LICENSE for details (if available).