MCPcopy Index your code
hub / github.com/CriticalMoments/CriticalMoments

github.com/CriticalMoments/CriticalMoments @0.9.9

Chat with this repo
repository ↗ · DeepWiki ↗ · release 0.9.9 ↗ · + Follow
846 symbols 2,526 edges 123 files 55 documented · 7%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Critical Moments Logo with 'The Mobile Growth SDK' tagline

Release Tests Test Case Count SPM Release

Quick StartHomepageDocumentationIssues

Critical Moments

Our Mobile Growth SDK is designed to:

1) Automate tedious and repetitive growth tasks. 2) Provide powerful new growth tools.

Overview 🔭

Table of Contents

  1. How It Works
  2. Feature Overview
  3. Powerful Targeting
  4. User Privacy
  5. Quick Start
  6. Demo App
  7. Documentation
  8. Contact Us, License & Copyright

How It Works 👩‍💻

Step 1: Install our SDK

Install our SDK and integrate into your app following our Quick-Start Guide. This only takes about 15 minutes.

Step 2: Create your growth plan in JSON

Yes, really — a growth plan defined in JSON. You can add features without any additional code. If you want deeper integrations, custom hooks are available.

Use our guides to get started with ready-to-deploy and proven growth tactics. We're building a growing library of examples you can use for inspiration.

Step 3: Update Anytime, Without App Updates

Once your initial growth plan is deployed, you can update anytime without waiting for app reviews or App Store updates. Add growth features without new code, anytime, over the air. Update and tune your user targeting logic, including in past app releases.

Feature Overview 🔧

Powerful Targeting 🎯

With Critical Moments, you can target users with the right actions at the perfect moment:

Targeting Conditions

Our simple string-based conditional statements can check over 100 built-in properties, custom properties, in-app events, and user engagement history.

Some examples: - eventCount('app_launch') > 5 && latestEventTime('asked_to_subscribe') < now() - duration('72h') - device_model_class == 'iPad' && versionLessThan(app_version, '2.4.1') - camera_permission != 'authorized' && photo_library_permission != 'authorized' - has_watch || location_city == 'Toronto' || has_car_audio || on_call || has_bt_headset || network_connection_type == 'cellular' - weather_condition IN ['Rain', 'Thunderstorms'] || weather_cloud_cover > 0.80

Targeting Events

Define exactly when actions should occur, based on in-app event triggers.

The most commonly needed actions are tracked automatically. Add your own custom events or properties with a single line of code.

Local User-Engagement Database

Our SDK automatically starts building an on-device database of user engagement history. Use this database when targeting user-messaging, reviews, notifications, paywalls and more! For example: eventCount('session_start') > 3 && latestEventTime('asked_to_subscribe') < now() - duration('24h') && !propertyEver('has_paid_subscription', true)

User Privacy 🔑🔒

Critical Moments is designed from the ground up for user privacy. All logic is run locally on their own device. We don’t collect any information about your users. A default installation makes zero calls to our servers from the user’s device. Learn more about our privacy architecture in our blog post.

Note: Some optional services like GeoIP location and weather require external services. These are clearly outlined in our docs. They are completely optional, do not collect user identifiers, and do not store logs long-term.

Quick Start 🚀

Our Quick-Start guide will get you up and running with the Critical Moments SDK in just a few minutes.

Demo App 

Want to see Critical Moments in action? Download our demo app from TestFlight for a hands-on experience, or view the source code on GitHub to understand the implementation details.

Documentation 👩‍💻

Our documentation includes:

Contact Us 👋

We're here to help!

Can't find an answer in our docs? Need help with integration, have a bug report, or a feature request? Feel free to reach out!

License ⚖️

Critical Moments requires you to purchase a license to use it in production apps. See our pricing page for details. The code of the SDK is fully source-available, and in this repo.

Copyright ©️

Copyright (c) 2023 Chesterfield Laboratories Inc.

"Critical Moments" and our logos are trademarks. All rights reserved.

Extension points exported contracts — how you extend this code

ActionTypeInterface (Interface)
(no doc) [7 implementers]
go/cmcore/data_model/action_container.go
LibBindings (Interface)
To be implemented by client libaray (eg: iOS SDK) [1 implementers]
go/appcore/lib_bindings.go
UserPresentableErrorInterface (Interface)
error, but additional type we can check, and accessor to reason [2 implementers]
go/cmcore/data_model/user_presentable_error.go
LibPropertyProvider (Interface)
An interface libraries can implement to provide dynamic properties. Not ideal interface in go, but gomobile won't map in [1 …
go/appcore/property_providers.go
ActionBindings (Interface)
To be implemented by client libaray (eg: iOS SDK or Appcore) [1 implementers]
go/cmcore/data_model/action_container.go

Core symbols most depended-on inside this repo

NewUserPresentableError
called by 88
go/cmcore/data_model/user_presentable_error.go
requiredPropertyConfig
called by 77
go/cmcore/data_model/properties.go
Valid
called by 64
go/cmcore/data_model/theme_model.go
evaluateCondition
called by 63
go/appcore/property_registry.go
registerStaticProperty
called by 38
go/appcore/property_registry.go
SendClientEvent
called by 35
go/appcore/appcore.go
NewUserPresentableErrorWSource
called by 34
go/cmcore/data_model/user_presentable_error.go
String
called by 31
go/cmcore/data_model/condition.go

Shape

Function 461
Method 298
Struct 73
Interface 8
TypeAlias 5
Class 1

Languages

Go84%
TypeScript16%
C++1%

Modules by API surface

docs/js/jquery.min.js80 symbols
docs/js/typeahead.jquery.js50 symbols
go/appcore/appcore_test.go43 symbols
go/appcore/appcore.go40 symbols
go/cmcore/data_model/primary_config.go31 symbols
go/appcore/property_registry_test.go29 symbols
go/cmcore/data_model/primary_config_test.go28 symbols
go/appcore/notification_runner.go28 symbols
go/cmcore/data_model/page.go24 symbols
go/appcore/db/db.go22 symbols
go/cmcore/data_model/notification.go21 symbols
go/appcore/db/db_test.go21 symbols

For agents

$ claude mcp add CriticalMoments \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact