Every
high-resolution hero image, autoplay video, and complex JavaScript
animation carries a cost. Sustainable UX challenges the era of
“unlimited pixels” and reframes performance as responsibility. In 2026,
truly sophisticated design is defined not by how much it adds, but by
how thoughtfully it reduces its footprint.
I’ve spent
over two decades in the trenches of user experience design. I remember
the transition from table-based layouts to CSS, the pivot to responsive
design when the iPhone launched, and the rise of the “attention
economy.” But as we navigate 2026, the industry is facing its most
significant shift yet. We are moving past the era of “design at any
cost” into the era of Sustainable UX.
It’s not
something most designers think about, including myself, until I was
prompted by hearing about this as a concept. For years, we have treated
the internet as an ethereal, weightless cloud. We have assumed that
digital products were “green” simply because they weren’t printed on
paper. I used to think that too, and before the concept of climate
change emerged, it was more about saving trees.
We were wrong. The
cloud is a physical infrastructure, a sprawling network of data
centres, undersea cables, and cooling systems that hum 24⁄7. While AI-focused data centers match the power consumption of massive aluminum smelters, their high geographic density creates an even more intense and localised environmental strain.
As
UX designers, we are the architects of this energy consumption. Every
high-resolution hero image, every auto-playing background video, and
every complex JavaScript animation we approve is a direct instruction to
a processor to consume power. If we want to build a future that lasts,
we must stop designing for “wow” and start designing for efficiency.
In
the early 2000s, white backgrounds were the standard because they
mimicked the familiarity of paper. However, the hardware has evolved,
and our design philosophy must follow. The shift from LCD to OLED
(Organic Light Emitting Diode) technology has fundamentally changed how
colour impacts energy.
Unlike traditional LCD screens, which require a backlight that is always on (even when displaying black), OLED screens illuminate each pixel individually. When a pixel is set to true black (#000000), that specific diode is turned completely off. It draws zero power.
The energy savings are far from negligible. A landmark study by Purdue University
in 2021, which has become the gold standard for this discussion,
revealed that at 100% brightness, switching from light mode to dark mode
can save an average of 39% to 47% of battery power. On
a global scale, if every major app defaulted to dark mode, the
reduction in grid demand would be astronomical.
In 2026, Dark Mode should no longer be a secondary “theme” tucked away in a settings menu. We should be designing with a “Dark-First” mentality. This doesn’t mean every site must look like The Matrix,
but it does mean prioritising high-contrast dark themes as the default
system-preferred state. This extends the hardware lifespan of the device
and lowers the carbon footprint of every interaction.
I
personally prefer Light-Mode for reading, so it makes sense to have both
light and dark mode options available. There are also accessibility considerations with providing both options.
Image And Video Optimisation
We have become lazy designers. With high-speed 5G and fibre optics, we’ve stopped worrying about file sizes. The average mobile page weight has increased by over 500% in the last decade, largely due to unoptimized visual assets.
The Logic
The
“Digital Fat” of a website (those 4MB Unsplash photos and 15MB
background videos) is the single largest contributor to page-load
energy. Every megabyte transferred from a server to a client requires
electricity for the transmission, the server’s processing, and the
user’s rendering engine. When we use massive files, we are essentially
“burning” energy to show a picture that could have been just as
effective at a fraction of the size. Not to mention, you are also
providing a better user experience with a page that loads much faster.
Median page weight by content type. (Image source: HTTP Archive)
The Data
According to the HTTP Archive,
images and video consistently account for the lion’s share of a page’s
total weight. However, the shift to modern formats like AVIF and WebP can reduce image weight by up to 50% compared to JPEG, without any perceptible loss in quality.
Although
these formats are not as familiar to me as JPG and PNG, I am definitely
looking forward to using them to reduce page size.
I
recently led a redesign for a cybersecurity platform. By implementing a
“Before and After” audit, we discovered that their homepage was loading
5.5MB of data. By replacing high-res photography with SVG (Scalable Vector Graphics) art and using clever CSS gradients instead of image assets, we dropped the load to 1.2MB. That is a 78% reduction in energy load! As a designer, your first question should always be:
“Do I need a photo for this, or can I achieve the same emotional resonance with code?”
Intentional Motion: Cutting “Loud” Animations
We live in an era of “scroll-jacking” and complex 3D Parallax effects. While these might win awards on Awwwards.com, they are often ecological disasters.
Animation is not free. To render a complex animation, the device’s GPU (Graphics Processing Unit) must work at high capacity. This increases the CPU temperature,
triggers cooling fans (in laptops), and drains battery rapidly. “Loud”
animations that run constantly in the background or trigger massive
re-paints of the browser are the energy equivalent of leaving your car
idling in the driveway.
Size comparison of uncompressed JPEG, PNG, WebP, and AVIF photos and text images. (Image source: Photutorial)
We must adopt Meaningful Motion. If an animation doesn’t help a user complete a task or understand a hierarchy, it is a waste. We should favour CSS transitions over heavy JavaScript libraries like GSAP or Lottie where possible, as CSS is hardware-accelerated and far more efficient for the browser to calculate.
As a UX designer, I can’t argue this approach. This not only helps reduce data waste but also improves UX for our users.
Setting A “Data Budget” For Every Project
In my 20+ years of UX, the most successful projects have generally been the ones with the tightest constraints.
A
Data Budget is a hard cap on the total size of a page (e.g., “This
landing page cannot exceed 1MB”). This forces the design team to make
difficult, intentional choices. If you want to add a new tracking script
or a fancy font weight, you have to “pay” for it by optimising or
removing something else. This prevents “feature creep” from turning into
“carbon creep.”
The Data
The Sustainable Web Design model, developed by pioneers like Wholegrain Digital,
provides a formula to calculate the CO2 per page view. The average
website produces about 0.5 grams of CO2 per view. For a site with 1
million monthly views, that’s 6 metric tons of CO2 a year, equivalent to
driving a car 15,000 miles.
Reduce Images Question
the necessity of every visual and use the smallest resolution and most
efficient file formats (like AVIF) to minimize data transfer.
Optimise Video Eliminate
auto-playing media and prioritise highly compressed, short loops to
ensure energy is only spent on content the user intends to view.
Limit Fonts Use
a maximum of two web font weights or stick to classic system fonts to
remove unnecessary server requests and rendering bloat.
Recycle Assets Repurpose
a single image or video multiple times using CSS filters and overlays
to create visual variety without increasing the total page weight.
Choose Green Hosting Host your digital products on servers verified by The Green Web Foundation to ensure they are powered by renewable energy sources.
Minimize Data Distance Select
server locations geographically close to your primary audience to
reduce the energy required for data to travel through physical
infrastructure.
Printable Green UX checklist from Mangrove Web. (Image source: Mangrove Web)
The Business Case For Eco-friendly Design
Some
might argue that “Green UX” sounds like a compromise on quality. On the
contrary, it is a competitive advantage. Sustainable design is performance design.
When you reduce page weight, your site loads faster. When your site loads faster, your Core Web Vitals improve. When your Core Web Vitals improve, your SEO ranking
goes up. Furthermore, users on older devices or slower data plans
(especially in emerging markets) can actually access your product. This
is the definition of “Inclusive Design.”
By cutting the “digital
fat,” we create a leaner, faster, and more accessible web. We are moving
away from the “disposable design” of the 2010s toward a more permanent,
respectful digital architecture.
Conclusion: The Future Of “Clean” Design
In
my two decades of design, I’ve seen many trends come and go.
Skeuomorphism, Flat Design, Neumorphism — they were all aesthetic
choices. But sustainable UX isn’t a trend; it’s now a necessity. We are
the first generation of designers who have to reckon with the physical
consequences of our digital work.
Sustainable UX is a
“win-win-win.” It’s better for the planet because it reduces energy
consumption. It’s better for the user because it results in faster, more
responsive interfaces. And it’s better for the business because it
lowers hosting costs AND improves conversion rates.
The era of
“unlimited pixels” is over. In 2026, the most sophisticated design is
the one that leaves the smallest footprint. We are no longer just
designers; we are the guardians of the user’s battery, their data plan,
and ultimately, the environment.
The Call To Action
I challenge you to audit just one page of your current project today. Use a tool like the Website Carbon Calculator
to see its impact. Then, look for the “invisible waste.” Can that image
be an SVG? Can that video be a static hero? Can that “loud” animation
be silenced?
Start small. The most elegant solution is often the one with the fewest bytes.
What
makes streaks so powerful and addictive? To design them well, you need
to understand how they align with human psychology. Victor Ayomipo
breaks down the UX and design principles behind effective streak
systems.
I’m sure you’ve heard of streaks or used an
app with one. But ever wondered why streaks are so popular and powerful?
Well, there is the obvious one that apps want as much of your attention
as possible, but aside from that, did you know that when the popular
learning app Duolingo introduced iOS widgets to display streaks, user commitment surged by 60%.
Sixty percent is a massive shift in behaviour and demonstrates how
“streak” patterns can be used to increase engagement and drive usage.
At its most basic, a streak is the number of consecutive days that a user completes a specific activity. Some people also define it as a “gamified” habit or a metric designed to encourage consistent usage.
But
streaks transcend beyond being a metric or a record in an app; it is
more psychological than that. Human instincts are easy to influence with
the right factors. Look at these three factors: progress, pride, and fear of missing out (commonly called FOMO). What do all these have in common? Effort.
The more effort you put into something, the more it shapes your
identity, and that is how streaks crosses into the world of behavioural
psychology.
Now, with great power comes great responsibility, and because of that, there’s a dark side to streaks.
In
this article, we’ll be going into the psychology, UX, and design
principles behind building an effective streak system. We’ll look at (1)
why our brains almost instinctively respond to streak activity, (2) how
to design streaks in ways that genuinely help users, and (3) the
technical work involved in building a streak pattern.
To
design and build an effective streak system, we need to understand how
it aligns with how our brains are wired. Like, what makes it so
effective to the extent that we feel so much intense dedication to
protect our streaks?
There are three interesting, well-documented psychology principles that support what makes streaks so powerful and addictive.
Loss Aversion
This is probably the strongest force behind streaks. I say this because most times, you almost can’t avoid this in life.
Think
of it this way: If a friend gives you $100, you’d be happy. But if you
lost $100 from your wallet, that would hurt way more. The emotional
weight of those situations isn’t equal. Loss hurts way more than gain
feels good.
Let’s take it further and say that I give you $100 and
ask you to play a gamble. There’s a 50% chance you win another $100 and
a 50% chance you lose the original $100. Would you take it? I wouldn’t.
Most people wouldn’t. That’s loss aversion.
If you think about it, it is logical, it is understandable, it is human.
The
concept behind loss aversion is that we feel the pain of losing
something twice as much as the pleasure of gaining something of equal
value. In psychological terms, loss lingers more than gains do.
You
probably see how this relates to streaks. To build a noticeable streak,
it requires effort; as a streak grows, the motivation behind it begins
to fade; or more accurately, it starts to become secondary.
Here’s an example: Say your friend has a three-day streak closing their “Move Rings” on their Apple Watch.
They have almost nothing to lose beyond wanting to achieve their goal
and be consistent. At the same time, you have an impressive 219-day
streak going. Chances are that you are trapped by the fear of losing it.
You most likely aren’t thinking about the achievement at this point;
it’s more about protecting your invested effort, and that is loss
aversion.
Now that we understand the fear of losing the effort invested in longer streaks, another question is: What makes us do the thing in the first place, day after day, even before the streak gets big?
That’s what the Fogg Behaviour Model
is about. It is relatively simple. A behaviour (B) only occurs when
three factors — Motivation (M), Ability (A), and Prompt (P) — align at
the same moment. Thus, the equation B=MAP.
If any of these factors, even one, is missing at that moment, the behaviour won’t happen.
So, for a streak system to be efficient and recurring, all three factors must be present:
Motivation This
is fragile and not something that is consistently present. There are
days when you’re pumped to learn Spanish, and days you don’t even feel
an iota of willpower to learn the language. Motivation by itself to build a habit is unreliable and a losing battle from day one.
Ability To compensate for the limitations of motivation, ability
is critical. In this context, ability means the ease of action, i.e,
the effort is so easy that it’s unrealistic to say it isn’t possible.
Most apps intentionally use this. Apple Fitness just needs you to stand
for one minute in an hour to earn a tick towards your Stand goal.
Duolingo only needs one completed lesson. These tasks do not require all
that much effort. The barrier is so low that even on your worst days,
you can do it. But the combined effort of an ongoing streak is where the
idea of losing that streak kicks in.
Prompt This is what completes the equation. Humans are naturally forgetful, so yes, ability can get us 90% there. But a prompt
reminds us to act. Streaks are persistent by design, so users need to
be constantly reminded to act. To see how powerful a prompt can be, Duolingo did an A/B test to see if a little red badge on the app’s icon increased consistent usage. It produced a 6% increase in daily active users. Just a red badge.
Model Limitation
All
this being said, there is a limitation to the Fogg model whereby
critics and modern research have noticed that a design that relies too
heavily on prompts, like aggressive notifications, risks creating mental
fatigue. Constant notifications and overtime could cause users to
churn. So, watch out for that.
The Zeigarnik Effect
How
do you feel when you leave a task of project half-done? That irritates
many people because unfinished tasks occupy more mental space than the
things we complete. When something is done and gone, we tend to forget
it. When something is left undone, it tends to weigh on our minds.
This
is exactly why digital products use artificial progress indicators,
like Upwork’s profile completion bar, to let a user know that their
profile is only “60% complete”. It nudges the user to finish what they
started.
Upwork’s profile completion progress bar.
Let’s
look at another example. You have five tasks in a to-do list app, and
at the end of the day, you only check four of them as completed. Many of
us will feel unaccomplished because of that one unfinished task. That,
right there, is the Zeigarnik effect.
The Zeigarnik effecthe
was demonstrated by psychologist Bluma Zeigarnik, who described that we
tend to keep incomplete tasks active in our memory longer than
completed tasks.
A streak pattern naturally taps into this in UX
design. Let’s say you are on day 63 of a learning streak. At that point,
you’re in an ongoing pattern of unfinished business. Your brain would
rarely forget about it as it sits in the back of your mind. At this
point, your brain becomes the one sending you notifications.
When
you put these psychological forces together, you begin to truly
understand why streaks aren’t just a regular app feature; they are
capable of reshaping human behaviour.
But somewhere along the line
— I can’t say exactly when, as it differs for everyone — things reach a
point where a streak shifts from “fun” to something you feel you can’t
afford to lose. You don’t want 58 days of effort to go to waste, do you?
That is what makes a streak system effective. If done right, streaks help users build astounding habits that accomplish a goal. It could be reading daily or hitting the gym consistently.
These
repeated actions (sometimes small) compound over time and become
evident in our daily lives. But there are two sides to every coin.
The Thin Line Between Habit And Compulsion
If
you have been following along, you can already tell there’s a dark side
to streak systems. Habit formation is about consistency with a repeated
goal. Compulsion, however, is the consistency of working on a goal that
is no longer needed but held onto out of fear or pressure. It is a
razor-thin line.
You brush your teeth every morning without
thinking; it is automatic and instinctive, with a clear goal of having
good breath. That’s a streak that forms a good habit. An ethical streak
system gives users space to breathe. If, for some reason, you don’t
brush in the morning, you can brush at noon. Imperfection is allowed
without fear of losing a long effort.
Compulsion takes the
opposite route, whereby a streak makes you anxious, you feel guilty or
even exhausted, and sometimes, it feels like you haven’t accomplished
anything, despite all your work. You act not because you want to, but
because you’re subconsciously terrified of seeing your progress reset to
zero.
Someone even described this perfectly, “I felt that I was cheating, but simply did not care. I am nothing without my streak”.
This shows the extreme hold streaks can have on an individual. To the
extent that users begin to tie their self-worth to an arbitrary metric
rather than the original goal or reason they started the streak in the
first place. The streak becomes who they are, not just what they do.
A well-designed ethical streak system should feel like encouragement
to the user, not pressure or obligation. This relates to the balance of
intrinsic and extrinsic motivation. Extrinsic motivation (external
rewards, avoiding punishment) might get users started, but intrinsic
motivation (doing the task for a personal goal like learning Spanish
because you genuinely want to communicate with a loved one) is stronger
for long-term engagement.
A good system should gravitate towards
intrinsic motivation with careful use of extrinsic elements, i.e.,
remind users of how far they have come, not threaten them with what they
might lose. Again, it is a fine line.
A simple test when
designing a streak system is to actually take some time and think
whether your products make money by selling solutions to anxiety that
your product created. If yes, there’s a high chance you are exploiting
users.
So the next question becomes, If I choose to use streak, how do I design it in a way that genuinely helps users achieve their goals?
The UX of Good Streak System Design
I
believe this is where most projects either nail an effective streak
system or completely mess it up. Let’s go through some UX principles of a
good streak design.
Keep It Effortless
You’ve probably heard this before, maybe from books like Atomic Habits,
but it’s worth mentioning that one of the easiest ways habits can be
formed is by making the action tiny and easy. This is similar to the ability factor we discussed from the Fogg Behaviour Model.
If
a daily action requires willpower to complete, that action won’t make
it past five days. Why? You can’t be motivated five days in a row.
Case
in point: If you run a meditation app, you don’t need to make users go
through a 20-minute session just to maintain the streak. Try a single
minute, maybe even something as small as thirty seconds, instead.
As the saying goes, little drops of water make the mighty ocean.
Small efforts compile into big achievements with time. That should be
the goal: remove friction, especially when the moment might be
difficult. When users are stressed or overwhelmed, let them know that
simply showing up, even for a few seconds, counts as effort.
Humans
are visual by nature. Most times, we need to see something to believe;
there’s this need to visualize things to understand them better and put
things into perspective.
This is why streak patterns often use
visual elements, like graphs, checkmarks, progress rings, and grids, to
visualize effort. Look at GitHub’s contribution graph. It is a simple
visualization of consistency. Yet developers breathe it in like oxygen.
The contributions graph displayed on a GitHub user profile.
The key is not to make a streak system feel abstract.
It should feel real and earned. For instance, Duolingo and Apple’s
Fitness activity rings use clean animation designs on completion of a
streak, and GitHub shows historical data of a user’s consistency over
time.
Apple Watch Fitness shows a limited animated badge on completion of all three Activity rings. (Image source: Apple)
I
mentioned earlierthat humans are generally forgetful by nature, and
that prompts can help maintain forward momentum. Without prompts, most new
users forget to keep going. Life can get busy, motivation disappears,
and things happen. Even long-time users benefit from prompts, though
most times, they are already locked inside the habit loop. Nevertheless,
even the most committed person can accidentally miss a day.
Your streak system most definitely needs reminders. The most-used prompt reminders are push notifications.
Timing really matters when working with push notifications. The type of
app matters, too. Sending a notification at 9 a.m. saying “You haven’t practiced today”
is just weird for a learning app because many have things to do in the
day before they even think about completing a lesson. If we’re talking
about a fitness app, though, it is reasonable and maybe even expected to
be reminded earlier in the day.
Push notifications vary significantly by app category.
Fitness apps, for instance, see higher engagement with early morning
notifications (7–8 AM), while productivity apps might perform better in
early noon. The key is to A/B test your app’s timing based on your
users’ behaviours rather than assuming things are one-size-fits-all.
What works for a meditation app might not work for a coding tracker.
Other prompt methods are red dots on the app icon and even app widgets. Studies vary, but the average person unlocks their device between 50-150 times a day
(PDF). If a user sees a red dot on an app or a widget that indicates a
current streak every time they unlock their phone, it increases
commitment.
Just don’t overdo it; the prompt should serve as a reminder, not a nag.
Celebrate Milestones
A streak system should try to celebrate milestones to reignite emotions, especially for users deep into a streak.
When
a user hits Day 7, Day 30, Day 50, Day 100, Day 365, you should make a
big deal out of it. Acknowledge achievements — especially for long-time
users.
As
we saw earlier, Duolingo figured this out and implemented an animated
graphic that celebrates milestones with confetti. Some platforms even
give substantial bonus rewards that validate users’ efforts. And this
can be beneficial to apps, such that users tend to share their
milestones publicly on social media.
Another benefit is the
anticipation that comes before reaching milestones. It isn’t just
keeping the streak alive endlessly; users have something to look forward
to.
Use Grace Mechanisms
Life
is unpredictable. People get distracted. Any good streak system should
expect imperfection. One of the biggest psychological threats to a
streak system is the hard reset to zero after just a single missed day.
An
“ethical” streak system should provide the user with some slack. Let’s
say you have a 90-day chess learning streak. You have been consistent
for three good months, and one day, your phone dies while traveling, and
just like that, 90 becomes 0 — everything, all that effort, is erased,
and progress vanishes. The user might be completely devastated. The
thought of rebuilding it from scratch is so demoralizing that the effort
isn’t worth it. At worst, a user might abandon the app after feeling
like a failure.
Consider adding a “grace” mechanism to your streak system:
Streak Freeze Allow users to intentionally miss a day without penalties.
Extra Time Allow a few hours (2–3) past the usual deadline before triggering a reset.
Decay Models Instead of a hard reset, the streak decreases by a small amount, e.g., 10 days is deducted from the streak per missed day.
Let’s compare two messages shown to users when a streak breaks:
“You lost your 42-day streak. Start over.”
“You showed up for 42 days straight. That’s incredible progress! Wanna give it another try?”
Both
convey the same information, but the emotional impact is different. The
first message would most likely make a user feel demoralized and cause
them to quit. The second message celebrates what has already been
achieved and gently encourages the user to try again.
Streak Systems Design Challenges
Before
we go into the technical specifics of building a streak system, you
should be aware of the challenges that you might face. Things can get
complicated, as you might expect.
Handling Timezones
There
is a reason why handling time and date is among the most difficult
concepts developers deal with. There’s formatting, internationalization,
and much more to consider.
Let me ask you this: What counts as a day?
We
know the world runs on different time zones, and as if that is not
enough, some regions have Daylight Saving Time (DST) that happens twice a
year. Where do you even begin handling these edge cases? What counts as
the “start” of tomorrow?
Some developers try to avoid this by
using one central timezone, like UTC. For some users, this would yield
correct results, but for some, it could be off by an hour, two hours, or
more. This inconsistency ruins the user experience. Users care less how
you handle the time behind the scenes; all they expect is that if they
perform a streak action at 11:40 p.m., then it should register at that
exact time, in their context. You should define “one day” based on the
user’s local timezone, not the server time.
Sure, you can take the
easy route and reset streaks globally for all users at midnight UTC,
but you are very much creating unfairness. Someone in California always
has eight extra hours to complete their task than someone living in
London. That’s an unjust design flaw that punishes certain users because
of their location. And what if that person in London is only visiting,
completes a task, then returns to another timezone?
One effective
solution to all these is to ask users to explicitly set their timezone
during onboarding (preferably after first authentication). It’s a good
idea to include a subtle note that providing timezone information is
only used for the app to accurately track progress, rather than being
used as personally identifiable data. And it’s another good idea to make
that a changeable setting.
I suggest that anyone avoid directly handling timezone logic in an app. Use tried-and-true date libraries, like Moment.js or pytz (Python), etc. There’s no need to reinvent the wheel for something as complex as this.
Another
challenge you should worry about is uncontrollable edge cases like
users oversleeping, server downtime, lag, network failures, and so on.
Using the idea of grace mechanisms, like the ones we discussed earlier, can help.
A
grace window of two hours might help both user and developer, in the
sense that users are not rigidly punished for uncontrollable life
circumstances. For developers, grace windows are helpful in those
uncontrollable moments when the server goes down in the middle of the
night.
Above all, never trust the client. Always validate on the server-side. The server should be the single source of truth.
Again, I cannot stress this enough: Make sure to validate everything server-side. Users are humans, and humans might cheat if given the opportunity. It is unavoidable.
You might try:
Storing all actions with UTC timestamps. The
client can send their local time, but the server can immediately
convert that to UTC and validate against the server time. That way, if
the client’s timestamp is suspiciously far, the system can reject it as
an error, and the UI can respond accordingly.
Using event-based tracking. In
other words, store a record of each action with metadata including
information like the user’s ID, the type of action performed, and the
timestamp and timezone. This helps with validation.
Building A Streak System Engine
This
isn’t a code tutorial, so I will avoid dumping a bunch of code on you.
I’ll keep this practical and describe how things generally operate a
streak system engine as far as architecture, flow, and reliability.
Core Architecture
As
I’ve said several times, make the serverthe single source of truth for
streak data. The architecture can go something like this on the server:
Store each user’s data in a database.
Store the current streak store (default as 0) as an integer.
Store
the timezone preference, i.e., IANA Timezone string (either implicitly
from local timestamp or explicitly by asking user to select their
timezone). For example, “America/New_York”.
Handle all logic to
determine if the streak continues or breaks, with a timezone check that
is relative to the user’s local timezone.
Meanwhile, on the client-side:
Display the current streak, normally fetched from the server.
Send
action done in the form of metadata to the server to validate whether
the user actually completed a qualifying streak action.
Provide visual feedback based on the server responses.
So,
in short, the brain is on the server, and the client is for display
purposes and submitting events. This saves you a lot of failures and
edge cases, plus makes updates and fixes easier.
Let’s simulate a walkthrough of how a minimal efficient streak system engine would go when a user completes an action:
The user completes a qualifying streak action.
The client sends an event to the server as metadata. This could be “User X completed action Y at timestamp Z”.
The
server receives this event and does basic validation. Is this a real
user? Are they authenticated? Is the action valid? Is the timezone
consistent?
If this passes, the server retrieves the user’s streak data from the database.
Then, convert the received action timestamp to the user’s local timezone.
Let the server compare the calendar dates (not timestamps) in the user’s local timezone:
If it is the same day, then the action is redundant and there is no change in the streak.
If it is the next day, then the streak extends and increments by 1.
If there is a gap of more than one day, the streak breaks. However, this is where you might apply grace mechanics.
If the grace mechanism is missed, then reset the streak to 1.
If
you choose to save historical data for milestone achievements, then
update variables like “longest streak” or “total active days”.
The server then updates the database and responds to the client. Something like this:
As a further measure, the server should either retry or reject and notify the client when anything fails during the process.
Building For Resilience
As
mentioned before, users losing a streak due to bugs or server downtime
is terrible UX, and users don’t expect to take the fall for it. Thus,
your streak system should have safeguards for those scenarios.
If
the server is down for maintenance (or whatever reason), consider
allowing a temporary window of additional hours to get it fixed so
actions can be submitted late and still count. You can also choose to
notify users, especially if the situation is capable of affecting an
ongoing streak.
Note: Establish an admin backdoor
where data can be manually restored. Bugs are inevitable, and some
users would call your app out or reach out to support that their streak
broke for a reason they could not control. You should be able to
manually restore the streaks if, after investigation, the user is right.
Conclusion
One thing remains clear: Streaks are really powerful because of how human psychology works on a fundamental level.
The
best streak system out there is the one that users don’t think about
consciously. It has become a routine of immediate results or visible
progress, like brushing teeth, which becomes a regular habit.
And
I’m just gonna say it: Not all products need a streak system. Should you
really force consistency just because you want daily active users? The
answer may very well be “no”.