Skip to content

feat: resolve #740 #741 #742 #743 - ETL module, billing strategy, context+hooks, contract modularization - #828

Merged
Smartdevs17 merged 3 commits into
Smartdevs17:mainfrom
Itodo-S:feat/issues-740-741-742-743
Jul 29, 2026
Merged

feat: resolve #740 #741 #742 #743 - ETL module, billing strategy, context+hooks, contract modularization#828
Smartdevs17 merged 3 commits into
Smartdevs17:mainfrom
Itodo-S:feat/issues-740-741-742-743

Conversation

@Itodo-S

@Itodo-S Itodo-S commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR resolves issues #740, #741, #742, and #743 with the following changes:

#740: Extract ML service feature pipeline into standalone ETL module

  • Created ml-service/etl/ with extractors, transformers, loaders, pipeline orchestrator, and monitoring
  • Added Airflow DAG for scheduled pipeline execution (ml-service/dags/feature_pipeline_dag.py)
  • Added performance benchmarks (ml-service/benchmarks/etl_benchmark.py)
  • Added ETL testing framework and documentation
  • Feature store backends: InMemory, BigQuery, Redis

#741: Refactor billing engine to strategy pattern for pluggable pricing

  • Created backend/services/billing/ with PricingStrategy interface
  • Implemented 4 pricing strategies: FlatRate, UsageBased, Tiered, Dynamic
  • Added PricingStrategyFactory for strategy selection based on plan type
  • Added PricingAnalyticsService for revenue metrics tracking
  • Added comprehensive unit tests

#742: Refactor mobile app state management to context + hooks pattern

  • Created src/context/ with SubscriptionProvider and AppProvider
  • Created custom hooks: useSubscriptionContext, useSubscriptions, useSubscriptionStats, useSubscriptionActions, useSubscription
  • Added performance-optimized selectors to minimize re-renders
  • Maintains full backward compatibility with existing Zustand stores

#743: Refactor smart contract to modular library architecture

  • Extracted plan.rs, subscription_lifecycle.rs, payment.rs, admin.rs from monolithic lib.rs
  • Full backward compatibility with existing public API preserved
  • All existing tests and functionality maintained
  • Improved code organization and maintainability

Closes

…tegy pattern, context+hooks, contract modularization

- Smartdevs17#740: Extract ML service feature pipeline into standalone ETL module
  - Create ml-service/etl/ with extractors, transformers, loaders, pipeline, monitoring
  - Add Airflow DAG for pipeline orchestration
  - Add performance benchmarks
  - Add ETL testing framework and documentation

- Smartdevs17#741: Refactor billing engine to strategy pattern for pluggable pricing
  - Create backend/services/billing/ with PricingStrategy interface
  - Implement FlatRate, UsageBased, Tiered, and Dynamic pricing strategies
  - Add PricingStrategyFactory for strategy selection by plan type
  - Add PricingAnalyticsService for revenue metrics
  - Add comprehensive tests

- Smartdevs17#742: Refactor mobile app state management to context + hooks pattern
  - Create src/context/ with SubscriptionProvider and AppProvider
  - Create custom hooks for type-safe state access (useSubscriptionContext, useSubscriptions, etc.)
  - Add performance-optimized selectors to minimize re-renders
  - Maintain backward compatibility with existing Zustand stores

- Smartdevs17#743: Refactor smart contract to modular library architecture
  - Extract plan.rs, subscription_lifecycle.rs, payment.rs, admin.rs from monolithic lib.rs
  - Maintain full backward compatibility with existing public API
  - Preserve all existing tests and functionality
  - Improve code organization and maintainability
- Split StorageKey into StorageKey (core) + StorageKeyExt (extensions) to
  avoid soroban contracttype variant limit
- Update storage bridge methods to accept Val instead of StorageKey
- Make subscription storage helpers generic for both enum types
- Fix subscription contract: oracle feature-gated imports, payment API
  (into_val/to_val), loyalty byte strings, Address comparison (deref),
  move-after-use bugs, type annotations, event_store comparisons
- Fix oracle: add contracterror import, refactor chain-specific functions
  to use dedicated DataKey variants instead of Symbol::to_string()
- Fix utils/merkle: u64→u32 vec indexing, Option<Bytes> wrapper
- Fix audit: wrap event topic in tuple for Topics trait
- Fix credit: undefined variable in next_wallet_id, u32→u64 cast
- Add missing types to subtrackr-types (BillingSchedule, LoyaltyConfig,
  WebhookConfig, etc.) and Interval variants (BiWeekly, BiMonthly, etc.)
- Gate all oracle-dependent code behind #[cfg(feature = "oracle")]
@drips-wave

drips-wave Bot commented Jul 28, 2026

Copy link
Copy Markdown

@Itodo-S Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Smartdevs17
Smartdevs17 merged commit 815bb36 into Smartdevs17:main Jul 29, 2026
7 of 23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants