Repository navigation
Development Guide
GlomarGadaffi edited this page Jun 4, 2026
·
1 revision
- Node.js 18+
- npm 9+
- Chrome or Edge for testing (Web Serial API required)
- A BCD325P2 scanner for hardware testing (optional — UI changes can be developed without hardware)
git clone https://github.com/GlomarGadaffi/BearSentinel.git
cd BearSentinel
npm installnpm run devThe dev server starts with HTTPS enabled (configured in vite.config.ts). You will need a local TLS certificate and key; paths are configured in vite.config.ts. If you do not have certificates, you can temporarily disable HTTPS — Chrome's localhost exemption for the Web Serial API typically covers plain HTTP on localhost.
Why HTTPS? The Web Serial API is a "powerful feature" that browsers require to run in a secure context.
npm run buildVite compiles TypeScript, bundles React, and runs vite-plugin-singlefile to inline all CSS, JavaScript, and assets into a single .html file in the dist/ directory.
npm run lint-
No external network requests — the application must remain fully offline. Do not add
fetch()calls, CDN script tags, or any external resource references. -
No server dependency — the built output must open as a plain file (
file://protocol). - State flows through SentinelStore — components must not maintain their own copies of scanner data.
-
Serial access is a singleton — use the exported
Serialsingleton fromSerialMonitor.ts. Do not instantiateSerialMonitordirectly in components. - TypeScript strict mode — all new code must compile without errors.
- Open
src/core/AgencyDB.ts - Add an entry to the
DBobject under the appropriate category (INT,FHP,FWC,FDLE,LOC, orTEC) - Key is the frequency/talkgroup code string; value is
{ a: 'ABBR', n: 'Full Agency Name' } - If adding a new category, also add it to
agClass()andagColor()
Grant Feed is empty but scanner is on a trunked system
- Confirm "Extended Control Channel Output" is enabled on the BCD325P2
- Open the Raw Log Drawer — if also empty, the serial connection is not passing data
- Confirm you selected the correct port in the browser permission dialog
LCN Map is not building
- The LCN map populates from grant messages. No active traffic = empty map. Expected behavior.
this-binding crash (resolved)
- Fixed in commit
685aa41(April 10, 2026). Update to main if on an older version.
| Date | Key changes |
|---|---|
| Feb 3, 2026 | Initial commit |
| Feb 5, 2026 | Multiple README iterations, initial file uploads |
| Mar 15, 2026 | Added cc_hunter.py
|
| Apr 10, 2026 | Core architecture rewrite; this-binding crash fix; HTTPS dev server |