- Java 17 with modern features (Stream API, Lambda expressions, Concurrency API)
- Spring Boot 3.x microservices architecture
- RESTful APIs for network automation
- Multi-tenant hierarchical applications for network operators
- Event-driven architecture foundation (ready for Kafka integration)
- Reactive programming support with WebFlux
- Cloud-native deployment with Docker and Kubernetes readiness
- Comprehensive testing framework setup
- Microservices Design - Scalable, maintainable service architecture
- Multi-Tenant Support - Isolated data and operations per tenant
- Database Integration - JPA/Hibernate with PostgreSQL support
- API Documentation - OpenAPI 3.0 with Swagger UI
- Health Monitoring - Spring Boot Actuator with Prometheus metrics
- Professional Logging - Structured logging with correlation IDs
- Java 17+
- Maven 3.8+
- Docker & Docker Compose
git clone https://github.com/li000592/telecom-service-platform
cd telecom-service-platform# Start PostgreSQL, Redis, Kafka
docker-compose up -d postgres redis kafka zookeeper# Development mode with H2 in-memory database
cd device-service
mvn spring-boot:run -Dspring-boot.run.profiles=dev# Health check
curl http://localhost:8081/device-service/actuator/health
# Expected response: {"status":"UP"}http://localhost:8081/device-service
- Swagger UI: http://localhost:8081/device-service/swagger-ui.html
- OpenAPI Spec: http://localhost:8081/device-service/api-docs
# Get all devices for a tenant
GET /api/v1/devices
Headers: X-Tenant-ID: tenant-1
# Get specific device
GET /api/v1/devices/{deviceId}
Headers: X-Tenant-ID: tenant-1
# Create new device
POST /api/v1/devices
Headers: X-Tenant-ID: tenant-1, Content-Type: application/json
Body: {
"deviceId": "router-001",
"deviceName": "Core Router 1",
"deviceType": "ROUTER",
"ipAddress": "192.168.1.1",
"location": "DataCenter-1",
"vendor": "Cisco",
"model": "ISR4431"
}# Application health
GET /actuator/health
# Metrics (Prometheus format)
GET /actuator/prometheus
# Application info
GET /actuator/infocurl -X POST "http://localhost:8081/device-service/api/v1/devices" \
-H "X-Tenant-ID: tenant-1" \
-H "Content-Type: application/json" \
-d '{
"deviceId": "router-001",
"deviceName": "Core Router 1",
"deviceType": "ROUTER",
"ipAddress": "192.168.1.1",
"location": "DataCenter-1",
"vendor": "Cisco",
"model": "ISR4431"
}'# Get all devices
curl -H "X-Tenant-ID: tenant-1" \
"http://localhost:8081/device-service/api/v1/devices"
# Get specific device
curl -H "X-Tenant-ID: tenant-1" \
"http://localhost:8081/device-service/api/v1/devices/router-001"# Different tenant sees no devices
curl -H "X-Tenant-ID: tenant-2" \
"http://localhost:8081/device-service/api/v1/devices"βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Frontend (Future) β
βββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββ
β API Gateway (Future) β
βββββββββββ¬ββββββββββ¬ββββββββββ¬ββββββββββ¬ββββββββββ¬ββββββββββββββββ
β β β β β
βΌ βΌ βΌ βΌ βΌ
βββββββββββ βββββββββββ βββββββββββ βββββββββββ βββββββββββ
β Device β βService β βService β βNetwork β β Tenant β
βService β βAssuranceβ βFulfill. β βInventoryβ β Service β
β (Demo) β β(Future) β β(Future) β β(Future) β β(Future) β
βββββββββββ βββββββββββ βββββββββββ βββββββββββ βββββββββββ
β β β β β
βββββββββββ΄ββββββββββ΄ββββββββββ΄ββββββββββ
β
βββββββββΌββββββββ
β Message Queue β
β (Kafka-Ready) β
βββββββββββββββββ
telecom-service-platform/
βββ device-service/ # Network Device Management Service
β βββ src/main/java/
β β βββ com/telecom/platform/device/
β β βββ DeviceServiceApplication.java
β β βββ controller/
β β β βββ NetworkDeviceController.java
β β βββ domain/
β β β βββ NetworkDevice.java
β β β βββ DeviceType.java
β β β βββ DeviceStatus.java
β β βββ repository/
β β βββ NetworkDeviceRepository.java
β βββ src/main/resources/
β β βββ application.yml
β β βββ db/migration/
β βββ src/test/ # Test classes
βββ docker-compose.yml # Development infrastructure
βββ pom.xml # Parent Maven configuration
βββ Makefile # Build automation
βββ README.md # This file
- Database: H2 in-memory
- Console: H2 console enabled at
/h2-console - Logging: Debug level for application packages
- Database: PostgreSQL
- Caching: Redis integration
- Messaging: Kafka integration
- Logging: Info level
| Variable | Description | Default |
|---|---|---|
DATABASE_URL |
PostgreSQL connection URL | jdbc:postgresql://postgres:5432/telecom_platform |
DATABASE_USERNAME |
Database username | postgres |
DATABASE_PASSWORD |
Database password | postgres |
KAFKA_BOOTSTRAP_SERVERS |
Kafka bootstrap servers | kafka:9092 |
REDIS_HOST |
Redis host | redis |
REDIS_PORT |
Redis port | 6379 |
# Start all infrastructure services
docker-compose up -d
# Build and run application
mvn clean package -DskipTests
java -jar device-service/target/device-service-1.0.0-SNAPSHOT.jar# docker-compose.yml includes:
# - PostgreSQL database
# - Redis cache
# - Apache Kafka messaging
# - Prometheus monitoring
# - Grafana dashboards# Unit tests
mvn test
# Integration tests
mvn verify
# Test coverage report
mvn clean verify jacoco:report- Target: 80%+ code coverage
- Unit Tests: Service layer and controller logic
- Integration Tests: End-to-end API testing
- Database Tests: JPA repository testing
- Health Checks:
/actuator/health - Metrics:
/actuator/metrics - Prometheus:
/actuator/prometheus - Application Info:
/actuator/info
- H2 Console: http://localhost:8081/device-service/h2-console
- JDBC URL:
jdbc:h2:mem:testdb - Username:
sa - Password: (empty)
- JDBC URL:
- Tenant Isolation: All data operations require tenant ID
- Data Separation: Tenant-specific data access patterns
- API Security: Header-based tenant identification
- JWT-based authentication
- Role-based access control (RBAC)
- API rate limiting
- Input validation and sanitization
- Response Time: < 200ms for 95% of requests
- Database: Optimized queries with proper indexing
- Multi-tenancy: Efficient tenant-based data access
- Stateless Design: Easy horizontal scaling
- Database Connection Pooling: HikariCP optimization
- Caching Ready: Redis integration prepared
- Event-Driven Architecture: Kafka integration ready
- Device Service with CRUD operations
- Multi-tenant architecture
- Database integration
- API documentation
- Health monitoring
- Service Assurance module
- Service Fulfillment automation
- Network Inventory management
- API Gateway implementation
- Kafka event streaming
- React TypeScript frontend
- Machine Learning integration
- Advanced security (JWT, RBAC)
- Performance optimization
- Kubernetes Helm charts
- CI/CD pipeline
- Load testing
- Production monitoring
# Install required tools
brew install openjdk@17 maven docker
# Set JAVA_HOME
export JAVA_HOME=/opt/homebrew/opt/openjdk@17/libexec/openjdk.jdk/Contents/Home# Clone the repository
git clone <your-repo-url>
cd telecom-service-platform
# Start development environment
docker-compose up -d postgres redis kafka zookeeper
# Run application in development mode
cd device-service
mvn spring-boot:run -Dspring-boot.run.profiles=dev# Clean build
mvn clean package
# Skip tests
mvn clean package -DskipTests
# Run with specific profile
mvn spring-boot:run -Dspring-boot.run.profiles=dev
# Generate test coverage report
mvn clean verify jacoco:report- Follow Google Java Style Guide
- Use meaningful variable and method names
- Write comprehensive JavaDoc for public APIs
- Maintain 80%+ test coverage
- Create feature branch:
git checkout -b feature/description - Make changes and write tests
- Run tests:
mvn clean verify - Commit with meaningful messages
- Create pull request
- Java 17 - Modern JDK with latest features
- Spring Boot 3.2.5 - Application framework
- Spring Data JPA - Database abstraction layer
- Spring Boot Actuator - Monitoring and management
- H2 Database - Development database
- PostgreSQL - Production database
- Maven - Build and dependency management
- OpenAPI 3.0 - API specification
- Swagger UI - Interactive API documentation
- Spring Doc - Automatic API documentation generation
- JUnit 5 - Unit testing framework
- Spring Boot Test - Integration testing
- TestContainers - Database integration testing
- Mockito - Mocking framework
- Docker - Containerization
- Apache Kafka - Event streaming
- Redis - Caching layer
- Prometheus - Metrics collection
- Grafana - Monitoring dashboards
This project is licensed under the MIT License - see the LICENSE file for details.
Built with β€οΈ by Haorong!