Documentation

Cigs Counter — Complete User Guide

Overview & Features

Cigs Counter is a zero-install, browser-based cigarette tracker. There is no account, no server, no subscription. Everything lives in your browser — you open the page, tap once per cigarette, and your history builds up automatically.

The philosophy is simple: awareness precedes change. Most smokers underestimate their daily consumption by 20–30%. Seeing the real number — in real time, every day — is the first step to changing it.

🚬
One-Tap Logging
A single tap adds a cigarette to today's count with timestamp. The count flashes and particles confirm the tap — no ambiguity.
⏱️
Live Craving Timer
Counts time since your last cigarette in HH:MM:SS. Color-coded red/amber/green based on elapsed time. Use it to delay cravings.
📊
14-Day Bar Chart
A canvas-rendered chart of the rolling 14-day window. Today's bar is highlighted bright amber. Previous days dim. Count labels above each bar.
📈
3 Live Stats
7-day average, all-time daily maximum, and cumulative total. All recalculate on every log so you always see current numbers.
🌐
10 Languages
Full UI translation for EN, ES, FR, DE, PT, RU, AR, ZH, JA, HI — including RTL layout for Arabic. Language is remembered across sessions.
🔒
100% Private
All data is stored in your browser's localStorage. Nothing is ever sent to a server. No analytics, no tracking, no ads.

Logging Cigarettes

Tapping the Button

The large circular button at the centre of the app is the only thing you need to use. Tap it once each time you light a cigarette — not after, not before. The moment you light up is the right time to tap. This ensures the timestamp recorded is accurate for the craving timer.

Tip: Add the app to your phone's home screen (iOS: Share → Add to Home Screen; Android: menu → Add to Home Screen). It will open full-screen, making it faster to reach than unlocking and searching for a bookmark.

Undo

Tapped by accident? The ↩ Undo button removes the most recent entry — both the count and its timestamp. There is no multi-level undo, so if you tap undo twice you will lose two entries.

Reset Today

The Reset today button (bottom-right, below the chart) sets today's count back to zero and removes all of today's timestamps. A confirmation dialog prevents accidental resets. Historical days are never affected.

Logging Tips

The Craving Timer

The timer below the main counter shows elapsed time since your last cigarette. It updates every second. The colour and status label change as time progresses, giving you instant feedback on where you are in your craving cycle.

Freshly Lit
0–5 minutes. You just smoked. The nicotine is still entering your bloodstream. No useful craving data yet.
Craving Zone
5–30 minutes. This is when cravings typically peak and are hardest to resist. Use the timer as a challenge: can you get to 30?
Holding Strong
30+ minutes. A craving has passed. Your baseline gap is growing. This is the state to extend each day.

The Progress Bar

The thin bar beneath the status label fills over 60 minutes. At zero it's empty; at 60 minutes it's full. This gives you a visual sense of your gap duration without doing mental arithmetic on the timer. The bar colour mirrors the state: red → amber → green.

Using the Timer to Delay Cravings

Nicotine cravings peak within 3–5 minutes and then fade on their own. When you feel the urge to smoke, check the timer:

  1. Note the current time shown on the timer.
  2. Set a mental goal to wait 10 more minutes.
  3. Do something else — walk, drink water, check messages.
  4. Return and check: the craving will usually have diminished significantly.
  5. If it persists, negotiate another 5 minutes with yourself.
  6. Each successful delay extends your average gap and reduces your daily count.
Science note: Each time you delay rather than immediately satisfy a craving, you weaken the automatic stimulus-response loop. Repeated delay training is one of the most effective behavioral techniques for smoking cessation — no medication required.

Stats Reference

The three stat cards beneath the timer update in real time every time you log or undo a cigarette.

7-Day Avg
Average daily cigarettes over the last 7 calendar days (including today). Days with no data (including before you started) count as 0. This is your most useful trend indicator — it smooths out one-off bad days.
Daily Max
The highest single-day count ever recorded. This is your historical worst day. As you reduce, watch this number stay constant while your average drops away from it — a sign of real progress.
All-Time
The cumulative total of every cigarette ever logged in this browser. This is the raw number — it will always go up. Use it for personal reflection, not daily motivation.

The "Last smoked" Indicator

To the right of the Undo button, a small indicator shows how many minutes ago you last smoked (rounded down). This is a quick-glance version of the full timer for when you are in the middle of a conversation and don't want to scroll up to the timer block.

14-Day Chart

The bar chart displays a rolling 14-calendar-day window ending on today. It is rendered on an HTML canvas element and redraws on every log and on window resize (fully responsive).

Reading the Chart

What a Good Trend Looks Like

You're looking for a descending staircase pattern over weeks — not a straight line down, but an overall slope where each week's average is lower than the previous. Some bars will be higher than their neighbors; that's normal. The 7-day average stat is more reliable than any single bar.

Note: The chart shows calendar days, so if you just started, many bars will be empty (zero). That's fine — those empty bars represent days of zero consumption, which is your goal.

The 6-Week Quit Plan

This is the recommended framework for using Cigs Counter to reach zero. It is designed around gradual behavioral reduction — the approach with the highest real-world success rate for long-term cessation.

Week 1
Establish Your Baseline — Log Everything, Change Nothing
Do not try to cut down. Your only job this week is to log every single cigarette honestly. You need to know your real number — not the number you think you smoke. Most people are surprised: their actual count is 20–30% higher than their estimate. By the end of week 1, you'll have 7 days of data and a reliable 7-day average. That average is your baseline.
Week 2
Observe Your Patterns — Identify Triggers
Continue logging. Now start paying attention to when the count climbs. Are there spikes after meals? During stress? With coffee or alcohol? In a social context? Identifying your personal triggers is more valuable than any medication — once you see the pattern, you can interrupt it consciously. Awareness alone typically reduces consumption by 10–15% without any deliberate effort.
Week 3
First Reduction — Set a Daily Target
Take your week 1 baseline and subtract 2–3. That's your daily target. Watch the counter throughout the day. When you approach your limit, use the timer to push delays. If you exceed your target on some days, that's fine — the average is what matters. The 7-day average stat tells you whether you're trending down. Aim for the average to drop by the end of the week.
Week 4
Second Reduction — Lower Your Target Again
Drop your target by another 1–2 cigarettes. By now your craving delay skills are improving — you've proven to yourself that you can wait out a craving. The 14-day chart will show a visible downward slope. If week 3 felt easy, you can drop by 2 instead of 1. If it was hard, drop by only 1. Listen to your data, not your optimism.
Week 5
Consolidate — Hold and Extend Gaps
Keep the same target from week 4, but focus on extending the gaps between cigarettes rather than just hitting a daily number. If you're at 8 per day, can you go from one every 1.5 hours to one every 2 hours? Longer gaps mean deeper re-wiring of your craving response. The timer's amber "craving zone" will start feeling shorter — because it actually is getting shorter as your tolerance recalibrates.
Week 6
Final Push — Approach Zero
Drop to your final target: 2–3 per day. This is the hardest stretch — the difference between a few and none feels large psychologically. Use the timer aggressively. When you reach 1 per day, commit to one smoke-free day. Then two. When your chart shows consistent zeros, you have quit. Keep logging for 30 more days with zeros — the chart becomes your proof, your monument to the change you made.
Faster packs? If you smoke more than 20 per day, allow 8–10 weeks rather than 6. The reduction rate of 1–2 per week is constant; the timeline scales with your baseline. Don't rush — sustainable is better than fast.

Data & Storage

All data is stored in your browser's localStorage under the key smokelog_v1. The data is a JSON object keyed by calendar date (YYYY-MM-DD):

// Example data structure in localStorage['smokelog_v1'] { "2025-06-01": { "count": 18, "times": [1748768400000, 1748772000000, ...] }, "2025-06-02": { "count": 15, "times": [1748854800000, ...] }, "2025-06-03": { "count": 16, "times": [1748941200000, ...] } }

Each day has a count integer and a times array of Unix timestamps (milliseconds) for each cigarette logged that day.

Important Limitations

Manually Accessing Your Data

If you are comfortable with browser developer tools, you can view, edit, or export your raw data:

  1. Open DevTools (F12 or right-click → Inspect).
  2. Go to Application tab → Storage → Local Storage → cigscounter.onrender.com.
  3. Find the key smokelog_v1.
  4. Copy the value to export, or edit it directly to correct historical data.

Language Preference

Your selected language is stored separately under the key smokelog_lang. Clearing this key resets the language to browser default.

Browser Compatibility

Cigs Counter uses only stable, widely-supported web APIs. It works on any modern browser without plugins or downloads.

Chrome
Full support. Chrome on Android recommended for home-screen install.
Safari
Full support on iOS and macOS. Add to Home Screen works on iOS 16.4+ for basic PWA behavior.
Firefox
Full support on desktop and Android.
Edge
Full support (Chromium-based).
Samsung Internet
Full support.
Private / Incognito
The app works, but localStorage is session-only. Data is lost when you close the tab. Do not use incognito mode if you want to keep your history.

JavaScript Required

The app requires JavaScript to be enabled. All core functionality — logging, timer, chart, translations — is implemented in JavaScript. Without it, you will see an empty page.

Frequently Asked Questions

What if I forget to log a cigarette?

Just log it when you remember, or skip it and move on. The goal is awareness and trend data — minor gaps in logging do not ruin the usefulness of the history. If you find you consistently forget, try using the last smoked indicator as a cue: if you can't remember when you last tapped, you probably forgot one.

Can I edit a past day's count?

There is no UI for editing historical data. Advanced users can access the raw JSON in localStorage['smokelog_v1'] via browser DevTools and edit values directly. Changes take effect immediately on next render. See the Data & Storage section for instructions.

Will the app send my data anywhere?

No. The app has no server-side component and makes no network requests after the initial page load (except to Google Fonts for typography). See the Privacy section on the About page for a full declaration.

What does "freshly lit" vs "craving zone" vs "holding strong" mean?

These are the three timer states: under 5 minutes (freshly lit — nicotine still entering bloodstream), 5–30 minutes (craving zone — peak withdrawal window), and 30+ minutes (holding strong — craving has passed). See the Timer section for full details.

Why is today's bar brighter in the chart?

Today's bar is highlighted in bright amber so you can immediately compare your current day's count against your historical bars without needing to read the date range. All previous days appear in a dimmer gold-brown.

Can I use the app in Arabic or Hebrew (RTL)?

Arabic (AR) is fully supported with RTL layout — the language bar alignment, timer status, and reset button all flip correctly. Hebrew is not currently a supported language but the RTL infrastructure could support it with a translation addition.

Does the app work on a smartwatch?

It is not optimised for smartwatch screens, but it will load in a watch browser if available. The large tap target of the main button may still be usable.

Is there a dark mode / light mode toggle?

The app has a single dark theme that is tuned for discretion — easy to open and close without drawing attention. A light mode is not currently planned.

Troubleshooting

My data is gone

This most commonly happens after: clearing browser history/cache/site data, switching browsers, switching devices, or using private/incognito mode. localStorage is per-browser-per-origin with no automatic sync. Data cannot be recovered once the storage is cleared.

The chart doesn't update

Try scrolling down to the chart and tapping the log button again. The chart redraws on every addCig/undoCig call and on window resize. If the chart is completely blank, check that your browser's canvas API is not disabled by a privacy extension.

The timer shows "—" even after logging

The timer only shows a value if today.times has at least one entry. If today's data shows a count but no timestamps, you may have data from before the timestamp feature was added. Adding a new log will start the timer.

The language reverted to English

The language preference is stored in localStorage under smokelog_lang. If it was cleared along with other site data, the app falls back to your browser's navigator.language. Re-select your preferred language from the bar at the top.

Fonts aren't loading

The display font (Bebas Neue) and body font (IBM Plex Mono) are loaded from Google Fonts. If you are offline at page load, or Google Fonts is blocked in your region, the app will fall back to system sans-serif and system monospace fonts respectively. All functionality still works.

Something else is wrong

Open the browser's JavaScript console (F12 → Console) and check for errors. If you find a reproducible bug, take note of the error message, your browser version, and the steps to reproduce it.