DomainSmith is a technical platform designed to transform static documents—such as manuals, datasets, and internal documentation—into interactive, domain-aware AI assistants. It solves the problem of "context-blind" AI by implementing a local Retrieval-Augmented Generation (RAG) pipeline, allowing users to query their own data privately using local large language models (LLMs). 1
- Universal Uploads: Support for PDF, Word, and plain text files that are parsed, chunked, and stored for retrieval
- Embeddings & Search: Local Ollama embeddings with per-domain collections for fast, relevant retrieval
- Chat & RAG: Ask natural questions with responses that reference relevant source documents for explainability
- Private & Local: Runs with your own Ollama and MongoDB—you keep control over data and models.
| Component | Technology | Role |
|---|---|---|
| Frontend | React + Vite | Single Page Application (SPA) for domain management and chat interface |
| Backend | Express.js | REST API handling authentication, file uploads, and RAG orchestration |
| Database | MongoDB | Stores user metadata, domain configurations, and vector embeddings |
| AI Engine | Ollama | Local service for generating embeddings and LLM chat completions |
- Node.js v18.0.0+
- MongoDB v6.0+
- Ollama (Latest)
- npm v9.0.0+
After installing Ollama, pull the required models:
ollama pull mistral
ollama pull nomic-embed-textgit clone https://github.com/AkiTheMemeGod/DomainSmith.git
cd DomainSmithcd backend
npm installcd ../frontend
npm installCreate a .env file in the backend/ directory:
PORT=5000
MONGO_URI=mongodb://localhost:27017/domainsmith
JWT_SECRET=your_super_secret_key
JWT_EXPIRES_IN=7d
OLLAMA_URL=http://127.0.0.1:11434
OLLAMA_MODEL=mistral
EMBEDDING_MODEL=nomic-embed-text
UPLOAD_DIR=./uploadsCreate a .env file in the frontend/ directory:
VITE_API_URL=http://localhost:5000/apicd backend
npm run devcd frontend
npm run devThe frontend will be available at http://localhost:5173 and the backend API at http://localhost:5000.
DomainSmith operates on the concept of a "Domain," which acts as a siloed knowledge base. The system follows a classic client-server architecture with a specialized AI integration layer.
The core value of DomainSmith is its ability to bridge "Natural Language Space" and "Code Entity Space" through vectorization:
- Document Ingestion: Users upload PDF, Word, or text files
- Parsing: Documents are parsed using
pdfParserormammothfor Word documents - Chunking: Text is split into chunks using a sliding window chunker
- Embedding: Chunks are converted to vectors using
nomic-embed-textvia Ollama - Storage: Vectors are stored in MongoDB for retrieval
- Retrieval: When a user asks a question, the system retrieves relevant document chunks
- Generation: Context is provided to a
Mistralmodel to generate an informed response
- Create an Account: Register a new account on the landing page
- Create a Domain: Navigate to the dashboard and create a new domain
- Upload Documents: Upload PDF, Word, or text files to your domain
- Build Domain: Trigger the build process to parse, chunk, and embed your documents
- Chat: Once the domain status is "ready", start chatting with your domain-aware AI assistant
DomainSmith/
├── backend/
│ ├── src/
│ │ ├── config/
│ │ ├── models/
│ │ ├── routes/
│ │ ├── services/
│ │ └── utils/
│ └── package.json
└── frontend/
├── src/
│ ├── api/
│ ├── pages/
│ └── App.jsx
└── package.json
This README is based on the DomainSmith Overview and Getting Started wiki pages. For more detailed technical documentation, refer to the wiki pages in the repository. The project uses local Ollama models (mistral for chat and nomic-embed-text for embeddings) which must be pulled separately before running the application. 6