dopaminejs demo

XP, achievements, streaks and confetti for a website, from one script tag and HTML attributes. Each section below is one use case. Progress is saved in this browser only.

Loading dopaminejs 3.8.0

Course lesson

Watch the video to the end. You get XP, an achievement, confetti and a certificate.

The video is WebM. If your browser cannot play it, the other three examples still work.

Blog post

Scroll the post to the end. You get XP and a streak toast.

Seeds need water, light and time. Most people give them the first two and run out of the third.

Start small. One pot on a windowsill is enough to learn how your light moves through the day.

Water in the morning. The soil dries slower, and you will notice a dry pot before the plant does.

Keep a note of what you did. Two lines a day shows you what worked when something goes wrong.

Do not move a plant every few days. It spends the week adjusting instead of growing.

Harvest a little at a time. A plant cut back lightly keeps producing for longer.

That is all. Come back tomorrow and read the next one to keep your streak.

Docs tutorial

Each button gives XP, and the third unlocks a badge.

  1. Install the package.
  2. Add the script tag.
  3. Add a data attribute.

Form

Submit the form for XP. Nothing is sent anywhere.