IndusMind is a high-performance, containerized Retrieval-Augmented Generation (RAG) platform designed specifically for the Architecture, Engineering, and Construction (AEC) industry. It enables engineers, architects, project managers, and field operators to query complex project specifications, building codes, RFIs, submittals, and construction standards.
Built as a Next.js monorepo, IndusMind supports project-isolated document indexing, secure user authentication, source-cited Q&A, and a built-in Model Context Protocol (MCP) server for external AI client integrations.
🔗 Live URL: https://indusmind-aec.vercel.app/
- 📂 Project-Scoped Document Ingestion: Organize documents by project. Each project gets a dedicated isolated collection (
project_{projectId}) in Qdrant Cloud. - 🔗 Next.js 15 (React 19) + tRPC + Prisma: Full-stack type-safety linking React Client Components with your PostgreSQL database via tRPC procedures.
- 🔐 Secure Authentication: User sign-up and sign-in powered by NextAuth.js (Auth.js v5) with secure credential hashing (bcrypt).
- 🧠 Retrieval-Augmented Q&A: Uses semantic search via Qdrant Cloud's
query_pointsAPI to retrieve contextual chunks, passing them to Groq's Llama 3.1 LLM for accurate, domain-specific AEC answers. - 📝 Detailed Citations: Responses include precise source citations mapping back to specific document names, chunk indexes, and text segments.
- 🔌 MCP Server Integration: Standalone Model Context Protocol server exposing
search_aec_documentsandsummarize_documenttools to any MCP-compliant client (such as Claude Desktop). - 🐳 Docker Compose Orchestration: Single-command containerized spin-up of Next.js and PostgreSQL with persistent storage.
graph TD
User[Web Client / MCP Client] -->|tRPC / HTTP| NextJS[Next.js App Router]
NextJS -->|Prisma Client| Postgres[(PostgreSQL)]
NextJS -->|NextAuth| Session[User Auth Session]
NextJS -->|Route Handlers| RAG[Internal RAG Service]
RAG -->|pdf-parse| PDF[PDF Ingestion & Chunking]
PDF -->|all-MiniLM-L6-v2| HF[Hugging Face Inference API]
HF -->|384d Vectors| Qdrant[(Qdrant Cloud)]
NextJS -->|Query Request| RAG
RAG -->|Query Embeddings| HF
HF -->|Search Query| Qdrant
Qdrant -->|Context Chunks| RAG
RAG -->|Context + Prompt| Groq[Groq Llama 3.1 LLM]
Groq -->|Answer + Citations| NextJS
| Component | Technology | Description |
|---|---|---|
| Frontend & API | Next.js 15 (React 19) | React framework with Server Actions, tRPC API routing |
| Database | Prisma ORM & PostgreSQL | Schema management, type-safe queries, migration flows |
| Auth | NextAuth.js (Auth.js v5) | Credentials provider for secure email/password auth |
| RAG Backend | Next.js Route Handlers (TypeScript) | Server-side PDF extraction, vector indexing, retrieval, and answer generation |
| Vector DB | Qdrant Cloud | Cloud-native vector search engine with payload filtering |
| Embeddings | Hugging Face Inference API | sentence-transformers/all-MiniLM-L6-v2 (384d) |
| LLM Inference | Groq Cloud | llama-3.1-8b-instant for low-latency reasoning |
| MCP Server | Model Context Protocol SDK | Standalone Node.js stdio-based MCP server |
| Deployment | Docker Compose / Vercel | Local containerization and production hosting configurations |
- Node.js (v20+)
- Docker & Docker Compose
- Accounts: Groq Console, Qdrant Cloud, Hugging Face
Create a .env file in the root directory (see .env.example):
DATABASE_URL=postgresql://username:password@localhost:5432/indusmind?schema=public
NEXTAUTH_SECRET=generate-a-32-byte-secret-key-here
NEXTAUTH_URL=http://localhost:3000
GROQ_API_KEY=gsk_...
QDRANT_URL=https://...cloud.qdrant.io
QDRANT_API_KEY=your_qdrant_api_key
HUGGINGFACE_API_KEY=hf_...Open a new terminal window:
# Install node packages
npm install --ignore-scripts --legacy-peer-deps
# Generate Prisma client
# (If your project folder name contains spaces or special characters, use the node wrapper path below)
node node_modules/prisma/build/index.js generate
# Push Prisma schema to database (creates tables)
node node_modules/prisma/build/index.js db push
# Start Next.js development server
npm run devThe web app runs at http://localhost:3000.
To spin up the entire stack (Next.js web app and a PostgreSQL database) with a single command:
- Configure the
.envfile in the root directory. EnsureDATABASE_URLis set to point to the postgres container:DATABASE_URL=postgresql://indusmind:indusmind_dev@postgres:5432/indusmind?schema=public
- Build and run containers:
docker compose up --build
- Run Prisma migrations inside the running container (or run
node node_modules/prisma/build/index.js db pushlocally mapping tolocalhost:5432).
IndusMind comes with an MCP server to connect your RAG database directly to AI assistants like Claude Desktop.
- Navigate to the
mcp-serverdirectory and build the typescript code:cd mcp-server npm install --ignore-scripts --legacy-peer-deps node ../node_modules/typescript/bin/tsc - Configure the server in your Claude Desktop configuration file (
%APPDATA%\Claude\claude_desktop_config.jsonon Windows or~/Library/Application Support/Claude/claude_desktop_config.jsonon macOS):{ "mcpServers": { "indusmind-aec": { "command": "node", "args": ["E:/Projects/RAG Industrial Document Q&A/mcp-server/dist/index.js"], "env": { "INDUSMIND_URL": "http://localhost:3000" } } } } - Restart Claude Desktop. The following tools will become available:
search_aec_documents: Search AEC documents within a project.summarize_document: Summarize a specific document.
├── prisma/
│ └── schema.prisma # Prisma database schema definition
├── src/
│ ├── app/
│ │ ├── (auth)/ # Authentication flow pages (login, register)
│ │ ├── api/ # NextAuth, tRPC, and RAG route handlers
│ │ ├── dashboard/ # Project view, Chat sessions, & Document Management
│ │ └── globals.css # Core style definitions and custom dark design variables
│ ├── components/ # Reusable UI elements (Sidebar, DocumentManager, Chat, etc.)
│ ├── lib/ # Prisma, NextAuth, and tRPC client initializations
│ ├── server/ # tRPC routers merging (auth, project, document, chat)
│ └── providers/ # Session, tRPC, & Toast providers wrapper
├── mcp-server/ # Model Context Protocol service source
├── Dockerfile # Production Next.js builder
├── docker-compose.yml # Production services configuration
Distributed under the MIT License. See LICENSE for more information.