Strict focus suite with:
- a Windows desktop timer app,
- a native blocking engine,
- Firebase-backed cloud sync,
- and a hosted web dashboard.
- Starts focus sessions with website/app blocking.
- Forces intentional early exit via one unlock method:
- Hard Math challenge, or
- QR challenge.
- Tracks exact focus duration in seconds.
- Marks sessions as early terminated when closed before target duration.
- Syncs session records to Firestore.
- Shows stats in a web dashboard (heatmap + session table).
If you are just using the app, this is the only section you need.
git clone https://github.com/letsjoyn/just-do-it.git
cd just-do-it
py -m pip install --upgrade pip
py -m pip install qrcode[pil] opencv-python pygameOpen PowerShell as Administrator, then:
cd path\to\just-do-it
py just_do_it.pyAdmin rights are required because the engine can update host blocking and manage blocked processes.
- Enter email + password in the desktop app.
- Use the same account later on the website dashboard.
- Set timer duration.
- Choose unlock mode:
math: solve a generated hard expression.qr: show your secret unlock QR to webcam.
- Click Start.
- Blocker engine enforces configured restrictions.
- Timer counts down in app.
- Screen usage is sampled for logging.
- Full completion: when timer hits zero, session is logged as normal (
early_terminated = false). - Early close: click Stop and complete your chosen unlock challenge. Session is logged with actual elapsed seconds and
early_terminated = true.
- Click Dashboard in the app, or open:
https://just-do-it-1fa38.web.app
- Login using the same account.
- Dashboard shows:
- logged-in email in header,
- total sessions,
- total focus duration,
- activity heatmap,
- session table with Date, From-To, Duration, Unlock Method, Early Term.
just_do_it.py- Desktop UI (Tkinter), auth calls, timer lifecycle, session logging, cloud sync queue handling.
engine.cpp/engine.exe- Native enforcement engine (blocking/unblocking behavior).
web/index.html- Login + dashboard UI shell.
web/dashboard.js- Firebase Auth state, Firestore read, KPI/heatmap/table rendering.
- Firebase Authentication
- User identity for both desktop app and website.
- Firestore
- Source of truth for synced sessions.
- Firebase Hosting
- Serves website dashboard.
flowchart LR
A["User starts timer in desktop app"] --> B["just_do_it.py session runtime"]
B --> C["engine.exe enforce block rules"]
B --> D["Collect elapsed seconds and unlock method"]
D --> E{"Session ended how"}
E -->|Timer completed| F["early_terminated false"]
E -->|Stopped before target and unlocked| G["early_terminated true"]
F --> H["Create session payload"]
G --> H
H --> I["sync_payload.json queue"]
I --> J{"Network or API success"}
J -->|Yes| K["Write to Firestore user sessions collection"]
J -->|No| L["Keep in local queue for retry"]
L --> I
K --> M["Hosted website dashboard.js"]
M --> N["Firebase Auth user session"]
N --> O["Read Firestore by logged-in uid"]
O --> P["Render heatmap, table, and KPIs"]
- User authenticates in app.
- App starts timer and notifies engine to enforce restrictions.
- On completion or successful unlock termination:
- App computes
duration_seconds. - App sets
early_terminatedaccurately. - App prepares session payload.
- App computes
- App attempts Firestore write.
- If cloud write fails, session stays in local queue for later retry.
- User logs in on hosted dashboard.
dashboard.jswatches Firebase Auth state.- On authenticated state:
- hides login-only note/footer,
- shows dashboard and user email,
- fetches sessions from
users/{uid}/sessionsordered by date.
- UI computes:
- total sessions,
- total duration,
- heatmap intensity,
- table rows including Date and From-To range.
Each stored session includes (primary fields):
date: end timestamp of sessionduration_seconds: actual elapsed duration in secondsearly_terminated: booleanunlock_method:mathorqrblocked_items: blocked targets list used by sessionscreen_time: captured activity sample metadata
auth.json- Local auth metadata/token cache.
sync_payload.json- Pending unsynced queue (retry source).
local_sessions.json- Local archive copy.
screen_time.log- Foreground/app activity capture log.
secret_unlock_qr.png- Generated QR for QR unlock mode.
Note: runtime files should not be committed.
just_do_it.py Desktop app, timer, auth, sync
engine.cpp Native blocker engine source
engine.exe Built blocker engine binary
web/index.html Dashboard page structure/styles
web/dashboard.js Dashboard data/auth/render logic
web/output-onlinepngtools.png Meme asset
firebase.json Hosting config
.firebaserc Firebase project mapping
firebase login
firebase use just-do-it-1fa38
firebase deploy --only hostingFrom project root, serve web/ using any static server, then open browser.
- Fixed logic now snapshots elapsed time when termination is requested and logs
early_terminated=trueif user closes before target. - Ensure you are running latest
just_do_it.py.
- Confirm app and website use the same Firebase account.
- Confirm Firestore rules allow authenticated reads/writes for that user path.
- Confirm sessions exist in
users/{uid}/sessions.
- Run from source with Python (recommended).
- Prefer Administrator shell for full blocking support.
- Current app Dashboard button opens hosted site:
https://just-do-it-1fa38.web.app
- Release automation workflows were intentionally removed to reduce noisy failures.