Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
155 commits
Select commit Hold shift + click to select a range
d9af8db
feat: Add SM-DP+ handler with multi-carrier management and profile op…
nutcas3 May 1, 2026
83736a1
feat: Add SM-DP+ integration layer with multi-carrier system initiali…
nutcas3 May 1, 2026
3954e94
feat: Add SM-DP+ service layer with multi-carrier management and prof…
nutcas3 May 1, 2026
a5acfa1
feat: Add SM-DP+ manager with multi-carrier load balancing, health ch…
nutcas3 May 1, 2026
269cd94
Merge branch 'main' of https://github.com/nutcas3/telecom-platform in…
nutcas3 May 1, 2026
afeffa0
feat: Add intelligent carrier selection service with scoring, recomme…
nutcas3 May 1, 2026
720ecb8
feat: Add carrier selection handler with optimal selection, analytics…
nutcas3 May 1, 2026
95c29d3
feat: Add carrier selection integration layer with multi-carrier setu…
nutcas3 May 1, 2026
ae8b7bd
feat: Refactor profile handlers into modular core components with sim…
nutcas3 May 1, 2026
66ebf2c
refactor: Extract carrier setup logic into separate file and remove u…
nutcas3 May 1, 2026
699ac9f
feat: Add intelligent carrier selection algorithm with machine learni…
nutcas3 May 1, 2026
1fff340
feat: Integrate SelectionAlgorithm into SMDPManager with optimal carr…
nutcas3 May 1, 2026
bd165c8
Merge branch 'main' of https://github.com/nutcas3/telecom-platform in…
nutcas3 May 1, 2026
d1ac4b1
refactor: Simplify profile handler function names by removing WithRep…
nutcas3 May 1, 2026
6eb2be1
feat: Add pricing engine with rate plan validation, cost calculation,…
nutcas3 May 1, 2026
536cc7f
feat: Add rate plan analytics handlers with usage, revenue, popularit…
nutcas3 May 1, 2026
b13d913
feat: Add rate plan handler layer with CRUD operations, management en…
nutcas3 May 1, 2026
3f8de62
feat: Add rate plan type system with comprehensive domain models, all…
nutcas3 May 1, 2026
4bff303
feat: Add rate plan service layer with CRUD operations, subscription …
nutcas3 May 1, 2026
49a8eba
feat: Add carrier integration layer with optimal carrier selection, r…
nutcas3 May 1, 2026
9cf82c5
feat: Add rate plan repository interface with GORM models and extende…
nutcas3 May 1, 2026
793f150
feat: Refactor pricing engine by extracting calculation methods into …
nutcas3 May 1, 2026
af9e243
refactor: Extract core rate plan types into separate file
nutcas3 May 1, 2026
3d23df1
feat: Add GORM repository implementation with CRUD operations, subscr…
nutcas3 May 1, 2026
01395fc
feat: Add carrier configuration layer with GORM repository, file load…
nutcas3 May 1, 2026
4131b73
feat: Add carrier configuration file loading with JSON-based carrier …
nutcas3 May 1, 2026
0d9b8f0
refactor: Extract service methods into separate files for better orga…
nutcas3 May 1, 2026
fc6cecd
Merge branch 'main' of https://github.com/nutcas3/telecom-platform in…
nutcas3 May 1, 2026
5c0c821
feat: Add currency configuration file with 20 major currencies and re…
nutcas3 May 1, 2026
1e66806
feat: Add currency analytics service with revenue tracking, transacti…
nutcas3 May 1, 2026
70f6471
feat: Add multi-currency billing service with transaction processing,…
nutcas3 May 1, 2026
599b7db
feat: Add exchange rate service with multi-provider support, currency…
nutcas3 May 1, 2026
6b13e03
refactor: Extract currency interfaces and GORM models into separate f…
nutcas3 May 1, 2026
7dbabbb
feat: Add rate plan currency integrator with subscription creation, c…
nutcas3 May 1, 2026
077e381
feat: Add currency repository with GORM implementation, rate plan int…
nutcas3 May 1, 2026
c93dd63
feat: Add currency handler layer with conversion, billing, exchange r…
nutcas3 May 1, 2026
295649b
refactor: Rename service package to services and move repository impl…
nutcas3 May 1, 2026
a313447
refactor: Add ExchangeRateService interface and format currency types…
nutcas3 May 1, 2026
ebb9bb4
refactor: Update service layer to use repository package types and al…
nutcas3 May 1, 2026
eb7e05d
refactor: Update handler constructors to use interface types instead …
nutcas3 May 1, 2026
a9df608
refactor: Rename currency parameter from 'currency' to 'curr' in curr…
nutcas3 May 1, 2026
4fe9d22
feat: Add repository types package with rate plan, subscription, usag…
nutcas3 May 1, 2026
ea11a73
feat: Add tenant handler layer with CRUD, user management, API keys, …
nutcas3 May 1, 2026
5e8d217
feat: Add tenant analytics service with dashboard, usage, performance…
nutcas3 May 1, 2026
6b8c7f9
feat: Add tenant types package with filters, requests, usage stats, e…
nutcas3 May 1, 2026
4c45a50
feat: Add tenant integration layer with repository wrapper, service m…
nutcas3 May 1, 2026
00ad4f3
feat: Add tenant package interfaces with repository, service, middlew…
nutcas3 May 1, 2026
69951d6
feat: Add tenant middleware with authentication, authorization, isola…
nutcas3 May 1, 2026
6261c51
feat: Add tenant domain models with multi-tenancy support, user manag…
nutcas3 May 1, 2026
b0bb090
feat: Add tenant repository implementation with GORM-based data acces…
nutcas3 May 1, 2026
a27c21b
feat: Add tenant service extended methods with quota management, usag…
nutcas3 May 1, 2026
6693f83
feat: Add tenant service implementation with CRUD operations, user ma…
nutcas3 May 1, 2026
5dd8f4c
feat: Add tenant-aware repository layer with isolation, validation, q…
nutcas3 May 1, 2026
eba2819
Merge branch 'main' of https://github.com/nutcas3/telecom-platform in…
nutcas3 May 1, 2026
d70a3d9
refactor: Move tenant repository files to repository package and upda…
nutcas3 May 1, 2026
d3d43e5
feat: Add tenant integration layer with repository wrapper, analytics…
nutcas3 May 1, 2026
bf5ee28
feat: Add currency analytics, billing, and exchange rate services wit…
nutcas3 May 1, 2026
0ebf301
refactor: Update tenant integration to use concrete service types and…
nutcas3 May 1, 2026
9faf20c
feat: Add TenantRepository interface with CRUD operations, user manag…
nutcas3 May 1, 2026
7748334
refactor: Extract ES2 types from client.go to separate types.go file
nutcas3 May 1, 2026
a11ad09
refactor: Move tenant repository implementation to tenant package and…
nutcas3 May 2, 2026
17e31d7
refactor: Refactor tenant and rate plan services with improved code o…
nutcas3 May 2, 2026
31a8886
refactor: Add rate plan currency integration service and update tenan…
nutcas3 May 2, 2026
f112aa4
refactor: Replace map[string]interface{} with map[string]any across c…
nutcas3 May 2, 2026
271b43e
refactor: Implement tenant analytics dashboard and usage analytics wi…
nutcas3 May 2, 2026
9414a8f
refactor: Remove unused rate plan currency integrator and tenant anal…
nutcas3 May 2, 2026
96ca53e
feat: Add pricing handlers with CRUD operations, rule application, pr…
nutcas3 May 2, 2026
9b9d73f
feat: Add Snowflake ID generator with thread-safe generation, parsing…
nutcas3 May 2, 2026
064bc3d
refactor: Extract tenant integration helper types to separate file an…
nutcas3 May 2, 2026
5637b21
feat: Add pricing interfaces and types for dynamic pricing rule manag…
nutcas3 May 2, 2026
990f741
refactor: Refactor tenant analytics to use repository data and extrac…
nutcas3 May 2, 2026
d2bd13e
feat: Add pricing repository, tenant-aware transaction support, and p…
nutcas3 May 2, 2026
ec81283
refactor: Extract helper methods, fix formatting, and add TODO commen…
nutcas3 May 2, 2026
b160029
refactor: Replace time and ID generation helpers with centralized id …
nutcas3 May 2, 2026
cac6db7
feat: Add ID generation utilities with rule ID, event ID, and random …
nutcas3 May 2, 2026
8cabf17
feat: Refactor ID generation to use Snowflake IDs with prefixes and a…
nutcas3 May 2, 2026
16f4c42
feat: Add tenant-aware rate limiter with sliding window counters and …
nutcas3 May 2, 2026
6fc23df
feat: Implement tenant-aware currency service wrapper with billing is…
nutcas3 May 2, 2026
6f8b53f
feat: Implement carrier weight updates, pricing analytics calculation…
nutcas3 May 2, 2026
9b37aaf
feat: Implement refund processing and billing analytics endpoints in …
nutcas3 May 2, 2026
31fefa6
feat: Implement carrier metrics persistence with dedicated metrics ta…
nutcas3 May 2, 2026
7605246
feat: Add tenant context injection to currency service methods for do…
nutcas3 May 2, 2026
c53faf3
feat: Implement rate limiting and resource access validation in tenan…
nutcas3 May 2, 2026
b1ceddd
refactor: Extract CRUD operations from pricing service into separate …
nutcas3 May 2, 2026
4241c38
feat: Implement MCC-based regional scoring with geographic grouping f…
nutcas3 May 2, 2026
5fddd48
feat: Implement revenue analytics calculation, resource performance t…
nutcas3 May 2, 2026
ef4e8a0
refactor: Replace interface{} with any and optimize slice operations
nutcas3 May 2, 2026
fb1b251
refactor: Update comments in tenant repository to reflect actual impl…
nutcas3 May 2, 2026
d8dbebd
Merge branch 'main' into new-features
nutcas3 May 2, 2026
77ca25a
feat: Add MVNO HTTP handlers with onboarding, management, and statist…
nutcas3 May 2, 2026
695013b
feat: Add MVNO onboarding validator with business, plan, and technica…
nutcas3 May 2, 2026
95cd99f
feat: Add MVNO domain types with status, plan, config, and onboarding…
nutcas3 May 2, 2026
afe3a79
feat: Add MVNO onboarding monitor with progress tracking and metrics …
nutcas3 May 2, 2026
fd827d4
feat: Add MVNO onboarding service with step-based workflow execution …
nutcas3 May 2, 2026
3b10a90
feat: Add MVNO repository with CRUD operations, filtering, and statis…
nutcas3 May 2, 2026
04e9426
feat: Add MVNO provisioner with resource provisioning, carrier setup,…
nutcas3 May 2, 2026
afd2bd0
feat: Add MVNO router with route setup, middleware configuration, and…
nutcas3 May 2, 2026
7239bde
feat: Add MVNO provisioner methods with tenant setup, resource alloca…
nutcas3 May 2, 2026
358df21
feat: Add production MVNO provisioner with tenant, carrier, billing, …
nutcas3 May 2, 2026
026a34f
feat: Add carrier-connector HTTP handlers with MVNO onboarding, manag…
nutcas3 May 2, 2026
bf46ecd
feat: Refactor MVNO handlers to use domain types and interface-based …
nutcas3 May 2, 2026
9296bc5
feat: Add MVNO onboarding service with step-based workflow execution …
nutcas3 May 2, 2026
192b4ce
feat: Refactor step status checking from if-else to switch statement …
nutcas3 May 3, 2026
c7ddd3c
feat: Extract repository interfaces from types.go into separate inter…
nutcas3 May 3, 2026
5cb2904
feat: Add MVNO repository with CRUD operations, filtering, and statis…
nutcas3 May 3, 2026
f6394e1
feat: Reorder OnboardingProgress and OnboardingStep structs and add M…
nutcas3 May 3, 2026
2344ef0
feat: Add logger dependency to SelectionService and refactor handler …
nutcas3 May 3, 2026
88fd53a
feat: Remove MVNO handlers, service, and repository implementations f…
nutcas3 May 3, 2026
bc5ead5
feat: Remove MVNO router and add placeholder endpoints to main routes
nutcas3 May 3, 2026
b69d73a
feat: Wire MVNO handlers with repository and service dependencies in …
nutcas3 May 3, 2026
e5ccb62
feat: Add comprehensive routing for rate plans, pricing, currency, te…
nutcas3 May 3, 2026
82ecbff
feat: Add RatePlanAdapter with CRUD operations, subscription manageme…
nutcas3 May 3, 2026
7a80fb9
feat: Extract domain route registration from setupRoutes into separat…
nutcas3 May 3, 2026
4205d4c
refactor: Replace unused context parameters with blank identifiers an…
nutcas3 May 3, 2026
58e36d6
feat: Add analytics service with dashboard metrics, revenue tracking,…
nutcas3 May 3, 2026
d9c2026
feat: Add compliance service with DSR management, consent tracking, a…
nutcas3 May 3, 2026
625bfb5
feat: Add in-memory cache with TTL, LRU eviction, JSON serialization,…
nutcas3 May 3, 2026
52797e5
feat: Add circuit breaker with state management, failure tracking, fa…
nutcas3 May 3, 2026
4d0eb13
feat: Add whitelabel service with branding, partner config, and email…
nutcas3 May 3, 2026
26bb4f9
feat: Add real-time exchange rate service with multi-provider support…
nutcas3 May 3, 2026
1e2b38d
feat: Add analytics handler with dashboard, revenue analytics, and sc…
nutcas3 May 3, 2026
b2f92cc
feat: Add threat detection service with brute force, rate limit abuse…
nutcas3 May 3, 2026
7be483d
feat: Add compliance handler with DSR management, consent tracking, a…
nutcas3 May 3, 2026
9914ee5
feat: Add geographic routing service with region management, IP-based…
nutcas3 May 3, 2026
772c564
feat: Add whitelabel handler with branding, partner config, and email…
nutcas3 May 3, 2026
79fa56f
feat: Add encryption service with AES-GCM, field-level encryption, an…
nutcas3 May 3, 2026
c6fccc8
feat: Fix type conversions, rename ExchangeRateProvider to RateProvid…
nutcas3 May 3, 2026
f4780a5
feat: Add platform routes with analytics, whitelabel, compliance, exc…
nutcas3 May 3, 2026
42d7f4a
feat: Add churn analysis service with risk prediction, metrics calcul…
nutcas3 May 3, 2026
9239198
feat: Add market analysis service with penetration metrics, competito…
nutcas3 May 3, 2026
7ce8090
feat: Add fraud detection service with pattern matching, ML models, r…
nutcas3 May 3, 2026
fa7c4a1
feat: Add predictive maintenance service with asset monitoring, failu…
nutcas3 May 3, 2026
06661ca
feat: Add pricing optimization service with strategy-based pricing, d…
nutcas3 May 3, 2026
4a834a1
feat: Remove fraud detection service and move to dedicated security m…
nutcas3 May 3, 2026
7618bb2
feat: Refactor churn analysis service to simplify logic and extract r…
nutcas3 May 3, 2026
27e4594
feat: Add churn analysis types with risk levels, predictions, metrics…
nutcas3 May 3, 2026
b76a9a3
feat: Refactor rate plan currency integrator to simplify subscription…
nutcas3 May 3, 2026
40e87b1
feat: Mark unused parameters with underscore, remove unused file, and…
nutcas3 May 3, 2026
fa2bddf
feat: Update README with multi-language SDK support and analytics ser…
nutcas3 May 3, 2026
045dd69
feat: Add pricing optimization service with elasticity calculations, …
nutcas3 May 3, 2026
ef374ce
feat: Refactor pricing optimization service by extracting helper func…
nutcas3 May 3, 2026
347698b
feat: Add security handler with fraud detection, SIM swap verificatio…
nutcas3 May 3, 2026
2c6643e
feat: Add analytics handlers for market analysis, maintenance metrics…
nutcas3 May 3, 2026
d011945
feat: Add analytics handler with churn prediction, market metrics, an…
nutcas3 May 3, 2026
4a84193
feat: Add currency handler with conversion, exchange rates, billing, …
nutcas3 May 3, 2026
11fbbfb
feat: Add analytics, security, and currency route handlers with compr…
nutcas3 May 3, 2026
dcf6089
feat: Mark unused context parameters with underscore and refactor fra…
nutcas3 May 3, 2026
5f36ffe
feat: Add analytics handler with revenue metrics, usage analytics, bi…
nutcas3 May 3, 2026
b7a9b9f
feat: Add analytics CLI commands with churn, fraud, market, pricing, …
nutcas3 May 3, 2026
1288776
feat: Add analytics and churn dashboard pages with metrics visualizat…
nutcas3 May 3, 2026
9f51d6f
feat: Add analytics, security, and currency SDK modules with comprehe…
nutcas3 May 3, 2026
11fbb36
feat: Add analytics configuration to Helm values with churn, fraud, m…
nutcas3 May 3, 2026
9871367
docs: Add comprehensive SDK documentation and API endpoint reference …
nutcas3 May 3, 2026
79b99e1
Merge branch 'main' into new-features
nutcas3 May 3, 2026
5599353
docs: Add comprehensive platform architecture and components document…
nutcas3 May 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
186 changes: 185 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,16 @@ The platform is built as a microservices architecture with the following core co
**Developer Tools:**
- **CLI**: Command-line interface for service orchestration, configuration, and health checks
- **Web Dashboard**: Next.js-based management interface for network operations
- **TypeScript SDK**: Client library for integrating with TaaS APIs
- **Multi-Language SDKs**: Client libraries for Go, Python, TypeScript, Kotlin, Ruby, Swift, Rust, and Elixir
- **Kubernetes Operators**: Custom resources for deploying and managing TaaS services

**Analytics & Intelligence:**
- **Churn Analysis**: ML-powered customer churn prediction with risk scoring and retention recommendations
- **Fraud Detection**: Real-time fraud detection for account takeover, subscription fraud, payment fraud, and SIM swap attacks
- **Market Analytics**: Market penetration analysis, competitor tracking, and growth opportunity identification
- **Predictive Maintenance**: Infrastructure health monitoring with failure prediction and maintenance scheduling
- **Pricing Optimization**: Dynamic pricing strategies for revenue maximization, market share, and churn reduction

### Key Features

**API Gateway & Security:**
Expand Down Expand Up @@ -206,6 +213,15 @@ telecom-platform/
| |-- charging-engine/ # Rust: OCS Real-time Credit Control
| |-- packet-gateway/ # Rust: eBPF UPF Data Plane
| |-- web-dashboard/ # TypeScript: Next.js Frontend
|-- sdk/
| |-- go/ # Go SDK
| |-- python/ # Python SDK
| |-- typescript/ # TypeScript SDK
| |-- kotlin/ # Kotlin SDK
| |-- ruby/ # Ruby SDK
| |-- swift/ # Swift SDK
| |-- rust/ # Rust SDK
| |-- elixir/ # Elixir SDK
|-- libs/
| |-- shared-ts-sdk/ # TypeScript: Drop-in Widget SDK
| |-- proto/ # Shared Protobufs
Expand All @@ -216,6 +232,7 @@ telecom-platform/
| |-- traefik.yml # Static configuration
| |-- dynamic/ # Dynamic middleware config
|-- docs/ # Architecture & API docs
| |-- sdk-usage.md # Multi-language SDK documentation
| |-- gateway-quickstart.md # API Gateway guide
| |-- api-gateway.md # Gateway implementation details
|-- scripts/ # Automation scripts
Expand Down Expand Up @@ -270,6 +287,7 @@ pnpm dev
## Documentation

- **[API Documentation](./docs/api-spec.yaml)**: OpenAPI 3.0 specification
- **[SDK Documentation](./docs/sdk-usage.md)**: Multi-language SDK usage guide
- **[Building 5G Networks](./docs/building-5g-with-taas.md)**: Complete 5G deployment guide
- **[Airalo & eSIM Analysis](./docs/airalo-esim-operator-analysis.md)**: Commercial use case analysis
- **[Gateway Quickstart](./docs/gateway-quickstart.md)**: API Gateway setup and configuration
Expand Down Expand Up @@ -330,6 +348,172 @@ The API Gateway provides:

For detailed setup, see [Gateway Quickstart Guide](./docs/gateway-quickstart.md)

## Platform Architecture & Components

### **API Gateway Layer**
- **Traefik API Gateway**: Centralized entry point providing SSL termination, rate limiting, authentication, and request routing
- **Unified HTTPS Endpoint**: All services accessible via `https://api.telecom.com`
- **Security Middleware**: JWT authentication, security headers, compression, and retry logic
- **Monitoring Dashboard**: Real-time metrics and service health visualization

### **Core Network Services**

#### **API Server (Go/Gin)**
- **Purpose**: Central BSS (Business Support System) API
- **Features**: Authentication, subscriber management, automation, plugin system
- **Architecture**: Microservices with Gin framework, PostgreSQL, Redis caching
- **Key Modules**: Handlers for analytics, payments, monitoring, RBAC, websockets

#### **Carrier Connector (Go/Gin)**
- **Purpose**: ES2+ interface for eSIM profile management and carrier integration
- **Features**: Multi-carrier aggregation, GSMA ES2+ standards compliance, real-time eSIM provisioning
- **Architecture**: GORM for database, ES2+ client, message queue integration
- **Key Modules**: Pricing optimization, security (fraud detection), rate plans, MVNO support

#### **Charging Engine (Rust/Axum)**
- **Purpose**: Real-time credit control, usage tracking, and billing
- **Features**: Redis-backed rate limiting, PostgreSQL for rate plans, circuit breakers
- **Architecture**: High-performance Rust with tokio async runtime
- **Key Modules**: Charging handlers, authentication, monitoring, rating plans

#### **Packet Gateway (Rust/eBPF)**
- **Purpose**: High-performance packet processing for network traffic routing and QoS enforcement
- **Features**: eBPF-accelerated packet processing for line-rate throughput

### **Supporting Infrastructure**
- **PostgreSQL**: Persistent data storage for subscribers, automations, configuration
- **Redis**: Distributed caching, rate limiting, session management
- **MongoDB**: Document storage for 5G core network data
- **RabbitMQ**: Asynchronous event-driven communication
- **Consul**: Service discovery and health checking
- **Vault**: Secure secret management

### **Frontend Applications**

#### **Web Dashboard (Next.js/TypeScript)**
- **Purpose**: Management interface for network operations
- **Features**: Real-time dashboard, subscriber management, analytics, pricing optimization
- **Architecture**: React components, Tailwind CSS, API integration
- **Key Pages**: Dashboard, analytics, pricing, subscribers, system health

### **SDK Ecosystem**

Multi-language SDKs for developer integration:
- **Swift**: iOS/macOS applications with async/await support
- **Python**: Backend integration and automation
- **TypeScript**: Web applications and Node.js backends
- **Go**: Microservices and CLI tools
- **Kotlin**: Android applications
- **Rust**: High-performance systems
- **Elixir**: Phoenix applications
- **Ruby**: Rails integration

### **Analytics & Intelligence**

#### **Advanced Analytics Modules**
1. **Churn Analysis**: ML-powered customer churn prediction with risk scoring
2. **Fraud Detection**: Real-time fraud detection (account takeover, subscription fraud, SIM swap attacks)
3. **Market Analytics**: Market penetration analysis, competitor tracking
4. **Predictive Maintenance**: Infrastructure health monitoring with failure prediction
5. **Pricing Optimization**: Dynamic pricing strategies with elasticity calculations

#### **Pricing Optimization System**
- **Strategies**: Revenue maximization, market share, profit margin, competitive positioning, churn reduction
- **Advanced Calculations**:
- Dynamic elasticity based on rate plan characteristics
- Competitive index with seasonal market analysis
- ROI calculation with period-based adjustments
- **Implementation**: Go services with mathematical modeling and bounded realistic values

### **Commercial Applications**

#### **eSIM Operators (Airalo-style)**
- Multi-carrier aggregation across 400+ global carriers
- Real-time eSIM provisioning via GSMA ES2+ standards
- Usage-based billing with global rate plans
- B2B2C model for MVNO partnerships

#### **Enterprise Private Networks**
- Industrial IoT and manufacturing connectivity
- Campus networks for universities and hospitals
- Critical infrastructure communications
- Secure data sovereignty deployments

#### **Telecom Service Providers**
- MVNO enablement platform
- Network slicing as a service
- Edge computing integration
- 5G core network hosting

### **Data Flow Architecture**

```
Client Applications → Traefik Gateway → API Services → Backend Services
Authentication & Rate Limiting
Message Queue (RabbitMQ) for Async Events
Database Layer (PostgreSQL, Redis, MongoDB)
```

### **Key Features Summary**

- **Sovereignty & Security**: Full data sovereignty, end-to-end encryption, RBAC
- **Performance**: eBPF-accelerated packet processing, Redis-backed caching
- **Scalability**: Microservices architecture, horizontal scaling
- **Developer Experience**: Multi-language SDKs, comprehensive documentation
- **Enterprise Ready**: Monitoring, backup, security, compliance features

The platform represents a **complete telecom stack** for modern cellular network operations, combining carrier-grade reliability with cloud-native architecture and advanced analytics capabilities.

## API Endpoints

### Analytics API

| Method | Endpoint | Description |
|--------|----------|-------------|
| POST | `/api/v1/analytics/churn/predict` | Predict churn for a profile |
| GET | `/api/v1/analytics/churn/metrics` | Get churn metrics |
| GET | `/api/v1/analytics/churn/at-risk` | Get at-risk customers |
| GET | `/api/v1/analytics/market/metrics` | Get market metrics |
| GET | `/api/v1/analytics/market/competitors` | Get competitor analysis |
| GET | `/api/v1/analytics/market/opportunities` | Get market opportunities |
| GET | `/api/v1/analytics/maintenance/metrics` | Get maintenance metrics |
| GET | `/api/v1/analytics/maintenance/assets` | Get assets health |
| GET | `/api/v1/analytics/maintenance/alerts` | Get maintenance alerts |
| POST | `/api/v1/analytics/maintenance/predict/:asset_id` | Predict asset failure |
| GET | `/api/v1/analytics/pricing/metrics` | Get pricing metrics |
| POST | `/api/v1/analytics/pricing/optimize` | Optimize pricing |
| GET | `/api/v1/analytics/pricing/elasticity` | Get price elasticity |

### Security API

| Method | Endpoint | Description |
|--------|----------|-------------|
| POST | `/api/v1/security/fraud/analyze` | Analyze transaction for fraud |
| POST | `/api/v1/security/fraud/alerts` | Get fraud alerts |
| PUT | `/api/v1/security/fraud/alerts/:id` | Update alert status |
| GET | `/api/v1/security/fraud/metrics` | Get fraud metrics |
| GET | `/api/v1/security/fraud/patterns` | Get fraud patterns |
| POST | `/api/v1/security/simswap/verify` | Verify SIM swap |
| GET | `/api/v1/security/simswap/history/:profile_id` | Get SIM swap history |

### Currency & Billing API

| Method | Endpoint | Description |
|--------|----------|-------------|
| POST | `/api/v1/currency/convert` | Convert currency |
| GET | `/api/v1/currency/exchange/:from/:to` | Get exchange rate |
| GET | `/api/v1/currency/exchange/:from/:to/history` | Get exchange rate history |
| GET | `/api/v1/currency/currencies` | List supported currencies |
| POST | `/api/v1/currency/exchange/refresh` | Refresh exchange rates |
| POST | `/api/v1/currency/billing` | Process billing |
| GET | `/api/v1/currency/billing/history/:profile_id` | Get billing history |
| GET | `/api/v1/currency/billing/summary/:profile_id` | Get billing summary |
| POST | `/api/v1/currency/billing/refund/:transaction_id` | Process refund |
| GET | `/api/v1/currency/billing/analytics` | Get billing analytics |

## Environment Variables

Create `.env` files in each service directory:
Expand Down
69 changes: 69 additions & 0 deletions apps/api-server/cmd/server_routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
swaggerFiles "github.com/swaggo/files"
ginSwagger "github.com/swaggo/gin-swagger"

"github.com/nutcas3/telecom-platform/apps/api-server/internal/handlers"
"github.com/nutcas3/telecom-platform/apps/api-server/internal/middleware"
"github.com/nutcas3/telecom-platform/apps/api-server/internal/rbac"
)
Expand Down Expand Up @@ -73,6 +74,9 @@ func registerV1Routes(router *gin.Engine, d *serverDeps) {
registerBillingRoutes(apiProtected, d)
registerConfigRoutes(apiProtected, d)
registerChaosRoutes(apiProtected, d)
registerAnalyticsRoutes(apiProtected)
registerSecurityRoutes(apiProtected)
registerCurrencyRoutes(apiProtected)
}
}

Expand Down Expand Up @@ -195,3 +199,68 @@ func registerSubscriberRoutes(api *gin.RouterGroup, d *serverDeps) {
w.POST("/:id/suspend", d.subscriberH.SuspendSubscriber)
w.POST("/:id/terminate", d.subscriberH.TerminateSubscriber)
}

func registerAnalyticsRoutes(api *gin.RouterGroup) {
h := handlers.NewAnalyticsHandler()
analytics := api.Group("/analytics")

// Churn Analysis
churn := analytics.Group("/churn")
churn.POST("/predict", h.PredictChurn)
churn.GET("/metrics", h.GetChurnMetrics)
churn.GET("/at-risk", h.GetAtRiskCustomers)

// Market Analytics
market := analytics.Group("/market")
market.GET("/metrics", h.GetMarketMetrics)
market.GET("/competitors", h.GetCompetitors)
market.GET("/opportunities", h.GetMarketOpportunities)

// Predictive Maintenance
maintenance := analytics.Group("/maintenance")
maintenance.GET("/metrics", h.GetMaintenanceMetrics)
maintenance.GET("/assets", h.GetAssetsHealth)
maintenance.GET("/alerts", h.GetMaintenanceAlerts)
maintenance.POST("/predict/:asset_id", h.PredictFailure)

// Pricing Optimization
pricing := analytics.Group("/pricing")
pricing.GET("/metrics", h.GetPricingMetrics)
pricing.POST("/optimize", h.OptimizePricing)
pricing.GET("/elasticity", h.GetPriceElasticity)
}

func registerSecurityRoutes(api *gin.RouterGroup) {
h := handlers.NewSecurityHandler()
security := api.Group("/security")

// Fraud Detection
fraud := security.Group("/fraud")
fraud.POST("/analyze", h.AnalyzeTransaction)
fraud.POST("/alerts", h.GetFraudAlerts)
fraud.PUT("/alerts/:id", h.UpdateAlertStatus)
fraud.GET("/metrics", h.GetFraudMetrics)
fraud.GET("/patterns", h.GetFraudPatterns)

// SIM Swap Protection
simswap := security.Group("/simswap")
simswap.POST("/verify", h.VerifySIMSwap)
simswap.GET("/history/:profile_id", h.GetSIMSwapHistory)
}

func registerCurrencyRoutes(api *gin.RouterGroup) {
h := handlers.NewCurrencyHandler()
currencyGroup := api.Group("/currency")

currencyGroup.POST("/convert", h.ConvertCurrency)
currencyGroup.GET("/exchange/:from/:to", h.GetExchangeRate)
currencyGroup.GET("/exchange/:from/:to/history", h.GetExchangeRateHistory)
currencyGroup.GET("/currencies", h.GetSupportedCurrencies)
currencyGroup.POST("/exchange/refresh", h.RefreshExchangeRates)

currencyGroup.POST("/billing", h.ProcessBilling)
currencyGroup.GET("/billing/history/:profile_id", h.GetBillingHistory)
currencyGroup.GET("/billing/summary/:profile_id", h.GetBillingSummary)
currencyGroup.POST("/billing/refund/:transaction_id", h.ProcessRefund)
currencyGroup.GET("/billing/analytics", h.GetBillingAnalytics)
}
Loading
Loading