This repository contains both the customer-facing Next.js application and the FastAPI backend for the Tuel AI Chatbot Builder.
| Path | Description |
|---|---|
chatbot-frontend/ |
Next.js 15 + TypeScript application |
chatbot-backend/ |
FastAPI 0.115 service with SQLAlchemy and Alembic |
.github/workflows/ci.yml |
Continuous integration pipeline |
docker-compose.yml |
Local production-like stack |
- Node.js 20 (
nvm usewill read.nvmrc) - npm 10 (enabled by
.npmrc) - Python 3.11 (
pyenv localreads.python-version) - Docker 24+ (optional, for container builds)
- pre-commit 3.x
cd chatbot-frontend
npm ci
npm run devKey scripts:
| Script | Purpose |
|---|---|
npm run lint |
ESLint with Prettier integration |
npm run type-check |
TypeScript project type check |
npm run dead-code |
knip dead/unused code scan |
npm run test |
Playwright suite (skips when env not set) |
npm run build |
Production build |
cd chatbot-backend
python -m venv .venv && source .venv/bin/activate
pip install --upgrade pip
pip install .[dev]
uvicorn app.main:app --reloadQuality gates:
| Command | Purpose |
|---|---|
ruff check . |
Linting |
black --check . |
Formatting validation |
mypy |
Type check (targeted modules) |
pytest -q |
Unit tests |
python -m build |
Build distributable wheel/sdist |
docker compose up --build- Frontend available at http://localhost:3000
- Backend available at http://localhost:8000
Each service exposes a healthcheck so Compose waits for readiness.
The GitHub Actions workflow runs linting, type-checking, tests and build steps for both applications. Artifacts are uploaded for inspection (frontend-build and backend-dist).
Install once after cloning:
pre-commit installHooks execute ruff + black on backend files and lint-staged (ESLint + Prettier) on frontend sources before each commit.
See DEPLOYMENT.md for detailed deployment instructions.
MIT