Skip to content

Latest commit

Β 

History

History
350 lines (260 loc) Β· 7.84 KB

File metadata and controls

350 lines (260 loc) Β· 7.84 KB

πŸ—οΈ FlowTech-AI - Final Architecture

Last updated: 2025-10-19


🎯 What is FlowTech-AI?

FlowTech-AI is a production-ready, self-hosted AI stack that provides:

βœ… Cursor AI Enhancement (MCP-Qdrant)
βœ… Conversational AI (OpenWebUI with RAG)
βœ… Automation Platform (n8n)
βœ… Vector Database (Qdrant)
βœ… One-command deployment (./init.sh)

Status: βœ… Production-ready, open-source, fork-friendly


πŸ“¦ What's Included

Core Services (docker-compose.yml)

Service Port Description Status
OpenWebUI 8081 AI chat with RAG βœ… Production
MCP-Qdrant 8000 Cursor integration βœ… Production
n8n 5678 Workflow automation βœ… Production
Qdrant 6333 Vector database βœ… Production
PostgreSQL 5432 Metadata storage βœ… Production
Redis 6379 Cache & queues βœ… Production
SearxNG 8082 Web search βœ… Production
Langfuse 3300 LLM observability βœ… Production
ClickHouse 8123 Analytics βœ… Production
MinIO 9000 S3-compatible storage βœ… Production

Templates & Examples

  • Notes/_Templates/ - Generic Obsidian templates for note organization
  • SRC/ - Example n8n workflows
  • cursor-mcp-config.json - Cursor configuration template

Documentation

  • README.md - Main documentation
  • QUICKSTART.md - 5-minute setup guide
  • docs/ - Technical documentation
  • Notes/README-NOTES.md - Templates guide

πŸ”„ Data Flow

1. Cursor β†’ MCP-Qdrant β†’ Qdrant

Developer codes in Cursor
  ↓
@qdrant store "code snippet"
  ↓
MCP-Qdrant (port 8000)
  ↓
Qdrant collection: cursor-context
  ↓
@qdrant find "snippet"
  ↓
AI retrieves context

Use case: Store and retrieve code context during development

2. OpenWebUI β†’ Qdrant β†’ RAG

User uploads documents in OpenWebUI
  ↓
OpenWebUI processes & embeds (bge-m3:567m)
  ↓
Qdrant collection: open-webui_files
  ↓
User asks question
  ↓
RAG retrieves relevant chunks
  ↓
LLM generates answer with context

Use case: Q&A over technical documentation

3. n8n β†’ External APIs

Trigger (webhook, schedule, manual)
  ↓
n8n workflow execution
  ↓
API calls, data processing
  ↓
Results stored or notifications sent

Use case: Automated workflows, integrations


πŸ› οΈ Technology Stack

AI & LLM

  • Ollama (external): http://YOUR_OLLAMA_HOST:11434 (or localhost if running locally)
  • Embedding model: bge-m3:567m (1024 dimensions, multilingual)
  • Vector DB: Qdrant 1.11.5

Backend

  • PostgreSQL: Metadata, n8n workflows, Langfuse traces
  • Redis: Caching, session management
  • ClickHouse: Analytics, telemetry
  • MinIO: S3-compatible object storage

Frontend

  • OpenWebUI: React-based chat interface
  • n8n: Node.js workflow editor
  • Langfuse: Next.js observability UI

Integration

  • MCP-Qdrant: Python FastAPI server for Cursor
  • SearxNG: Metasearch engine for web queries

πŸ“ Directory Structure

FlowTech-AI/
β”œβ”€β”€ docker-compose.yml           # All services configuration
β”œβ”€β”€ init.sh                      # One-command deployment
β”œβ”€β”€ .env                         # Configuration (generated by init.sh)
β”‚
β”œβ”€β”€ AI_Data/                     # Runtime data (Docker volumes)
β”‚   β”œβ”€β”€ openwebui/               # OpenWebUI data
β”‚   β”œβ”€β”€ qdrant/                  # Vector database storage
β”‚   β”œβ”€β”€ n8n/                     # Workflows & credentials
β”‚   β”œβ”€β”€ mcp-qdrant/              # MCP service data
β”‚   └── ...
β”‚
β”œβ”€β”€ Notes/
β”‚   β”œβ”€β”€ _Templates/              # Generic Obsidian templates
β”‚   └── README-NOTES.md          # Templates guide
β”‚
β”œβ”€β”€ mcp-qdrant/                  # MCP service Dockerfile
β”‚   β”œβ”€β”€ Dockerfile
β”‚   └── README.md
β”‚
β”œβ”€β”€ SRC/                         # Example workflows
β”‚   └── FlowTech-AI-Complete-Workflow.json
β”‚
β”œβ”€β”€ docs/                        # Technical documentation
β”‚   β”œβ”€β”€ MCP-QDRANT.md
β”‚   β”œβ”€β”€ DEVELOPER_GUIDE.md
β”‚   └── ...
β”‚
β”œβ”€β”€ README.md                    # Main documentation
β”œβ”€β”€ QUICKSTART.md                # Setup guide
└── cursor-mcp-config.json       # Cursor config template

πŸ”’ What's NOT Included (Private)

❌ Personal notes (VMs, Servers, Domains)
❌ Automated notes sync scripts
❌ Samba network shares
❌ Personal credentials & secrets

For personal notes management: See Flow-Notes-AI (private companion repo)


πŸš€ Deployment

Minimum Requirements

  • OS: Ubuntu 20.04+ / Debian 11+ / RHEL 8+
  • CPU: 4 cores
  • RAM: 16 GB
  • Disk: 50 GB
  • Docker: 24.0.0+
  • Docker Compose: 2.20.0+

Quick Deploy

git clone https://github.com/FlowTech-Lab/FlowTech-AI.git
cd FlowTech-AI
sudo ./init.sh

That's it! All services start automatically with health checks.


πŸ”§ Configuration

Environment Variables (.env)

Auto-generated by init.sh, key variables:

# External Ollama
OLLAMA_BASE_URL=http://localhost:11434

# Ports
OPENWEBUI_PORT=8081
MCP_QDRANT_PORT=8000
N8N_PORT=5678

# Security (auto-generated)
POSTGRES_PASSWORD=<random>
REDIS_AUTH=<random>
N8N_BASIC_AUTH_PASSWORD=<random>

# RAG Configuration
RAG_EMBEDDING_MODEL=bge-m3:567m
RAG_EMBEDDING_ENGINE=ollama
VECTOR_DB=qdrant

Cursor Configuration (~/.cursor/mcp.json)

{
  "mcpServers": {
    "qdrant": {
      "transport": "sse",
      "url": "http://YOUR_SERVER_IP:8000/sse",
      "timeout": 30000
    }
  }
}

πŸ“Š Monitoring

Health Checks

# All services status
docker compose ps

# Service logs
docker compose logs -f openwebui
docker compose logs -f mcp-qdrant

# Qdrant collections
curl http://localhost:6333/collections

Langfuse Observability


πŸ”„ Updates

Pull Latest Changes

cd FlowTech-AI
git pull origin main
docker compose pull
docker compose up -d

Rebuild Services

docker compose build mcp-qdrant
docker compose up -d mcp-qdrant

🀝 Contributing

Want to improve FlowTech-AI?

  1. Fork the repo
  2. Create feature branch: git checkout -b feature/amazing-feature
  3. Test changes: ./init.sh
  4. Commit: git commit -m 'Add amazing feature'
  5. Push: git push origin feature/amazing-feature
  6. Open Pull Request

πŸ“š Use Cases

1. AI-Enhanced Development (Cursor)

  • Store code snippets with @qdrant store
  • Retrieve context with @qdrant find
  • Build personal code knowledge base

2. Technical Documentation Q&A (OpenWebUI)

  • Upload technical docs (PDF, MD, DOCX)
  • Ask questions in natural language
  • Get accurate answers with citations

3. Workflow Automation (n8n)

  • Automate repetitive tasks
  • Integrate APIs and services
  • Schedule jobs and webhooks

4. Team Knowledge Base

  • Share OpenWebUI instance
  • Common documentation repository
  • Collaborative RAG

πŸ†˜ Support


πŸ“„ License

MIT License - See LICENSE


πŸ”— Related Projects


Made with ❀️ by the FlowTech-Lab community