This repository provides a unified development environment for all PrescriberPoint .NET microservices with shared infrastructure (SQL Server, Redis) and consistent tooling.
- Single source of truth for configuration - All shared config in one
.envfile - Shared infrastructure - SQL Server and Redis run once, shared by all projects
- Independent repositories - Each project repo remains separate for git operations
- Multiple debugging sessions - Open each repo in its own VS Code window with full debugging support
- .devcache pattern - Persistent cache directories for VS Code Server, tools, and extensions
- microservice-epa (.NET 9) - Electronic Prior Authorization service
- microservice-case-management (.NET 9) - Case Management service
- microservice-sam-gateway (.NET 9) - SAM Gateway service
- ppt-agentic (.NET 9) - Agentic AI service
- ppt-common-csharp (.NET 9) - Shared common library
- Docker and Docker Compose installed
- VS Code with the Dev Containers extension
- Git installed locally
cd ~/development/prescriberpoint
# ppt-dev directory should already exist
cd ppt-devcp .env.example .envEdit .env and configure:
CONTAINER_USERNAME- Your local username (typicallyvscode)MSSQL_SA_PASSWORD- Strong password for SQL ServerGITHUB_TOKEN- GitHub PAT with package read permissionsGITHUB_ACTOR- Your GitHub username- Other settings as needed for your services
make start
# or
./scripts/start-dev.shThis starts all Docker Compose services including:
- SQL Server (port 1433)
- Redis (port 6379)
- All five development containers
For each project you want to work on:
- Open a new VS Code window
- Open the repository folder (e.g.,
~/development/prescriberpoint/microservice-epa) - Run command: Dev Containers: Reopen in Container
- Select the appropriate container when prompted
- VS Code will attach to the running container
Repeat for each project, using separate VS Code windows.
Since each repository opens in its own VS Code window attached to its own container, you can:
- Debug multiple services simultaneously - Each window has full debugging capabilities
- Run services independently - Start/stop services as needed
- View logs separately - Each window shows logs for its container
- Use different VS Code settings - Each project can have custom settings
All containers are on the same Docker network (ppt-dev), so they can communicate using container names:
- From ppt-agentic:
http://microservice-epa:5000 - From microservice-case-management:
http://microservice-sam-gateway:5000 - SQL Server:
sqlserver:1433 - Redis:
redis:6379
| Service | Host Port | Container Port | Description |
|---|---|---|---|
| sqlserver | 1433 | 1433 | SQL Server |
| redis | 6379 | 6379 | Redis |
| microservice-epa | 5100 | 5000 | ePA API |
| microservice-case-management | 5200 | 5000 | Case Management API |
| microservice-sam-gateway | 5300 | 5000 | SAM Gateway API |
| ppt-agentic | 5400 | 5000 | Agentic API |
| ppt-common-csharp | 5500 | 5000 | Common library (dev) |
From the ppt-dev directory:
# Start all services
make start
# Stop all services (preserves data)
make stop
# Restart all services
make restart
# View all container logs
make logs
# View specific service logs
docker-compose logs -f microservice-epa
# Check service status
make status
# Open shell in CLI container
make cli
# Stop and remove all containers and volumes
make cleanFrom within a devcontainer:
Each project has its own build/test commands:
# Build the solution
dotnet build
# Run tests
dotnet test
# Format code
dotnet format
# Run Entity Framework migrations (if applicable)
dotnet ef database updateThe .env file in this repository is the single source of truth for all configuration shared across projects:
- GitHub authentication
- SQL Server credentials
- Redis connection
- Azure configuration
- Auth0 settings
- OpenAI/AI service keys
- And more...
This ensures consistency between local development and Azure production deployments.
Each project repository maintains its own:
appsettings.jsonandappsettings.Development.json.devcontainer/devcontainer.jsonsettings (inppt-dev/.devcontainer/)- VS Code extensions and settings
- Build and test configurations
- Git history and branches
All containers use a shared base image (ppt-dev/Dockerfile) that includes:
- .NET 9 SDK - For all .NET services
- Node.js 20 - For tooling and scripts
- SQL Server tools - For database access
- Azure CLI - For Azure operations
- GitHub CLI - For GitHub operations
- Claude Code CLI - For AI-assisted development
- Common development tools - git, vim, nano, jq, etc.
This approach ensures:
- Consistent tooling across all development environments
- Fast container startup (tools pre-installed)
- Ability to work across service boundaries
The development environment uses host-mounted cache directories (.devcache/) for container home directories. Each service has its own cache subdirectory:
.devcache/microservice-epa/- ePA service cache.devcache/microservice-case-management/- Case Management cache.devcache/microservice-sam-gateway/- SAM Gateway cache.devcache/ppt-agentic/- Agentic service cache.devcache/ppt-common-csharp/- Common library cache.devcache/ppt-dev/- CLI container cache.devcache/claude-shared/- Shared Claude Code auth.devcache/gh-shared/- Shared GitHub CLI auth
What gets cached:
- VS Code Server binaries and extensions (~1-2GB per service)
- Bash history and shell configuration
- .NET tools (dotnet-ef, NSwag, etc.)
- Azure CLI configuration and extensions
- Git configuration
Benefits:
- Fast startup - Tools and extensions persist across container rebuilds
- Smaller images - Heavy dependencies stay in cached volumes, not in Docker images
- Preserved state - Bash history, git config, and CLI settings persist between sessions
- Disk-based caching - Much faster than downloading/installing on each startup
Each cache directory can grow to 3-4GB but significantly speeds up development workflow.
ppt-dev/
├── .devcontainer/ # DevContainer configs for each service
│ ├── microservice-epa/
│ ├── microservice-case-management/
│ ├── microservice-sam-gateway/
│ ├── ppt-agentic/
│ ├── ppt-common-csharp/
│ └── ppt-dev/
├── .devcache/ # Container home directories (gitignored)
│ ├── microservice-epa/
│ ├── microservice-case-management/
│ ├── microservice-sam-gateway/
│ ├── ppt-agentic/
│ ├── ppt-common-csharp/
│ ├── ppt-dev/
│ ├── claude-shared/
│ └── gh-shared/
├── scripts/
│ ├── start-dev.sh # Start development environment
│ └── stop-dev.sh # Stop development environment
├── .env.example # Template configuration
├── .env # Your local configuration (gitignored)
├── .gitignore
├── docker-compose.yml # Multi-container orchestration
├── Dockerfile # Unified .NET 9 development image
├── Makefile # Convenient commands
├── ppt-dev.code-workspace # VS Code workspace file
└── README.md
- Open repository in VS Code devcontainer
- Set breakpoints in your code
- Press F5 or use the Run and Debug panel
- VS Code will attach to the running process or launch with debugger
For detailed debugging instructions, see each repository's CLAUDE.md file.
# Check Docker Compose logs
docker-compose logs
# Ensure .env file exists and is configured
cat .env
# Rebuild containers
docker-compose up -d --build# Check if SQL Server is healthy
docker-compose ps sqlserver
# View SQL Server logs
docker-compose logs sqlserver
# Verify connection string in .env matches SQL Server settings
# Default: Server=sqlserver;Database=YourDb;User Id=sa;Password=YourStrong!Passw0rd;TrustServerCertificate=true;If you get port binding errors, check for processes using the ports:
# Linux/WSL
sudo lsof -i :1433
sudo lsof -i :5100
# Or stop conflicting containers
docker ps
docker stop <container-id>Ensure you:
- Opened the repository folder (e.g.,
~/development/prescriberpoint/microservice-epa), not the rootppt-devfolder - Have the Dev Containers extension installed
- Docker is running
- Containers are started with
make start
Each service's .devcache directory can grow to 3-4GB. To clean:
# Remove all cache directories (will need to reinstall VS Code extensions)
rm -rf .devcache/
# Or remove specific service cache
rm -rf .devcache/microservice-epa/- Image:
mcr.microsoft.com/mssql/server:2022-latest - Port: 1433
- User: sa
- Password: Configured in
.envasMSSQL_SA_PASSWORD
Connect from any service using:
Server=sqlserver;Database=YourDb;User Id=sa;Password=${MSSQL_SA_PASSWORD};TrustServerCertificate=true;
- Image:
redis:7-alpine - Port: 6379
- Connection:
redis:6379
Connect from any service using the connection string in .env.
- Always run tests before committing:
dotnet test - Format code:
dotnet format - Keep .env.example updated with new configuration keys
- Use feature branches for development
- Keep services focused - each microservice should have a single responsibility
The ppt-dev.code-workspace file allows you to open all repositories in a single VS Code workspace. This is useful for:
- Searching across all repositories
- Global find/replace
- Overview of all projects
To use:
code ppt-dev.code-workspaceThe ppt-dev container provides a unified environment for cross-repository work:
Option 1: Shell access (quick commands)
make cliOption 2: VS Code DevContainer (full IDE experience)
- Open
ppt-devdirectory in VS Code - Press
Ctrl+Shift+P/Cmd+Shift+P - Select "Dev Containers: Reopen in Container"
- Choose "PPT CLI"
Inside the CLI container:
- Access all repos from parent directories
- Run
az loginfor Azure CLI - Run
gh auth loginfor GitHub CLI - Run
claudefor Claude Code CLI - All tools available: .NET SDK, Azure CLI, GitHub CLI, etc.
This repository tracks the shared development infrastructure. Changes to individual projects should be made in their respective repositories.
To contribute to this infrastructure:
- Create a feature branch
- Make your changes
- Test with all projects
- Submit a pull request
Copyright (c) 2024 PrescriberPoint. All rights reserved.
For issues with:
- This development environment: Contact the DevOps team
- Individual projects: Open issues in the respective project repositories