Skip to content

teixayo/LumioAI

Repository files navigation

LumioAI

LumioAI

A self-hosted AI chat platform powered by a local LLM.

Tests


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.

Features

  • 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, /health and /ready endpoints
  • Well-tested — 118 backend tests (unit + e2e against in-memory MongoDB), runs on every PR

Interface Preview

Desktop Experience

Mobile Experience

Tech stack

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
Email Nodemailer (SMTP)
Tests Jest, supertest, mongodb-memory-server
CI GitHub Actions

Quick start

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 values

Then run the two dev servers (in separate terminals):

npm run dev -w backend     # http://localhost:4000
npm run dev -w frontend    # http://localhost:3000

Visit http://localhost:3000, register an account, click the verification link in your email, log in, and start chatting.

Configuration

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.yml works 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).

Scripts

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 frontend

API

The 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.

Continuous integration

.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 →

License

MIT

About

Self-hosted AI chat platform powered by a local LLM via Ollama. Streaming responses, persistent conversations, PDF analysis, auth, and a polished Next.js UI

Resources

License

Stars

4 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors