smile-io-integration
Installation
SKILL.md
Smile.io Integration
Data Loader Keys
Always import constants from @replohq/sdk/loaders/loader-keys:
DATA_LOADER_KEYS.SMILE_IO_VIP_TIERS— VIP tier definitionsDATA_LOADER_KEYS.SMILE_IO_EARNING_RULES— earning rules (ways to earn points)DATA_LOADER_KEYS.SMILE_IO_REWARDS— rewards catalog (redeemable items)
These loaders have no input args — they load the full program configuration.
Data Loading Pattern
Always use the prefetch pattern by default. The pattern has two layers:
- Server component (page): Uses
PrefetchedLoadersto fetch data during SSR and seed the React Query cache viaHydrationBoundary. - Client component: Uses a loader component (e.g.,
SmileVipTiersLoader) withuseSuspenseQueryunder the hood.