TrackSecure Kenya pairs live GPS tracking with remote lock, SIM-change alerts, and recovery tools — so a stolen phone doesn't mean stolen data.
# TrackSecure Kenya
Protect. Track. Recover.
## What's in this build
```
tracksecure/
├── frontend/ Website + installable web app (PWA)
│ ├── index.html Marketing/landing page
│ ├── dashboard.html Login + device dashboard (map, telemetry, recovery tools)
│ ├── manifest.json Makes Chrome offer "Install app"
│ ├── sw.js Service worker (offline caching)
│ ├── css/style.css
│ ├── js/main.js Theme toggle, install prompt, hero animation
│ ├── js/dashboard.js Auth flow, Leaflet map, device switching, recovery actions
│ └── icons/
└── backend/ Node + Express + MongoDB API
├── server.js
├── models/ User, Device, LocationHistory, Command
├── routes/ auth, devices, commands
├── middleware/auth.js JWT verification
└── .env.example
```
## Running it locally
**Frontend** — no build step needed, it's static:
```
cd frontend
npx serve . # or any static file server
```
Open the URL it gives you in Chrome. You'll see an "Install app" button in the
hero and in the install banner — that's the PWA install prompt, and it's what
gives visitors the "download the app" experience you asked for, straight from
Chrome, no app store required. Once installed it opens in its own window, has
its own home-screen icon, and works offline for the pages it's cached.
**Backend**:
```
cd backend
npm install
cp .env.example .env # then fill in MONGO_URI and JWT_SECRET
npm run dev # or: npm start
```
By default `dashboard.html` calls `
localhost`. To point it at
a deployed backend, set `window.TRACKSECURE_API_BASE` before `js/dashboard.js`
loads, or edit the constant at the top of that file.
The map uses Leaflet + OpenStreetMap tiles rather than Google Maps, since that
needs no API key or billing account to embed — it's a drop-in swap for Google
Maps later if you'd prefer that.
## Adding devices
Click **+ Register a device** in the sidebar. It works two ways …