Normalized for Mintlify from
knowledge-base/aiconnected-apps-and-modules/modules/aiConnected-voice/dev-env-setup-guide.mdx.Voice by aiConnected — Development Environment Setup Guide \
Document Information \
| Field | Value |
|---|---|
| Document ID | ARCH-005 |
| Version | 1.0 |
| Last Updated | 2026-01-16 |
| Status | Draft |
| Owner | Engineering |
| Dependencies | ARCH-001 |
Table of Contents \
Voice by aiConnected — Development Environment Setup Guide Document Information Table of Contents 1. Introduction 1.1 Purpose 1.2 Scope 1.3 Time Estimate 2. Prerequisites 2.1 Required Knowledge 2.2 Required Accounts 2.3 Required Software 3. System Requirements 3.1 Hardware Requirements Minimum Specifications Recommended Specifications 3.2 Network Requirements 3.3 Operating System Specific Notes macOS Ubuntu/Debian Windows (WSL2) 4. Development Tools Installation 4.1 Docker Installation macOS Ubuntu 4.2 Python Installation Install pyenv Install Python 4.3 Node.js Installation (Optional) 4.4 Additional Tools 4.5 Python Development Tools 5. Repository Setup 5.1 Clone the Repository 5.2 Repository Structure 5.3 Create Python Virtual Environment 5.4 Install Service Dependencies 6. Docker Compose Stack 6.1 Stack Overview 6.2 Docker Compose Configuration 6.3 LiveKit Configuration 6.4 PostgreSQL Initialization Scripts 6.5 Starting the Stack 7. Environment Variables 7.1 Environment File Setup 7.2 Complete Environment Variables Reference 7.3 Environment Variable Validation 8. API Credentials 8.1 Obtaining GoToConnect Credentials 8.2 Obtaining LiveKit Credentials Option A: Local Development (No credentials needed) Option B: LiveKit Cloud (For integration testing) 8.3 Obtaining Deepgram Credentials 8.4 Obtaining Anthropic Credentials 8.5 RunPod Setup (For Chatterbox TTS) 8.6 Using Mock Services 9. Database Setup 9.1 Verify Database Connection 9.2 Run Database Migrations 9.3 Seed Development Data 9.4 Verify Database Schema 9.5 Database Management UI 10. Service Configuration 10.1 API Gateway Configuration 10.2 WebRTC Bridge Configuration 10.3 Agent Service Configuration 10.4 Worker Service Configuration 11. Running the Development Stack 11.1 Start Infrastructure Services 11.2 Start Application Services 11.3 Using the Start Script 11.4 Verify Services Are Running 11.5 Stopping Services 12. Testing Your Setup 12.1 Run Unit Tests 12.2 Run Integration Tests 12.3 Test API Endpoints 12.4 Test WebRTC Connection 12.5 Test End-to-End Flow 12.6 Health Check Script 13. IDE Configuration 13.1 VS Code Setup Recommended Extensions Workspace Settings Launch Configuration 13.2 PyCharm Setup Project Interpreter Run Configurations 13.3 Git Configuration 14. Troubleshooting 14.1 Common Issues Docker Issues Database Issues Python Environment Issues Service Connection Issues WebRTC Issues 14.2 Debug Mode 14.3 Useful Debug Commands 14.4 Getting Help 15. Appendix 15.1 Quick Reference Card 15.2 Environment Variables Cheat Sheet 15.3 Port Reference 15.4 Useful Aliases Document Revision History
- Introduction \
1.1 Purpose \
This document provides step-by-step instructions for setting up a local development environment for Voice by aiConnected. A properly configured development environment enables developers to:- Run and test all platform services locally
- Debug issues without affecting production systems
- Develop new features with rapid iteration cycles
- Execute the full test suite before committing changes
1.2 Scope \
This guide covers:- Installing required software and dependencies
- Configuring the local Docker Compose stack
- Setting up environment variables and credentials
- Running and testing all services locally
- IDE configuration for optimal development experience
- Production deployment (see Document #25: Deployment Runbook)
- CI/CD pipeline setup (see Document #26: CI/CD Pipeline Specification)
- Infrastructure provisioning (see Document #24: Infrastructure Architecture)
1.3 Time Estimate \
A complete setup from scratch typically takes 30-60 minutes, depending on internet speed and familiarity with the tools.
- Prerequisites \
2.1 Required Knowledge \
Before proceeding, you should be familiar with:- Basic command line operations (bash/zsh)
- Git version control
- Docker and containerization concepts
- Python virtual environments
- Basic understanding of WebRTC and real-time audio (helpful but not required)
2.2 Required Accounts \
You will need accounts for the following services:| Service | Purpose | Sign-up URL |
|---|---|---|
| GitHub | Source code access | github.com |
| GoToConnect | Telephony sandbox | developer.goto.com |
| LiveKit Cloud | Real-time audio infrastructure | cloud.livekit.io |
| Deepgram | Speech-to-text | console.deepgram.com |
| Anthropic | Claude LLM | console.anthropic.com |
| RunPod | GPU hosting (optional for local TTS) | runpod.io |
2.3 Required Software \
| Software | Minimum Version | Recommended Version | Purpose |
|---|---|---|---|
| Operating System | macOS 12+, Ubuntu 20.04+, Windows 11 WSL2 | Ubuntu 22.04 or macOS 14 | Development host |
| Docker | 24.0 | 25.0+ | Containerization |
| Docker Compose | 2.20 | 2.24+ | Multi-container orchestration |
| Python | 3.11 | 3.12 | Primary language |
| Node.js | 18 LTS | 20 LTS | Build tools, optional dashboard |
| Git | 2.40 | 2.43+ | Version control |
| PostgreSQL Client | 15 | 16 | Database CLI tools |
| Redis CLI | 7.0 | 7.2 | Cache debugging |
- System Requirements \
3.1 Hardware Requirements \
Minimum Specifications \
| Resource | Minimum | Notes |
|---|---|---|
| CPU | 4 cores | Intel i5/AMD Ryzen 5 or equivalent |
| RAM | 16 GB | Docker containers require significant memory |
| Storage | 50 GB free | Docker images, logs, recordings |
| Network | Broadband | Required for API calls and WebRTC |
Recommended Specifications \
| Resource | Recommended | Notes |
|---|---|---|
| CPU | 8+ cores | Faster builds, smoother multi-service operation |
| RAM | 32 GB | Comfortable headroom for all services |
| Storage | 100 GB SSD | Fast I/O for development |
| Network | 100 Mbps+ | Reduced latency for external services |
3.2 Network Requirements \
The development environment requires access to:3.3 Operating System Specific Notes \
macOS \
Ubuntu/Debian \
Windows (WSL2) \
- Development Tools Installation \
4.1 Docker Installation \
macOS \
Ubuntu \
4.2 Python Installation \
We recommend usingpyenv for Python version management.
Install pyenv \
Install Python \
4.3 Node.js Installation (Optional) \
Required only if working on the admin dashboard.4.4 Additional Tools \
4.5 Python Development Tools \
- Repository Setup \
5.1 Clone the Repository \
5.2 Repository Structure \
After cloning, you should see the following structure:5.3 Create Python Virtual Environment \
5.4 Install Service Dependencies \
Each service has its own dependencies. Install them all:
- Docker Compose Stack \
6.1 Stack Overview \
The local development stack includes the following services:6.2 Docker Compose Configuration \
Create or verifyinfrastructure/docker-compose.yml:
6.3 LiveKit Configuration \
Createinfrastructure/livekit/livekit.yaml:
6.4 PostgreSQL Initialization Scripts \
Createinfrastructure/init-scripts/postgres/01-init.sql:
6.5 Starting the Stack \
- Environment Variables \
7.1 Environment File Setup \
Copy the example environment file and customize it:7.2 Complete Environment Variables Reference \
7.3 Environment Variable Validation \
Create a validation script to ensure all required variables are set:
- API Credentials \
8.1 Obtaining GoToConnect Credentials \
-
Create a Developer Account
- Visit https://developer.goto.com
- Sign up for a developer account
- Verify your email
-
Create an Application
- Navigate to “My Apps” in the developer portal
- Click “Create New App”
- Fill in application details:
- App Name: Voice AI Development
- App Type: Server Application
- Redirect URI:
http://localhost:8000/oauth/goto/callback
- Select required scopes:
-
calls.v2.calls.manage -
calls.v2.calls.read -
messaging.v1.notifications.manage -
webrtc.v1.devices.manage -
webrtc.v1.calls.manage
-
-
Copy Credentials
- Note your Client ID and Client Secret
- Add to
.env:
-
Enable Sandbox Mode
- In the developer portal, enable sandbox/test mode
- This allows testing without using real phone minutes
8.2 Obtaining LiveKit Credentials \
-
Create Account
- Visit https://cloud.livekit.io
- Sign up with GitHub or email
-
Create a Project
- Click “Create Project”
- Name it “voice-ai-dev”
- Select a region close to you
-
Get Credentials
- Navigate to Settings → API Keys
- Create a new API key
- Copy the API Key and Secret
- Update
.env:
8.3 Obtaining Deepgram Credentials \
-
Create Account
- Visit https://console.deepgram.com
- Sign up (includes $200 free credits)
-
Create API Key
- Navigate to API Keys
- Click “Create Key”
- Name: “Voice AI Development”
- Permissions: Full Access (for development)
- Copy the key
- Add to Environment
8.4 Obtaining Anthropic Credentials \
-
Create Account
- Visit https://console.anthropic.com
- Sign up and verify your account
-
Create API Key
- Navigate to API Keys
- Click “Create Key”
- Name: “Voice AI Development”
- Copy the key
- Add to Environment
8.5 RunPod Setup (For Chatterbox TTS) \
For full TTS functionality, you’ll need RunPod access. For initial development, you can use the mock TTS service.-
Create Account
- Visit https://runpod.io
- Sign up and add payment method
-
Deploy Chatterbox Pod
- See Document #15 (Chatterbox TTS Integration Guide) for full instructions
- For development, use the mock service instead:
8.6 Using Mock Services \
For rapid development without external dependencies, use mock services:- Initial development
- Running unit tests
- Offline development
- CI pipelines without credentials
- Database Setup \
9.1 Verify Database Connection \
9.2 Run Database Migrations \
9.3 Seed Development Data \
9.4 Verify Database Schema \
9.5 Database Management UI \
Access Adminer for visual database management:- Open http://localhost:8080
- Login with:
- System: PostgreSQL
- Server: postgres
- Username: voiceai
- Password: voiceai_dev_password
- Database: voiceai
- Service Configuration \
10.1 API Gateway Configuration \
Createservices/api-gateway/config.py:
10.2 WebRTC Bridge Configuration \
Createservices/webrtc-bridge/config.py:
10.3 Agent Service Configuration \
Createservices/agent-service/config.py:
10.4 Worker Service Configuration \
Createservices/worker-service/config.py:
- Running the Development Stack \
11.1 Start Infrastructure Services \
11.2 Start Application Services \
Open four terminal windows/tabs and run each service: Terminal 1 - API Gateway:11.3 Using the Start Script \
Alternatively, use the all-in-one start script:11.4 Verify Services Are Running \
11.5 Stopping Services \
- Testing Your Setup \
12.1 Run Unit Tests \
12.2 Run Integration Tests \
Integration tests require the Docker stack to be running:12.3 Test API Endpoints \
12.4 Test WebRTC Connection \
12.5 Test End-to-End Flow \
12.6 Health Check Script \
Create a comprehensive health check:
- IDE Configuration \
13.1 VS Code Setup \
Recommended Extensions \
Create.vscode/extensions.json:
Workspace Settings \
Create.vscode/settings.json:
Launch Configuration \
Create.vscode/launch.json:
13.2 PyCharm Setup \
Project Interpreter \
- Open Settings (Cmd+, or Ctrl+,)
- Navigate to Project → Python Interpreter
- Click gear icon → Add
- Select “Existing Environment”
- Path:
~/.pyenv/versions/voice-ai/bin/python
Run Configurations \
Create run configurations for each service:- Run → Edit Configurations
- Add New → Python
- Configure:
- Name: API Gateway
- Script path: (Module name)
uvicorn - Parameters:
app.main:app --reload --port 8000 - Working directory:
$ProjectDir$/services/api-gateway - Environment variables: From
.envfile
13.3 Git Configuration \
Set up Git hooks for code quality:.pre-commit-config.yaml:
- Troubleshooting \
14.1 Common Issues \
Docker Issues \
Problem: Docker containers won’t startDatabase Issues \
Problem: Connection refused to PostgreSQLPython Environment Issues \
Problem: Module not found errorsService Connection Issues \
Problem: Service can’t connect to RedisWebRTC Issues \
Problem: LiveKit connection fails14.2 Debug Mode \
Enable verbose logging:14.3 Useful Debug Commands \
14.4 Getting Help \
If you’re stuck:- Check the logs - Most issues leave traces in service logs
- Search existing issues - Someone may have solved this before
- Ask in Slack - #voice-ai-dev channel
- Create an issue - With reproduction steps and logs
- Appendix \
15.1 Quick Reference Card \
15.2 Environment Variables Cheat Sheet \
| Variable | Default | Description |
|---|---|---|
DATABASE_URL | - | PostgreSQL connection string |
REDIS_URL | - | Redis connection string |
SECRET_KEY | - | JWT signing key |
LIVEKIT_URL | ws://localhost:7880 | LiveKit server URL |
LIVEKIT_API_KEY | devkey | LiveKit API key |
DEEPGRAM_API_KEY | - | Deepgram API key |
ANTHROPIC_API_KEY | - | Anthropic API key |
GOTO_CLIENT_ID | - | GoToConnect OAuth client ID |
GOTO_CLIENT_SECRET | - | GoToConnect OAuth secret |
DEBUG | true | Enable debug mode |
LOG_LEVEL | DEBUG | Logging level |
15.3 Port Reference \
| Port | Service | Protocol |
|---|---|---|
| 5432 | PostgreSQL | TCP |
| 6379 | Redis | TCP |
| 7880 | LiveKit HTTP | TCP |
| 7881 | LiveKit WebRTC | TCP |
| 8000 | API Gateway | HTTP |
| 8001 | WebRTC Bridge | HTTP |
| 8002 | Agent Service | HTTP |
| 8003 | Worker Service | HTTP |
| 8025 | Mailhog Web | HTTP |
| 8080 | Adminer | HTTP |
| 9000 | Minio API | HTTP |
| 9001 | Minio Console | HTTP |
15.4 Useful Aliases \
Add to your~/.bashrc or ~/.zshrc:
Document Revision History \
| Version | Date | Author | Changes |
|---|---|---|---|
| 1.0 | 2026-01-16 | Claude | Initial document |
This document is part of the Voice by aiConnected technical documentation suite.