Run AI chat sessions against a locally hosted LLM without sending user data to a third-party API.
Upload documents and query their contents using RAG-powered vector search backed by ChromaDB and pgvector.
Build a self-hosted productivity backend combining chat, document management, and to-do features with FastAPI.
Requires PostgreSQL, Redis, RabbitMQ, AWS S3, and Ollama with a pulled model before the server will start.
Hub Backend is the server-side component for an application called Hub. It is built with FastAPI and Python, and handles authentication, AI-powered chat, document management, a to-do list, and admin operations. The AI chat feature uses a locally running language model via Ollama, a tool that lets you run open-source LLMs on your own machine without sending data to a cloud provider. In development the setup uses a smaller model (llama3.2:3b), while the production configuration is tuned for a larger one (llama3.1:70b). For document handling, the backend uses ChromaDB as a vector store, meaning it can index uploaded files and let users search or ask questions about their content using retrieval-augmented generation (RAG). File storage goes to AWS S3. Authentication uses standard JWT tokens with bcrypt for password hashing. Sessions are cached in Redis, which also handles rate limiting. The database is PostgreSQL 16 with the pgvector extension for similarity search. SQLAlchemy handles all database interactions, and Alembic manages schema migrations. Asynchronous tasks, such as document processing, are queued through RabbitMQ using the aio-pika library. The project structure separates models, schemas, routes, services, and background tasks into distinct directories. Routes cover auth, chat, documents, todos, notifications, and admin. Each area follows a consistent pattern so adding new feature areas is straightforward. Getting the stack running locally requires PostgreSQL, Redis, a RabbitMQ broker, an AWS S3 bucket (or compatible storage), and Ollama installed with at least the smaller model pulled. The README documents every environment variable needed via a config module loaded from the environment at startup.
← ramkumarmn on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.