Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

ThinTrack — Virtual Bluetooth Sticker

Presented at the Harvard CS50 Fair — December 8, 2025 Northwest Building, 52 Oxford Street, Cambridge, MA

ThinTrack is a single-page, browser-only simulation of an ultra-thin Bluetooth "sticker" and how a phone app reacts when the sticker is near, getting far, or out of range.

Built as a CS50x final project. No server, no dependencies — open index.html and it runs.


Quick Start

  1. Clone or download this repo
  2. Open index.html in any modern browser — no server required
  3. Use the left-side buttons or keyboard shortcuts:
    • 1 — Sticker is Near
    • 2 — Sticker is Getting Far
    • 3 — Sticker is Out of Range

What It Does

Simulates the full lifecycle of a Bluetooth item tracker:

  • Near — strong signal, green UI, RSSI ~-52 dBm, ~1–2m distance
  • Getting Far — signal dropping, amber UI, RSSI ~-74 dBm, ~6–8m
  • Out of Range — left-behind alert fires, red UI, RSSI ~-90 dBm, >15m

The phone app panel shows real-time signal strength bar, distance estimate, RSSI value, in-app notifications, and a dismissible left-behind alert banner.


Architecture

Modular design in plain vanilla JS — no frameworks:

Layer Responsibility
Model StickerDevice (id, rssi, state, lastSeen, lastPosition)
Logic RSSI → state mapping, telemetry application
AlertEngine Left-behind detection with dismissal suppression
UI Labels, status chips, signal bar, phone shell animations

Files

File Description
index.html App markup — dual-panel layout (hardware sim + phone UI)
style.css Dark theme, animations, responsive layout
script.js Modular vanilla JS — Model/Logic/UI/AlertEngine

Configuration

Thresholds and timings are configurable in script.js:

const CONFIG = {
  RSSI: {
    NEAR: -52,
    FAR: -74,
    OUT: -90,
    LEFT_BEHIND: -85,   // threshold for left-behind alert
    HYSTERESIS: 3
  },
  TIMERS: {
    ALERT_DELAY_MS: 700,
    UI_ANIM_MS: 300
  }
};

Console API

ThinTrack.setNear()              // simulate near state
ThinTrack.setFar()               // simulate far state
ThinTrack.setOut()               // simulate out of range
ThinTrack.clearNotifications()   // clear phone notification list

CS50 Fair

Presented at the Harvard CS50 Fair — December 8, 2025 Northwest Building, 52 Oxford Street, Cambridge, MA

CS50 is Harvard University's introduction to computer science, one of the most widely taken courses globally. The CS50 Fair is an end-of-year showcase where students present their final projects.


Part of a broader cybersecurity portfolio — GIAC GCIH | GSEC 97% | GIAC Advisory Board Member

About

Virtual Bluetooth sticker simulation — presented at Harvard CS50 Fair, December 2025 | Vanilla HTML/CSS/JS, no dependencies

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages