Skip to content

Latest commit

 

History

History
83 lines (58 loc) · 1.63 KB

File metadata and controls

83 lines (58 loc) · 1.63 KB

MVNO Integration Solution

Integration service for MVNO providers with Telgea's API normalizer. Built with TypeScript and follows Domain-Driven Design principles.

Features

  • Normalizes data from multiple MVNO sources (SOAP/REST)
  • Aggregates usage and SMS charging data
  • Type-safe implementation with comprehensive error handling
  • Follows DDD principles for maintainable, scalable architecture

Prerequisites

  • Node.js >= 18.0.0
  • npm

Installation

npm install

Development

Start the development server:

npm run dev

Testing

Run the test suite:

npm test

API Endpoints

Get Usage Data

GET /api/mvno/usage/:userId

Get SMS Data

GET /api/mvno/sms/:userId

Get Aggregated Data

GET /api/mvno/aggregated/:userId

Aggregates both SOAP and REST api data (both partials of Telgea's internal format) into the Telgea's normalized format.

Project Structure

/src
  /api            # Express routes and controllers
  /application    # Application services and DTOs
  /domain         # Core business logic and entities
  /infrastructure # External integrations (SOAP/REST)
/tests            # Test files

Architecture

  • Domain Layer: Core business entities (User, UsageData, SmsCharge)
  • Application Layer: Use cases and data transformation
  • Infrastructure Layer: External API clients
  • API Layer: REST API endpoints and controller

Error Handling

  • Comprehensive error handling throughout all layers
  • Detailed error messages for debugging
  • Error logging for monitoring

Testing Strategy

  • Unit tests for core business logic