Local Development Guide
Guide for developing and testing the Zenoo Hub locally without requiring AWS cloud services.Overview: Two Approaches
The Hub supports two approaches for local development:- Local Provider (Recommended) - In-memory storage with zero dependencies
- LocalStack - AWS service emulation for testing AWS-specific behavior
Quick Comparison
| Aspect | Local Provider | LocalStack |
|---|---|---|
| Setup | 1 config line | Docker + configuration |
| Startup | <100ms | ~10 seconds |
| Dependencies | None | Docker, LocalStack image |
| Memory | Low (~50MB) | High (~500MB) |
| Persistence | None (volatile) | Optional (volumes) |
| AWS Accuracy | N/A | ~90% |
| Use Case | Quick dev, testing | AWS behavior testing |
When to Use Local Provider
Use local provider when:- Developing features that don’t depend on AWS-specific behavior
- Running unit and integration tests
- Building CI/CD pipelines
- Quick prototyping and experimentation
- No need for data persistence
- Want instant startup and teardown
When to Use LocalStack
Use LocalStack when:- Testing AWS-specific features (DynamoDB queries, TTL, etc.)
- Validating AWS configuration before deployment
- Testing multi-region behavior
- Need persistence between restarts
- Developing AWS-specific integrations
Local Provider Setup
The local provider requires minimal setup and is perfect for most local development scenarios.1. Add Dependency
Already included inbackend-integration-tests and sample-hub-instance:
2. Configure
application-local.yml:3. Run
Testing with Local Provider
Example Integration Test:CI/CD with Local Provider
Perfect for continuous integration:LocalStack Setup
LocalStack provides local emulation of AWS services.Installation
Using Docker
Using Docker Compose
Hub Configuration for LocalStack
Running the Hub
Accessing LocalStack Services
DynamoDB
Secrets Manager
Testing
Unit Tests
Run unit tests without any cloud services:Integration Tests with LocalStack
Test Configuration
IntelliJ IDEA Setup
Run Configuration
- Create new Spring Boot run configuration
- Set main class:
com.zenoo.hub.HubApplication - Set active profiles:
local - Set environment variables: