AI Chat is an open‑source, real‑time AI‑powered chat application built with a modern backend (FastAPI, SQLAlchemy, Alembic) and a lightweight frontend. It demonstrates how to integrate large language models into a web‑socket based chat UI while keeping the codebase clean, testable and container‑ready.
- Pluggable AI back‑ends – swap out the LLM provider with minimal code changes.
- Docker‑compose – one‑command local development and production setup.
- Database migrations – powered by Alembic.
- Typed Python –
pyproject.tomlenforces static typing and linting with Ruff. - Extensive test suite – unit and integration tests under
backend/tests/.
- Docker & Docker‑Compose – for containerised development.
- Python 3.13+ – required if you prefer running the backend locally.
- Node.js (optional) – only needed when you want to customise the frontend.
Clone the repository and initialise sub‑components:
git clone git@github.com:nkostiuchenko/ai-chat.git
cd ai-chatdocker compose up --buildThe API will be available at http://localhost:8000 and the frontend at http://localhost:3000.
ai-chat/
├─ backend/ # FastAPI backend
│ ├─ src/ # Application source code
│ ├─ tests/ # Test suite
│ ├─ alembic/ # Database migrations
│ └─ Dockerfile
├─ frontend/ # React/Vite UI
├─ docker-compose.yaml # Multi‑service orchestration
├─ README.md # ← This file
└─ .env.template # Environment variables (example provided)
This project is licensed under the MIT License – see the LICENSE file for details.
