yral-dapp / off-chain-agent

0 stars 2 forks source link

User feed serving #32

Open komal-sai-yral opened 3 months ago

komal-sai-yral commented 3 months ago
  1. on chain (2 days)
    1. apis to store view history and successful plays
    2. logic to refresh view history and successful plays
// Format for data in canisters
pub struct WatchHistoryItem {
    post_id: u64,
    publisher_canister_id: Principal,
    viewed_at: SystemTime,
    cf_video_id: String,
    percentage_watched: f32,
}

pub struct SuccessHistoryItem {
    post_id: u64,
    publisher_canister_id: Principal,
    interacted_at: SystemTime,
    cf_video_id: String,
}
  1. Off chain agent (2-3 days)

    1. logic to push success and view data onchain
    2. push to upstash queue
  2. FE (5 days)

    1. Fetch next list of videos after N (?) watches
    2. Fallback to calling postcache if above fails
    3. proper testing
harshita-srivastava-yral commented 2 months ago

Next step:

harshita-srivastava-yral commented 2 months ago
Natasha-GB commented 2 months ago
Natasha-GB commented 1 month ago
Natasha-GB commented 1 month ago
Natasha-GB commented 1 month ago
harshita-srivastava-yral commented 1 month ago
Natasha-GB commented 1 month ago
harshita-srivastava-yral commented 1 month ago
harshita-srivastava-yral commented 1 month ago
Natasha-GB commented 1 month ago