This is a demo application of the Cloudflare Agents Framework.
Each User is represented by an Agent, addressable by the username. Kudos are stored both in the Agent's internal SQLite database as well as the Agent State which is synced to every connected client.
Open a user's page in two browsers and heart it. You'll see it immediately refreshes, showing off multi-player functionality.
There is a background Workflow that runs to check YouTube for new compliments and in turn produces new Kudos for what it finds. This runs using the agent's scheduler.
Copy .dev.vars.example to .dev.vars
Add your YouTube Data API Key
npm install
npm run dev
Upload your secrets
npx wrangler secret bulk .dev.vars
Deploy
npm run deploy