This guide will help you set up a local development environment for ISC-CodeConnect.
- Python 3.12+ with pip
- Node.js 18+ with npm/yarn
- Git for version control
- Docker (optional, for containerized development)
- 4GB RAM minimum (8GB recommended for optimal performance)
- IBM Cloud Account with WatsonX.ai access
- GitHub Enterprise access for repository
- Milvus Cloud account (or local Milvus instance)
- MongoDB Atlas account (or local MongoDB instance)
git clone https://github.ibm.com/BPManagementTools/isc-code-connect-agent.git
cd isc-code-connect-agentpython -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activatepip install -r requirements.txtpip install -r requirements-dev.txtcp .env.example .envEdit .env with your specific configurations:
Environment variables are shared in 1Password vault.
# Start Milvus (if using Docker)
docker run -d --name milvus-standalone \
-p 19530:19530 \
-v $(pwd)/volumes/milvus:/var/lib/milvus \
milvusdb/milvus:v2.3.0 \
milvus run standalone
# Start MongoDB (if using Docker)
docker run -d --name mongodb \
-p 27017:27017 \
-v $(pwd)/volumes/mongodb:/data/db \
mongo:6.0python -m src.utils.init_databasepython -m src.utils.load_sample_datacd frontendnpm install
# or
yarn installcp .env.local.example .env.localEdit .env.local:
NEXT_PUBLIC_API_URL=http://localhost:8000/api/v1
NEXT_PUBLIC_WS_URL=ws://localhost:8000/ws
NEXT_PUBLIC_APP_NAME=ISC-CodeConnect
NEXT_PUBLIC_ENVIRONMENT=development# From project root
source venv/bin/activate
python -m uvicorn api.main:app --reload --host 0.0.0.0 --port 8000chmod +x dev.sh
./dev.sh# From frontend directory
npm run dev
# or
yarn dev- Frontend: http://localhost:3000
- Backend API: http://localhost:8000
- API Documentation: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc
# Python (Backend)
black src/ tests/
flake8 src/ tests/
mypy src/
# TypeScript/JavaScript (Frontend)
cd frontend
npm run lint
npm run formatpip install pre-commit
pre-commit install# Unit tests
python -m pytest tests/unit/ -v
# Integration tests
python -m pytest tests/integration/ -v
# Agent tests
python -m pytest tests/agents/ -v
# Coverage report
python -m pytest --cov=src tests/cd frontend
npm test
npm run test:coverage# Enable debug mode
export DEBUG=true
# Run with debugger
python -m pdb -m uvicorn api.main:app --reload# Enable agent logging
export ENABLE_AGENT_LOGGING=true
# View agent logs
tail -f logs/agents.log# Test Milvus connection
python -m src.utils.test_milvus
# Test MongoDB connection
python -m src.utils.test_mongodb
# View collection stats
python -m src.utils.collection_statsCreate .vscode/settings.json:
{
"python.defaultInterpreterPath": "./venv/bin/python",
"python.linting.enabled": true,
"python.linting.pylintEnabled": false,
"python.linting.flake8Enabled": true,
"python.formatting.provider": "black",
"typescript.preferences.importModuleSpecifier": "relative",
"eslint.workingDirectories": ["frontend"]
}Recommended extensions:
- Python
- Pylance
- Black Formatter
- ESLint
- Prettier
- Thunder Client (for API testing)
# Build and start all services
docker-compose -f docker-compose.dev.yml up --build
# Start specific service
docker-compose -f docker-compose.dev.yml up backend
# View logs
docker-compose -f docker-compose.dev.yml logs -f backend# Build development image
docker build -f Dockerfile.dev -t isc-codeconnect:dev .
# Run development container
docker run -it --rm \
-v $(pwd):/app \
-p 8000:8000 \
isc-codeconnect:dev# Clear pip cache
pip cache purge
# Reinstall requirements
pip install -r requirements.txt --force-reinstall# Clear npm cache
npm cache clean --force
# Remove and reinstall
rm -rf node_modules package-lock.json
npm install# Check service status
docker ps
# Restart services
docker-compose restart milvus mongodb
# Check logs
docker logs milvus-standalone
docker logs mongodb# Verify environment variables
python -c "import os; print(os.getenv('WATSONX_API_KEY'))"
# Check .env file
cat .env | grep -E '^[A-Z_]+='# Monitor memory usage
python -m memory_profiler src/main.py
# Agent memory profiling
python -m src.utils.profile_agents# Milvus performance check
python -m src.utils.benchmark_milvus
# MongoDB performance check
python -m src.utils.benchmark_mongodb- Read Architecture Documentation: Understand the system design
- Explore Agent Code: Review existing agent implementations
- Run Tests: Ensure everything works correctly
- Create Feature Branch: Start developing your feature
- Follow Code Standards: Maintain code quality
- Documentation: Check other sections for specific topics
- Issues: Create GitHub issues for bugs or questions
- Discussions: Join team discussions for architecture questions
- Code Review: Request reviews for development guidance