A self-hosted AI chat platform powered by a local LLM.
LumioAI is a full-stack chat application that streams responses from a local language model (via Ollama) straight to your browser. It bundles authentication, persistent conversation history, PDF document analysis, and a polished chat UI in a single deployable monorepo — no SaaS dependencies, no telemetry, no third-party LLM API calls.
- Real-time streaming — Server-Sent Events from Ollama to the browser, character by character
- Persistent conversations — auto-generated titles, full history, rename, delete, paginated
- PDF analysis — drop a PDF in chat, get a structured summary from the LLM
- Auth that works — email/password with verification (enforced at login), Google OAuth, rotating refresh tokens in HTTP-only cookies, password reset
- Modern UI — Tailwind, dark/light themes, syntax-highlighted code blocks, GitHub-flavored markdown
- Production-leaning — Argon2 hashing, rate-limiting, Helmet, CORS allow-list,
/healthand/readyendpoints - Well-tested — 118 backend tests (unit + e2e against in-memory MongoDB), runs on every PR
| Layer | Stack |
|---|---|
| Frontend | Next.js 16, React 19, Tailwind CSS 4, Jotai, Formik |
| Backend | NestJS 11, Express, TypeScript, Mongoose |
| Database | MongoDB |
| AI | Ollama (default model: llama3.1) |
| Auth | Passport.js (JWT, Local, Google OAuth 2.0), Argon2 |
| Nodemailer (SMTP) | |
| Tests | Jest, supertest, mongodb-memory-server |
| CI | GitHub Actions |
Prerequisites: Node.js 20+, npm 10+, Docker.
git clone https://github.com/teixayo/LumioAI.git
cd LumioAI
npm install
# Spin up MongoDB + Ollama
docker compose -f infra/docker/docker-compose.yml up -d
# Configure secrets
cp apps/backend/.env.example apps/backend/.env
cp apps/frontend/.env.example apps/frontend/.env.local
# Edit both files with real valuesThen run the two dev servers (in separate terminals):
npm run dev -w backend # http://localhost:4000
npm run dev -w frontend # http://localhost:3000Visit http://localhost:3000, register an account, click the verification link in your email, log in, and start chatting.
The backend reads its config from apps/backend/.env. See apps/backend/.env.example for the full list of variables and their defaults.
You'll need:
- A running MongoDB instance — the bundled
docker-compose.ymlworks out of the box - An Ollama server with at least one model pulled:
docker exec -it ollama ollama pull llama3.1 - SMTP credentials (any provider — Gmail app passwords, Mailgun, SendGrid, etc.) for verification and password-reset emails
- Google OAuth credentials — only required if you want Google sign-in
The frontend only needs NEXT_PUBLIC_API_URL in apps/frontend/.env.local (defaults to http://localhost:4000).
npm run dev # both apps in parallel
npm run build # build everything
npm run lint # lint both workspaces
npm test # backend unit tests
npm run test:e2e # backend e2e tests (uses an in-memory MongoDB)Workspace-targeted commands work too:
npm run dev -w backend
npm run build -w frontendThe backend exposes a REST surface covering auth, users, conversations, streaming, PDF upload, and health. See apps/backend/README.md for the full endpoint reference with auth requirements and payload shapes.
.github/workflows/ci.yml runs on every push and pull request. Backend and frontend jobs run in parallel:
- Backend — install → lint → build → unit tests → e2e tests
- Frontend — install → lint → build
The badge at the top of this README reflects the current status of master.
See the latest runs →



