MDL Ops Engine - Workspace Developer Guide

1. Architecture Overview

This workspace uses a Meta-Repository architecture. * Parent Repo (mdl-ops-engine): Acts as the orchestrator. It tracks the infrastructure (docker-compose.yml), documentation, and pointers to the child repositories. * Child Repos (Submodules): Independent Git repositories that contain the source code: * bsc -> blind-shipping-calculator (Frontend Web App) * n8n -> n8n-intelligence-service (Workflows & Dockerfile) * qbo_intelligence_system -> (Local Python Service)

2. Daily Development Workflow

Quick Start (VS Code Tasks)

We have configured VS Code Tasks for common operations. Press F1 -> Type "Run Task": * 🚀 Start Ops Engine: Boots up the entire Docker stack. * 💻 Start BSC App: Runs the Next.js app locally on port 3100. * 🤖 Start n8n Only: Boots just the automation service.

The "Two-Step Commit" Rule

When modifying a submodule (e.g., n8n or bsc): 1. Commit Child First: Go into the folder (cd n8n), commit, and push to its own repo. 2. Update Parent: Go to root, commit the version bump ("Update n8n to latest"). * Tip: We have a pre-commit hook available in scripts/git-hooks/ to enforce this.

3. Deployment SOPs

Vercel (Blind Shipping Calculator)

n8n (Automation Engine)

5. Container Cheat Sheet

In this environment, Docker may prepend instance IDs to container names. Use * or check docker ps first.

Logical Name Current System Name (Example) Log Command
AI Processor d68796ee38c9_intelligent-processor docker logs *intelligent-processor
QBO Sync 1b12f17ad8fd_qbo-sync-worker docker logs *qbo-sync-worker
n8n v2 n8n-v2 docker logs n8n-v2

Tip: Always run docker ps --format "{{.Names}}" if a command fails with "No such container".