Bihar Police Notebook is a fully static website: there is no application server, no backend API, and no database in the cloud that the app controls. Every document you write is stored locally in your browser’s IndexedDB, and the optional Google Drive integration copies those documents into your own Drive folder — the app never touches a server of its own. The live editor runs at https://bpdiary.arverma.dev/.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/arverma/Bihar-Police-Notebook/llms.txt
Use this file to discover all available pages before exploring further.
Five external interactions
The system is made up of the browser-hosted editor and five interaction points. Nothing else leaves the device unless you explicitly trigger it.| System piece | Role |
|---|---|
| Editor site | The entire UI: header, document History sidebar, Letter and Diary page templates, overlays, and settings. Served as static files from GitHub Pages. |
| IndexedDB (local) | Primary document store — autosaves every keystroke with a 600 ms debounce. No network required. Two databases: bp-writing-tool (documents) and bp-writing-tool-auth (Drive session). |
| Google Input Tools | Hinglish → Hindi Devanagari transliteration suggestions fetched from inputtools.google.com. Network-dependent; disabled automatically on screens narrower than 768 px (mobile). |
| Google Drive | Optional manual backup into the folder Bihar Police Notebook Backup — do not delete in the user’s own Drive. Uses the drive.file scope — the app can only see files it created. |
| Browser print / PDF | The editor opens a formatted print window and calls window.print(). The browser’s native Save as PDF dialog handles the rest — no PDF library is bundled. |
High-level flow
Editor internals
All application logic lives undereditor/js/. There is no build step for the app itself — the files are loaded directly as ES modules by the browser. The editor/ folder is the deployment artifact: what goes to GitHub Pages is exactly what you see in that directory.
main.js is the only module that touches the DOM at the top level. All other modules export pure functions or small state machines and are imported by main.js (or by each other).Module dependency overview
Phone vs. computer
Behavior diverges atmax-width: 768px:
- Transliteration suggestions are hidden; the OS keyboard handles Hindi input instead.
- The dictation FAB (microphone button) is not shown on mobile.
- Page scaling switches from click-to-zoom to pinch-to-zoom.
Important constants
| Item | Value |
|---|---|
| Live origin | https://bpdiary.arverma.dev |
| Drive folder name | Bihar Police Notebook Backup — do not delete |
| Drive OAuth scope | drive.file (files the app created only) |
| IndexedDB — documents | bp-writing-tool |
| IndexedDB — auth session | bp-writing-tool-auth |
| Mobile breakpoint | max-width: 768px |
| Autosave debounce | 600 ms |