Commit Graph
550 Commits
Author SHA1 Message Date
nutcas3 eef5f21717 feat: Add GraphQL code generation scaffolding with comprehensive type definitions and resolver interfaces
- Add custom GraphQL types and enums: SubscriberStatus, ProfileStatus, UsageType, SessionStatus, PaymentMethodType, InvoiceStatus, AlertType, AlertSeverity, SubscriberSort, UsagePeriod, TrendDirection
- Define input types: SubscriberFilter, UsageEventFilter, CreateSubscriberInput, UpdateSubscriberInput, TopUpInput, UsageStatsInput, PaymentMethodInput, CreateAlertInput
- Define output types: Page
2026-04-17 15:21:21 +03:00
nutcas3 1383e08645 feat: Implement GraphQL resolvers for subscriber management, charging operations, and real-time monitoring
- Add Resolver struct with database, subscriber, charging, and ES2 service dependencies
- Implement query resolvers: Subscriber, SubscriberByImsi, Subscribers, SubscriberAccount, UsageEvents, UsageStats, RealTimeUsage, Invoices, Invoice, RatingPlans, RatingPlan, Alerts, SystemStats, HealthStatus, SearchSubscribers, SearchUsageEvents
- Implement mutation resolvers: CreateSubscriber, UpdateSubscriber, DeleteSubscriber, TopUpBalance, Suspend
2026-04-17 15:21:03 +03:00
nutcas3 86141062fe feat: Add comprehensive GraphQL schema for subscriber management and charging operations
- Add custom scalars (DateTime, JSON) for complex data types
- Define enums for subscriber status, profile status, usage types, session status, payment methods, invoice status, and alert types
- Add core types: Subscriber, SubscriberAccount, UsageEvent, RatingPlan, ChargingSession, PaymentMethod, Invoice, Alert
- Add system monitoring types: SystemStats, HealthStatus
- Implement Relay-style pagination with Connection
2026-04-17 15:18:06 +03:00
nutcas3 386707d02f feat: Implement actual uptime calculation and memory usage tracking in monitoring
- Replace placeholder uptime with actual elapsed time since startup using startup_time
- Add fallback to UNIX epoch time if system time goes backwards
- Implement get_process_memory to read actual memory from /proc/self/status on Linux
- Add estimate_memory_usage fallback for non-Linux systems (35MB base estimate)
- Add get_redis_memory_usage to query Redis memory info as secondary fallback
- Update get_memory_usage to use
2026-04-14 20:08:37 +03:00
nutcas3 da712a524f feat: Add startup_time field to ChargingEngine for tracking service uptime
- Add SystemTime import from std::time
- Add startup_time field to ChargingEngine struct
- Initialize startup_time with SystemTime::now() during engine creation
2026-04-14 20:08:11 +03:00
NutcaseandGitHub 49187ee836 Merge pull request #1 from nutcas3/phase-2
Phase 2
2026-04-14 18:31:03 +03:00
nutcas3 b6edcb8436 feat: Implement actual uptime and memory usage tracking in monitoring
- Replace placeholder uptime calculation with actual elapsed time since startup
- Add fallback to current time if system time goes backwards
- Implement get_process_memory to read actual memory from /proc/self/status on Linux
- Add estimate_memory_usage fallback for non-Linux systems (35MB base estimate)
- Add get_redis_memory_usage to query Redis memory info as secondary fallback
- Update get_memory_usage to use layered fallback approach (
2026-04-14 17:42:03 +03:00
nutcas3 c63c92245f refactor: Reorganize charging and errors modules into proper directory structure
- Move charging module files into charging/ directory (types.rs, engine.rs, credit_management.rs, rating_billing.rs)
- Move error module files into errors/ directory (types.rs, helpers.rs)
- Create mod.rs files for charging and errors modules with simplified exports
- Update import paths to use super:: for intra-module references
- Remove charging_new/errors_new aliases and use charging/errors directly
- Simplify module
2026-04-14 16:29:27 +03:00
nutcas3 c1f408c789 refactor: Extract credit management and monitoring functionality into separate modules
- Move credit operations (get_balance, add_credit, deduct_credit, check_credit) to credit_management.rs
- Move user blocking operations (block_user, unblock_user, is_user_blocked) to credit_management.rs
- Move subscriber account operations (get_subscriber_account, update_subscriber_account, record_usage_event) to credit_management.rs
- Move monitoring operations (get_system_statistics, health_check, get_performance
2026-04-14 16:25:36 +03:00
nutcas3 a42ef5d8db refactor: Transition to new modular charging and error handling architecture
- Alias charging_new as charging and errors_new as errors
- Add new charging module imports (charging_types, charging_engine, credit_management, rating_billing, monitoring_sync, sync_operations, monitoring)
- Add new error module imports (error_types, error_helpers)
- Prepare for gradual migration from monolithic to modular structure
2026-04-14 16:24:21 +03:00
nutcas3 2a2f481daa refactor: Split charging engine into separate modules for better code organization
- Move core types (SubscriberAccount, AccountStatus, UsageEvent, UsageType, RatingPlan, ChargingSession, SessionStatus, ChargingRule, Condition, Action) to charging_types.rs
- Move main ChargingEngine struct and initialization to charging_engine.rs
- Move credit operations (check_credit, get_balance, deduct_credit, add_credit) to credit_management.rs
- Move account operations (create_account, get_account, top_up_balance,
2026-04-14 16:24:04 +03:00
nutcas3 577f625bbd refactor: Split error handling into separate modules for better code organization
- Move ChargingError enum and IntoResponse implementation to error_types.rs
- Move ChargingResult, ErrorContext trait, validation functions, error conversions, and logging to error_helpers.rs
- Keep module declarations and re-exports in errors.rs
- Add validate_imsi, validate_session_id, and validate_amount validation helpers
- Add log_error helper for structured error logging with tracing
- Update error variants:
2026-04-14 16:22:56 +03:00
nutcas3 a335c6754e refactor: Split subscriber service into separate files for better code organization
- Move IMSI allocation logic to subscriber_imsi.go
- Move authentication key generation (generateAuthKeys, getOperatorVariant, generateOPc) to subscriber_auth.go
- Move eSIM profile operations (provisionESIMProfile, deactivateESIMProfile) to subscriber_esim.go
- Keep core subscriber CRUD operations and session management in subscriber.go
- Remove unused crypto/aes, crypto/rand, encoding/hex, and os imports from main
2026-04-14 16:22:22 +03:00
nutcas3 3a3b4d93a0 refactor: Split ES2 client into separate files for better code organization
- Move ES2 request/response types to es2_types.go
- Move profile operations (download, activate, deactivate, delete, status, list) to es2_operations.go
- Move helper methods (send requests, validation, generateRequestID) to es2_helpers.go
- Keep core ES2Service struct and ProvisionProfile in es2_client.go
- Revert sendDeactivationRequest parameter type from any back to interface{}
2026-04-14 16:22:07 +03:00
nutcas3 62cdffee2b feat: Remove unused generateRequestID helper function from AMF client
- Remove generateRequestID function and its fmt/time imports
- Function was not being used in AMF client implementation
2026-04-14 16:21:43 +03:00
nutcas3 1ead99440e feat: Replace interface{} with any type alias for improved code clarity
- Remove omitempty from Plan field in Subscriber model
- Update NotifySubscriberUpdate to use any instead of interface{}
- Update sendDeactivationRequest parameter type from interface{} to any
2026-04-14 16:07:04 +03:00
nutcas3 13355a07e7 feat: Add environment-based operator variant configuration with padding support
- Add os import for environment variable access
- Update getOperatorVariant to read OP from OPERATOR_VARIANT env var
- Add fallback to default "TelecomOP1234567" for development
- Add zero-padding for OP values shorter than 16 bytes
- Update comments to reference environment variable configuration
2026-04-14 16:06:09 +03:00
nutcas3 745ebe3bb4 chore: Update Go dependencies to latest versions
- Update bytedance/gopkg from v0.1.3 to v0.1.4
- Update bytedance/sonic/loader from v0.5.0 to v0.5.1
- Update gabriel-vasile/mimetype from v1.4.12 to v1.4.13
- Update gin-contrib/sse from v1.1.0 to v1.1.1
- Update go-playground/validator/v10 from v10.30.1 to v10.30.2
- Update goccy/go-json from v0.10.5 to v0.10.6
- Update golang/snappy from v0.0.4 to v1.0.0
- Update jackc/pgx/v5 from v5.6.0 to v5.9.1
- Update klauspost/compress from v1.17.6 to v1.18.5
2026-04-14 16:04:19 +03:00
nutcas3 e260ea3baa feat: Implement proper AES-128 OPc derivation per 3GPP specification
- Replace XOR-based OPc generation with AES-128 ECB encryption
- Add getOperatorVariant for consistent OP across subscribers
- Add AES cipher block creation with error handling
- Add OP length validation for AES-128 block size
- Update generateOPc to use crypto/aes for 3GPP-compliant OPc derivation
- Add hardcoded OP placeholder with production configuration note
2026-04-14 16:03:46 +03:00
nutcas3 a78599fa1f feat: Implement eSIM provisioning and AMF integration in subscriber service
- Add AMFClient and ES2Service dependencies to SubscriberService
- Initialize AMF client with default URL and ES2 service in NewSubscriberService
- Implement provisionESIMProfile with EID validation, profile provisioning, activation, and AMF notification
- Implement deactivateESIMProfile with profile deactivation, status updates, and session termination
- Add generateOPc helper for deriving OPc from OP and K using XOR-based
2026-04-14 16:00:46 +03:00
nutcas3 92ed80fec6 style: Format subscriber models with consistent spacing and add inactive status
- Reformat struct field alignment for improved readability
- Add SubscriberStatusInactive to SubscriberStatus enum
- Add blank lines after type declarations for consistency
- Adjust whitespace and alignment across all model structs
2026-04-14 16:00:33 +03:00
nutcas3 6e11d40f5e feat: Add AMF client for session termination and subscriber status notifications
- Add AMFClient struct with base URL and HTTP client
- Add NewAMFClient with 30s timeout
- Add TerminateSession for subscriber session termination with reason and timestamp
- Add NotifySubscriberUpdate for subscriber status change notifications
- Add SessionTerminationRequest and SessionTerminationResponse models
- Add generateRequestID helper for request tracking
2026-04-14 16:00:24 +03:00
nutcas3 2e1300282d feat: Add ES2Service for GSMA ES2+ eSIM profile management operations
- Add ES2Service struct with HTTP client and ES2Config
- Add NewES2Service with 30s timeout and TLS configuration
- Add ProvisionProfile for eSIM profile provisioning with metadata support
- Add ActivateProfile, DeactivateProfile, and DeleteProfile for profile lifecycle management
- Add GetProfileStatus for profile state queries
- Add ListProfiles for eUICC profile enumeration
- Add ValidateEID and ValidateICCID for identifier
2026-04-14 16:00:15 +03:00
nutcas3 f10d180bf4 feat: Add charging engine with Redis-based credit management and usage tracking
- Add ChargingEngine struct with Redis client, rating plans, and sync interval
- Add SubscriberAccount model with balance, data/voice/SMS limits and usage tracking
- Add UsageEvent model for billing events with cost calculation
- Add RatingPlan model with data/voice/SMS rates and limits
- Add AccountStatus enum (Active, Suspended, Terminated, Blocked)
- Add UsageType enum (Data, Voice, SMS)
- Add sync_usage_data for
2026-04-14 15:53:14 +03:00
nutcas3 cf92bd0ab4 chore: Remove unused log import from carrier-connector 2026-04-14 15:52:49 +03:00
nutcas3 02246edea1 feat: Add ES2+ configuration management for carrier-connector
- Add ES2Config struct with base URL, API key, TLS verification, and requester ID fields
- Add LoadES2Config function with default SMDP connection parameters
- Include JSON tags for configuration serialization
2026-04-14 15:52:38 +03:00
nutcas3 24baebbf37 feat: Add subscriber service with IMSI allocation, authentication, and lifecycle management
- Add SubscriberService struct with Database and Config dependencies
- Add NewSubscriberService constructor
- Add CreateSubscriber with IMSI allocation, auth key generation, and eSIM provisioning support
- Add GetSubscriber and GetSubscriberByIMSI for subscriber retrieval
- Add UpdateSubscriber for subscriber information updates
- Add SuspendSubscriber with session termination
- Add TerminateSubscriber with session termination and eSIM profile deactivation
- Add ListSubscribers with pagination and
2026-04-14 15:52:23 +03:00
nutcas3 5c4281f01a feat: Add subscriber data models with GORM integration and 5G network support
- Add Subscriber model with IMSI, MSISDN, IMEI, and authentication fields
- Add ServicePlan model with data/voice/SMS limits and QoS settings
- Add Session model with PDU address, DNN, SNSSAI, and usage tracking
- Add UsageRecord model for billing with usage type, volume, rate, and cost
- Add SubscriberStatus enum (active, suspended, terminated, provisioning)
- Add ProfileStatus enum for eSIM profile state tracking
- Add SessionStatus enum (active, inactive, terminating)
- Add UsageType enum (data, voice, sms)
- Add PLMN struct with
2026-04-14 15:52:10 +03:00
nutcas3 a2021f64af feat: Add subscriber HTTP handlers with CRUD operations and lifecycle management
- Add SubscriberHandler struct with SubscriberService dependency
- Add NewSubscriberHandler constructor
- Add CreateSubscriber endpoint for subscriber creation with IMSI allocation
- Add GetSubscriber endpoint for ID-based retrieval
- Add GetSubscriberByIMSI endpoint for IMSI-based lookup
- Add UpdateSubscriber endpoint for subscriber information updates
- Add ListSubscribers endpoint with pagination, filtering (status, organization_id), and search
- Add SuspendSubscriber endpoint for subscriber suspension and session
2026-04-14 15:50:43 +03:00
nutcas3 008f7415a6 feat: Add ES2+ client for eSIM profile management operations
- Add ES2Client struct with HTTP client and configuration
- Add NewES2Client with 30s timeout and TLS configuration
- Add DownloadProfile for eSIM profile download requests
- Add GetProfileStatus for profile state queries
- Add DeleteProfile for profile removal operations
- Add EnableProfile and DisableProfile for profile state management
- Add request/response types for all ES2+ operations (EID, ICCID, profile type, confirmation code)
- Add setHeaders helper
2026-04-14 15:50:28 +03:00
nutcas3 8366e0011d feat: Add database layer with GORM integration and subscriber management
- Add Database struct with GORM PostgreSQL connection
- Add IMSIAllocation model for IMSI range tracking and allocation
- Add NewDatabase function with connection pooling (10 idle, 100 max connections, 1h lifetime)
- Add AutoMigrate for Subscriber, ServicePlan, Session, UsageRecord, and IMSIAllocation models
- Add InitializeIMSIAllocation with default IMSI range (1-999999999)
- Add CRUD operations for subscribers (Create, Get, GetByIMSI, Update, List)
- Add ListSubscribers with pagination, filtering by status/
2026-04-14 15:50:18 +03:00
nutcas3 5b8c5d81d5 feat: Add configuration management for api-server
- Add Config struct with server, database, Redis, IMSI, and ES2+ settings
- Add ServerConfig with port and timeout settings (30s read/write)
- Add DatabaseConfig for PostgreSQL connection parameters
- Add RedisConfig for cache connection settings
- Add IMSIConfig with France MCC+MNC prefix (20893) and IMSI range
- Add ES2Config for eSIM provisioning with SMDP connection parameters
- Add LoadConfig function with default configuration values
- Include JSON
2026-04-14 15:50:08 +03:00
nutcas3 b84971c004 feat: Add data models for charging engine API endpoints
- Add AppState struct to hold shared ChargingEngine instance
- Add CreditCheckRequest and CreditCheckResponse for credit validation
- Add DeductRequest for byte usage deduction
- Add AddCreditRequest for credit top-up operations
- Add BalanceResponse for IP address balance queries
- Add HealthResponse with default implementation for health check endpoint
- Derive Serialize/Deserialize traits for API request/response types
2026-04-14 15:49:58 +03:00
nutcas3 f6effbf6d1 chore: Remove unused log import and normalize variable alignment in api-server
- Remove unused standard library log import
- Normalize variable declaration spacing in var block
2026-04-14 03:39:52 +03:00
nutcas3 fd08e73ef7 chore: Update module paths and dependencies across api-server and carrier-connector
- Change module path from taas-platform to nutcas3 organization
- Remove golang-jwt/jwt dependency from api-server
- Add GORM PostgreSQL driver and GORM v1.31.1 to api-server
- Update go-resty/resty from v2.15.3 to v2.17.2 in carrier-connector
- Update rs/zerolog from v1.33.0 to v1.35.0 in carrier-connector
- Add go.sum files with complete dependency trees for both applications
- Include indirect dependencies
2026-04-14 03:31:37 +03:00
nutcas3 7a2f20160d chore: Normalize indentation in go.work file from spaces to tabs 2026-04-14 03:30:55 +03:00
nutcas3 f898e9d206 feat: Add eBPF packet filter for credit-based traffic control
- Add XDP-based packet filtering with credit balance enforcement
- Create BPF hash maps for packet statistics, user credits, and block list tracking
- Implement packet size calculation and IP address extraction helpers
- Add credit deduction logic based on packet byte count
- Block packets when user credit balance falls below threshold
- Track bidirectional packet statistics for source and destination IPs
- Include sync_stats hook for periodic Redis
2026-04-14 03:29:00 +03:00
nutcas3 5548b81e9b feat: Add free5GC testing and deployment verification commands to Makefile
- Add free5gc-test command to run configuration validation script
- Add verify command to execute comprehensive deployment verification
- Include color-coded output for better user feedback
2026-04-14 03:14:20 +03:00
nutcas3 5b9ad83cdd feat: Add Quick Start Guide for platform setup and deployment
- Add comprehensive quick start documentation with step-by-step instructions
- Include prerequisites, installation, and service startup commands
- Add service architecture diagram showing component relationships
- Include common commands for development and operations
- Add troubleshooting section for common issues (port conflicts, permissions, service failures)
- Provide service access URLs for web dashboard, API server, and charging engine
2026-04-14 03:14:01 +03:00
nutcas3 35fce65639 feat: Add deployment verification and testing scripts
- Add test-free5gc.sh script to verify free5GC configuration files and Docker Compose services
- Add verify-deployment.sh script for comprehensive platform deployment verification
- Include checks for Docker service status, port availability, and configuration files
- Add network connectivity tests for MongoDB and Redis
- Provide color-coded output and helpful command suggestions
- Exit with appropriate status codes for CI/CD integration
2026-04-14 03:13:46 +03:00
nutcas3 069a1a6c07 feat: Add free5GC configuration files for AUSF, NSSF, PCF, SMF, UDM, UDR, and UPF
- Add AUSF configuration with nausf-auth service endpoint
- Add NSSF configuration with nnssf-nsselection service endpoint
- Add PCF configuration with npolicy-authorization service endpoint
- Add SMF configuration with dual DNN support (internet, internet2), PFCP settings, and IPv4 session pools
- Add UDM configuration with nudm-sdm, nudm-uecm, and nudm-ueau service endpoints
- Add UDR configuration with nudr-dr service endpoint
2026-04-14 03:08:55 +03:00
nutcas3 bb379b0971 feat: Add free5GC management commands to Makefile
- Replace placeholder free5gc-setup with actual configuration setup
- Add free5gc-start command to launch all core network services (NRF, AMF, SMF, UPF, UDR, UDM, AUSF, NSSF, PCF)
- Add free5gc-stop command to gracefully stop all free5GC services
- Add free5gc-logs command to tail logs from core network functions
- Create config directory structure during setup
2026-04-14 02:58:51 +03:00
nutcas3 02720e2dff feat: Add iptables configuration script for free5GC UPF
- Add shell script to configure UPF (User Plane Function) iptables rules
- Flush existing filter, nat, and mangle tables
- Configure NAT masquerading on eth0 interface
- Set up forwarding rules for uesimtun0 tunnel interface
- Enable bidirectional traffic flow between UE tunnel and external network
2026-04-14 02:58:24 +03:00
nutcas3 868458d35d feat: Add free5GC NRF configuration for network function registration
- Add NRF (Network Repository Function) configuration
- Configure SBI interface with service binding on port 8000
- Set PLMN identity (MCC: 208, MNC: 93) for France
- Configure slice type (SST: 1) and slice differentiator
- Add MongoDB integration for NRF data storage
- Set T3502 timer to 60 seconds
2026-04-14 02:58:15 +03:00
nutcas3 77a0ed9d4f feat: Add free5GC 5G core network services to Docker Compose
- Add MongoDB database service for free5GC with authentication
- Add NRF (Network Repository Function) service
- Add AMF (Access and Mobility Management Function) service
- Add SMF (Session Management Function) service
- Add UPF (User Plane Function) with NET_ADMIN capabilities and iptables setup
- Add UDR (Unified Data Repository) service
- Add UDM (Unified Data Management) service
- Add AUSF (Authentication Server Function) service
2026-04-14 02:58:04 +03:00
nutcas3 f26e68849a feat: Add free5GC AMF configuration for 5G core network
- Add AMF (Access and Mobility Management Function) configuration
- Configure NGAP and SBI interfaces with service bindings
- Set PLMN identity (MCC: 208, MNC: 93) and TAI list
- Configure security algorithms (integrity: NIA2/NIA1/NIA0, ciphering: NEA0/NEA1/NEA2)
- Add NRF integration and service registration settings
- Configure namf-comm and namf-evts service endpoints
2026-04-14 02:55:19 +03:00
nutcas3 5c273f1afb added changelog and contributing files 2026-04-03 19:57:44 +03:00
nutcas3 4dda7e25d8 feat: Add deployment infrastructure and documentation
Docker:
- Add production-ready Dockerfiles for all microservices
- Optimize for multi-stage builds and minimal image sizes

Kubernetes:
- Add namespace and service manifests
- Include MongoDB and Redis deployment configurations
- Configure API server and charging engine deployments

Documentation:
- Add comprehensive README with platform overview
- Include technology stack and quick start instructions
- Provide prerequisites and setup guidance
2026-04-03 19:56:33 +03:00
nutcas3 b69b7ec087 feat: Initialize telecom platform with core services and infrastructure
- Add Go-based API server and carrier connector services
- Add Rust-based charging engine and packet gateway services
- Add Docker Compose configuration for local development
- Add comprehensive documentation (API, Architecture, Deployment)
- Add development scripts for Redis, MongoDB, and environment setup
- Add workspace configuration for Go modules and pnpm
- Remove unnecessary documentation files from web-dashboard
- Add project build configuration (Makefile, Cargo.toml)

This commit establishes the foundational microservices architecture for the sovereign Telecom-as-a-Service platform.
2026-04-03 19:55:38 +03:00
nutcas3 a69c6a125a Add web-dashboard with shadcn/ui setup 2026-04-03 15:10:24 +03:00