Competition Mix
Best Categories (PASS niches)
Recent Validations
Export
Export your niches, picks, or memory as JSON or CSV.
| Niche | Score | Verdict | Competition |
|---|
No niches match your filters.
Niche Finder expand → rank → validate
Type a topic — we expand it with live Amazon searches + the web, generate specific sub-niches, score each with the honest validator, and rank by opportunity.
Opportunity Board instant · curated library
PA-API is free but needs an Amazon Associates account (approval requires 3 qualifying sales in 180 days). Until then add a key below: Keepa gives real BSR + price + bought-per-month, while ScraperAPI / Outscraper / SerpAPI have free tiers for listings.
Turns the "unavailable" source tiles green. Both are free: YouTube Data API v3 (Google Cloud key) and a Reddit script app (client id/secret + account).
Browse Amazon as yourself and the capture companion saves the real shelf (titles, prices, ratings, BSR, category rank) into your account — no paid key, no server scraping. It only reads pages you already opened and pauses on Amazon verification pages.
Chrome / Edge / Brave · Firefox · Any browser (userscript) — then paste a token below into the companion.
app/captured/
Quick Niche Validation
No paid Amazon key? Download the free capture companion — it records the shelf you already browse. Then generate a token.
Tracked Niches
Watch niches over time — we re-check them and flag what changed. Free accounts watch up to 3; Premium re-checks on demand and daily.
Loading…
Red-Light Scanner
Live Market Check
Manual Validation (book protocol) ▾
ROI Calculator ▾
Playbook
The operating rules behind every validation. Background checks re-verify this guidance against the live library so it stays current.
Market Intelligence
Continuously discovered and re-scored niches. Every row is versioned evidence; captured BSR and price history sharpen each new evaluation.
My Publication Pipeline
Add to Memory
Upload a PDF to Memory
Stored Memory
Validation History
Pre-flight History
Readiness trend across every saved pre-flight run. Pick a book to see its score history, per-run deltas and any run's full report.
Choose a book to see its pre-flight trend.
Research Studio web + your library
one box · any topic, question or URLAsk anything. We fan out to every search engine you have, read the strongest pages, and ground the answer in your own uploaded books — then let you save the whole session as a citable brief that writes your chapters.
Sources & providers ▾
My Library offline corpus
Upload source books — TXT / MD / PDF / EPUB (full text extracted locally) plus PNG / JPG images and MP4 video (embedded text/metadata only — no OCR). Up to 20 MB. Or paste a URL to save a web page — a YouTube link pulls the full video transcript. Everything grounds the My library answer and the Author Studio's "Ground with research" toggle.
Specialist tools — combine sources & mine keywords
Build Authoring Brief combine sources
Combine every uploaded source on a topic into one professional, referenced brief (overview + key material + gaps). Use it as the backbone for authoring — save it back so chapters ground on it.
Keywords & Title Ideas from Research
Mining the library for the strongest keywords and fresh title angles on a topic — great for sharpening a niche's keyword list before writing.
Amazon Keyword Expander live autosuggest
Turn one seed into up to ~300 real Amazon search phrases — the free A–Z + 0–9 trick the Chrome expanders sell. Strength is how often a phrase surfaces across prefixes (demand evidence, not search volume). Click Validate on any phrase to score it.
Omni Search everything
Research Stack Admin only
Sanitized operator view of scraping, deep search, and AI tools.
Scraping & Live Market Sources
Deep Search Providers
Enabled providers in the research pool.
AI Tools
Registered function-calling tools available to the agent.
Account
Your profile, email security and what we email you. Emails only ever contain what you opt into.
Profile
Notifications
Invite a publisher
Share your link. Friends who join through it get 5 live validations on day one instead of 2. When a friend goes Premium, you earn 10 live market-check credits — once per paying invitee.
Tool usage
Daily budgets reset at midnight UTC. Upgrade for a much larger allowance on every tool.
Security
Changing your password signs out every device, then signs this one back in. Prefer the sign-out button in the header menu (top right) for a plain sign-out.
AI Services
Add OpenAI-compatible providers (OpenAI, Groq, Mistral, Gemini, Ollama, etc.) — pick one as the active backend for Author Studio and Book Assistant. Keys are stored locally and masked on save.
Configured Services
Tool Catalog — scrape · scan · search ▾
| Tool | Category | What it does | Free tier | Status |
|---|
Deep Search Sources ▾
Full Pipeline
validate → book → launch planValidate a niche, generate the book draft, and build a launch plan in one step.
Pipeline Board
Advanced System Diagnosis
Read-only health check of server, database, AI config and on-disk files.
Checks
Automated Test Suite
Run the full test suite in an isolated subprocess — engine, API, frontend and integrations.
Results
About KDP Niche Intelligence Dashboard Admin only
Overview
New here? Open the User Manual (PDF) — a plain-English, picture-filled guide to every feature.
The KDP Niche Intelligence Dashboard is a self-contained, offline-first research tool for Kindle Direct Publishing (KDP). It evaluates 130 curated low-content / journal niches against the scoring rubric of Mastering KDP in 2025, scores each niche out of 14, decides a verdict (PASS / CONDITIONAL / AVOID), and turns every decision into an actionable publishing roadmap. Everything runs locally in pure Python — no pip packages, no frameworks, no tracking. The niche engine, database, and playbook work 100% offline; only the optional Author Studio (OpenAI-compatible LLM) and Web Search (keyless DuckDuckGo or your own provider) make outbound calls, and only when you trigger them. Phases 1–5 complete: token counting, streaming, chapter editor, HTTPS, multi-user auth with admin panel, encrypted API keys, service worker, and 557 automated tests.
Features
- Niche Library — browse all 130 niches with live search, category, verdict and competition filters; drill into a niche for keywords, title ideas, its full score breakdown, and a one-click live market check with per-niche history.
- Live Market Data — one-click live Amazon checks per niche: search-result counts, average reviews, average price, and a Best Sellers Rank probe of the top result, all scored against the same rubric so a clean market can reach PASS. Choose the source with a persisted toggle — Auto (PA-API when keys are configured, else keyless), PA-API, or Keyless. Keyless always measures live Amazon autosuggest demand; listing reviews/BSR come from a shelf you capture with the free browser companion (or a search-page scrape when Amazon allows it — datacenter IPs are often blocked), so the report labels exactly what was and was not measured. Results are cached for an hour, fetches are throttled and retried with backoff, and every check is recorded in the niche's market history.
- Validator — type any niche or phrase. Known niches get their master-report score; brand-new ideas get a provisional score computed on the fly by the same scoring engine.
- Red-Light Scanner — checks a keyword against the global avoid-list (saturated niches, review-farm niches, "Get Rich with YouTube" niches, generic keywords) and explains the flag.
- Playbook — the distilled ruleset: golden rules, BSR target bands, review/search/price rules, royalty examples, content tiers, the global avoid list and a pre-publish checklist.
- My Picks — build a publication pipeline of niches you plan to write.
- Pipeline — the full funnel in one place. Pick a validated niche (or type a new one) and click Run Full Pipeline: it validates against the live market, creates the book draft with its keywords and title ideas, and generates a 4-phase launch & marketing plan — then tracks every pick, its books and its launch progress on one board.
- Launch Plan Generator — one button inside a book turns the niche into a concrete 4-phase selling plan (Pre-Launch: title/cover/description keywords, categories, ARC reviews · Launch: pricing, KDP Select free runs, review velocity · Post-Launch: rank defence, listing tweaks · Scale: ads, ACOS, series). Generated by the configured LLM and grounded on live market data; a deterministic KDP-grounded plan is used offline.
- Memory — store notes, rules, decisions and PDFs (including the master validation report) for future reference.
- History — audit trail of every validation you run, with verdict and score.
- Author Studio — plan a book from any niche or topic, write it chapter by chapter with an inline editor, copy-edit it, audit the draft with local quality metrics, plan a series, track the launch pipeline, and export a KDP-ready manuscript as EPUB / DOCX / PDF / HTML / MD / TXT. Uses the OpenAI API when a key is configured; otherwise runs in offline demo mode. Chapters can be streamed via SSE in real time.
- Book Assistant — an embedded chat assistant with the dashboard's knowledge baked in (niches, picks, playbook rules and your open book). It can outline, draft, critique, or answer KDP questions. Supports SSE streaming, function-calling (the AI can call web search, market check, and MCP tools itself), and chat history that persists across page refreshes.
- Research Vault — upload source books (TXT / MD / PDF, text extracted locally) or fetch web pages into a private corpus; auto-analysis on upload; "Ask the Vault" Q&A with numbered citations; "Authoring Brief" for multi-source briefs; and "Ground with research" so chapters and assistant answers are built only from your vetted material.
- Deep Web Search — one query across every source you enable in Services → Deep Search Sources (keyless DuckDuckGo, DuckDuckGo AI answers, Wikipedia, public SearXNG, free-tier Brave / Tavily / Serper keys, MCP search/fetch servers, OpenAlex academic, Hacker News, Internet Archive, GitHub). It merges and dedupes results, and in Read & brief mode it opens the strongest pages and has the active AI summarize them into a research brief.
- Omni Search — type a word or paste a URL; one query fans out to every deep-search provider, MCP server, web search, the browser-scrape chain, and optional AI synthesis. Results are merged and deduped.
- AI Toolbox — when the active LLM supports function-calling, the Book Assistant can autonomously call any tool (web search, deep research, market check, Amazon suggest, vault search, fetch URL) and any configured MCP server.
- SVG Cover Builder — generate a print-ready book cover as SVG directly in the browser, with customizable title, subtitle, author name, and background colour.
- Publication Pre-Flight — a single publication-readiness gate before you publish, scored across nine weighted categories: Editorial (common typos, repeated words, double punctuation, citation integrity), Structure (TOC ↔ chapters, cross-reference resolution, index order, edition), Interior & Print (trim size, margins, page-count band, spine width), Cover (art present, DPI, thumbnail legibility), Ebook (valid EPUB/PDF/DOCX/HTML files — EPUB mimetype/container/OPF/nav, PDF header, DOCX OOXML, non-empty HTML), Metadata & Discoverability (title/subtitle/author, blurb, 7 backend keywords, 2 categories, series, title overlap), ISBN & Rights, Legal & Compliance (copyright notice, AI disclosure, prohibited content, PII scan, sensitive-topic disclaimers, trademark), Accessibility (heading hierarchy, alt text, descriptive links) and Commercial (price bands, positive royalty, margin, break-even). Every manuscript download is automatically validated; a blocking failure (corrupt file, PII, prohibited content, negative royalty) pauses the export until fixed, while editorial/metadata gaps are advisory. You can still override to export a proofing draft.
- Diagnosis — a read-only health check of the whole tool with an overall HEALTHY / WATCH / NEEDS-ATTENTION verdict.
- Testing — one-click re-run of the entire automated test suite (557 checks) with a live progress bar.
- Multi-User Auth — PBKDF2 password hashing, secure session cookies, admin panel for user management (create, edit, deactivate, promote). Registration is closed after the first user.
- Undo System — soft-delete with a 30-second undo toast on destructive actions.
The Scoring Model (out of 14)
| Component | Points | What it measures |
|---|---|---|
| Competition | 0–5 | Saturation of the search results, top-5 strength and differentiation headroom |
| Demand | 0–3 | BSR strength and sustained monthly search demand |
| Price | 0–3 | Ability to price at the profitable $6.99–$9.99 band with competitive review counts |
| Series | 0–3 | Sequencing potential — can the niche be turned into a book series |
Verdicts: PASS (score ≥ 10 and no red lights), CONDITIONAL (needs an angle check before writing), AVOID (saturated, red-flagged, or below threshold).
Architecture & Tech Stack
- Pure Python 3 standard library — no pip packages, no frameworks.
- engine.py — scoring, validation, keyword generation, title ideas, red-light scan, provisional scoring, ROI, roadmap and the playbook ruleset.
- market.py — live Amazon market data: PA-API v5 SigV4 signing, keyless search-page scraping, autosuggest, a Best Sellers Rank probe, short-TTL result caching, and throttled/retrying HTTP with backoff.
- db.py — SQLite persistence (niches, books, research, users, sessions, audit, undo, market cache, migrations).
- ai.py — LLM client + offline demo, book pipeline, token estimation, prompt sanitization, SSE streaming.
- tools.py — AI toolbox: core tools + dynamic MCP tools, ToolRunner for function-calling.
- research.py — text extraction, corpus search, web search, URL fetching.
- deepsearch.py — multi-source deep search aggregation + research briefs + provider settings.
- omnisearch.py — word-or-URL fan-out across every search/scrape/MCP source.
- mcp.py — MCP client (stdio + HTTP) with health monitoring and process-group cleanup.
- local_mcp.py — Local MCP service manager with watchdog and auto-restart.
- diagnosis.py — 30+ read-only health checks.
- manuscript.py — Manuscript assembly + KDP-ready exports (EPUB / DOCX / PDF / HTML).
- server.py — Threaded HTTP server with session auth, audit logging, rate limiting, encrypted keys, optional HTTPS.
- Frontend — hand-written HTML / CSS / vanilla JS (no build step). Includes service worker, SVG cover builder, virtual scrolling, drag-and-drop, inline chapter editor.
How to Use
- Start the server:
cd app && python3 server.py— it listens on port 8765, seeds the database and admin user on first start. - Open http://localhost:8765 in a browser. Log in with the admin credentials (auto-created on first run).
- Start on Dashboard for the headline numbers, then Niche Library to shortlist categories.
- Use Validator + Red-Light Scanner before committing to any new idea.
- Read the Playbook to internalise the rules, then add winning niches to My Picks.
- Feed your research into Research Vault — upload or fetch; auto-analysis runs on upload. Use Ask the Vault for Q&A with citations, or Deep Web Search + Read & brief for fresh material.
- In Author Studio, create a book, tick Ground with research, and generate the outline and chapters. Use the inline editor to revise any chapter.
- Use Omni Search for quick research across all sources, or the AI Toolbox for autonomous research.
- Re-verify quality from the Testing page — 557 checks run green in an isolated subprocess.
API Reference
| Endpoint | Method | Purpose |
|---|---|---|
| Auth & Users | ||
/api/auth/login | POST | Log in: {email, password} → session cookie |
/api/auth/logout | POST | Log out: invalidates session |
/api/auth/register | POST | Register (open by default; admin/env can close it) |
/api/auth/me | GET | Current user from session cookie or API token |
/api/admin/users | GET/POST | List / create users (admin only) |
/api/admin/users/update | POST | Update a user (admin only) |
/api/admin/users/delete | POST | Deactivate a user (admin only) |
| Dashboard & Niches | ||
/api/overview | GET | Dashboard stats, competition mix, best categories, recent runs |
/api/niches | GET/POST | Full niche list (enriched) with filters; add custom niche |
/api/niches/custom | GET | Custom niche list only |
/api/niches/live | POST | Run a live Amazon market check for a niche |
/api/niches/live/<id> | DELETE | Clear a niche's live verdict |
/api/niches/live/history | GET | Market-check history (niche_id, limit) |
/api/niches/master-update | POST | Re-score all niches from master dataset |
/api/niches/master-update/progress | GET | Poll master-update progress |
/api/niche/<id> | GET | Single niche with parsed keywords and title ideas |
/api/niche/revenue | POST | Revenue estimation for a niche |
/api/niche/bsr-history | POST | BSR history with trend sparkline data |
/api/categories | GET | Distinct Amazon categories |
| Validation & Research | ||
/api/validate | POST | Score a query (matched or provisional) |
/api/validate/manual | POST | Manual BSR-based validation |
/api/validate/enhanced | POST | Enhanced validation with Reddit + Trends + Book signals (8 checks) |
/api/validate/enriched | GET | Full enriched validation: provisional + live intelligence signals |
/api/validate/live | GET | Live market validation (all tools: web, autosuggest, market) |
/api/niche/intelligence | GET | Live intelligence report: Reddit + Trends + Book data for a query |
/api/niche/board | GET | Opportunity board: curated niches ranked by opportunity (free) |
/api/niche/emerging | GET | Rising niches: curated board enriched with live trend signals |
/api/niche/find | POST | Niche finder: expand a seed → generate candidates → rank by opportunity |
/api/niche/find/share | POST | Publish a public, SEO-indexed report of a finder run |
/report/<slug> | GET | Public server-rendered niche report (no auth) |
/api/ai/booktypes | GET | Book type guidance: low/medium/high content + paperback formatting tips |
/api/roi | POST | ROI calculator |
/api/roadmap | POST | Week-by-week publishing roadmap |
/api/suggest | GET | Keyword suggestions for the validator |
/api/redlight | GET | Red-light scan for a keyword |
/api/playbook | GET | The full ruleset |
/api/history | GET | Recent validation runs |
| Memory & Picks | ||
/api/memory | GET/POST | List / add memory entries |
/api/memory/<id> | DELETE | Delete a memory entry (soft-delete, 30s undo) |
/api/memory/pdf | POST | Save a generated PDF report into memory |
/api/picks | GET/POST/DELETE | Manage the publication pipeline |
/api/undo | GET | List recent soft-deleted items |
/api/undo/restore | POST | Restore a soft-deleted item |
| Author Studio & Pipeline | ||
/api/ai/status | GET | LLM configuration status |
/api/ai/books / /api/ai/book/<id> | GET/DELETE | List / inspect / delete books |
/api/ai/book/<id>/outline | POST | Regenerate a book's outline |
/api/ai/outline | POST | Create a book: topic + specs → chapter outline |
/api/ai/chapter | POST | Write the next unwritten chapter; ground:true injects vault research |
/api/ai/copyedit | POST | Copy-edit the assembled draft |
/api/ai/chat | POST | Book Assistant conversation; ground:true enables AI toolbox |
/api/ai/chat/stream | POST | SSE streaming Book Assistant (real-time token streaming) |
/api/ai/chat/history | GET | Persisted chat messages for the current book |
/api/ai/chat/history/clear | POST | Clear chat history for the current book |
/api/tools | GET | AI toolbox: core tools + MCP servers + function-calling support |
/api/ai/quality/<id> | GET | Local quality report (Flesch, repetition, filler, grade A–D) |
/api/ai/export/<id> | GET | Export book as Markdown or TXT |
/api/ai/manuscript/<id> | GET | KDP-ready manuscript (EPUB / DOCX / PDF / HTML) |
/api/ai/series | POST | Plan a book series |
/api/ai/launch/<id> | GET/POST | Track the launch pipeline with stage notes |
/api/ai/launchplan/<id> | POST | Generate a 4-phase launch & marketing plan; ground:true for live research |
/api/pipeline | GET | Pipeline board with chapter and launch-plan progress |
/api/export | GET | Export niches/picks/memory as JSON or CSV |
/api/report/pdf | GET | Serve the master validation PDF |
/api/manual/pdf | GET | Serve the user manual PDF |
| Research Vault | ||
/api/research | GET | List vault entries |
/api/research/upload | POST | Upload a source file — auto-analysed on upload |
/api/research/fetch | POST | Fetch a web page and store in the vault |
/api/research/search?q= | GET | Ranked corpus search with highlighted snippets |
/api/research/<id> | GET/DELETE | Read or remove a vault entry |
/api/research/analyze | POST | Run analysis on a vault entry |
/api/research/analyze/<id> | GET | Read the auto-analysis for a vault entry |
/api/research/qa | POST | Ask a question grounded in the vault — numbered citations |
/api/research/brief | POST | Generate an authoring brief from multiple vault entries |
/api/research/link | POST | Link a vault entry to a book chapter |
/api/research/keywords | GET | Extract keywords from vault content |
| Web & Deep Search | ||
/api/search/web?q= | GET | Keyless web search (DuckDuckGo) |
/api/search/deep | GET/POST | Multi-source deep search (search | research mode) |
/api/search/deep/settings | GET/POST | Deep-search sources: providers, keys, MCP servers |
/api/search/deep/test | GET | Probe one provider → OK/FAIL, hit count, latency |
/api/search/deep/test-mcp | GET | Test an MCP server preset |
/api/omnisearch | GET/POST | Omni Search — word or URL fans out to every source |
| Market Data & Captures | ||
/api/settings/market-source | GET/POST | Live data source: auto | pa-api | keyless |
/api/market/capture | POST | Capture an Amazon search page |
/api/market/capture/browser | POST | Capture via browser automation |
/api/market/capture/url | POST | Capture any URL |
/api/market/captures | GET | List saved captures; ?id= for detail + stats |
/api/market/captures/raw | GET | Download a capture's raw page source |
/api/market/model | GET | Deterministic market-data view: latest score + BSR series (?q=) |
/api/market/captures/refine | POST | LLM-refined market presentation for a capture |
/api/market/captures/deep | POST | Deep-scan: probe product pages for BSR, reviews, rating |
/api/market/captures/<id> | DELETE | Delete a saved capture |
/api/market/mine | POST | Niche miner: capture → reviews → mine → validate |
/api/market/cache/clear | POST | Clear the in-memory market cache |
| Services & System | ||
/api/services | GET/POST | List or update configured services |
/api/services/catalog | GET | Full catalog of available services |
/api/services/catalog/add | POST | Add a custom service |
/api/services/activate | POST | Activate a service by ID |
/api/services/test | POST | Test a service |
/api/audit-log | GET | Audit trail of POST/DELETE actions |
/api/schema/version | GET | Database schema version |
/api/diagnosis | GET | System health: 30+ checks with verdict |
/api/tests/run | POST | Launch the test suite in a subprocess |
/api/tests/progress | GET | Poll test progress and per-test results |
/api/debug/live-smoke | GET | Debug: live smoke test of key endpoints |
File Map
| Path | Role |
|---|---|
app/engine.py | Scoring, validation and ruleset logic |
app/market.py | Live Amazon data (PA-API + keyless scrape, BSR probe, cache, throttling) |
app/db.py | SQLite persistence (niches, books, research, users, sessions, audit, undo, market cache, migrations) |
app/ai.py | LLM client + offline demo, book pipeline, token estimation, prompt sanitization, SSE streaming |
app/tools.py | AI toolbox: core tools + dynamic MCP tools, ToolRunner for function-calling |
app/manuscript.py | Manuscript assembly + KDP-ready exports (EPUB / DOCX / PDF / HTML) |
app/research.py | Text extraction, corpus search, web search, URL fetching |
app/deepsearch.py | Multi-source deep search aggregation + research briefs + provider settings |
app/omnisearch.py | Generic Omni Search — word-or-URL fan-out across every source |
app/mcp.py | MCP client (stdio + HTTP) with health monitoring and process-group cleanup |
app/local_mcp.py | Local MCP service manager with watchdog and auto-restart |
app/diagnosis.py | 30+ read-only health checks |
app/ai_config.json | Runtime config: AI services, API keys (encrypted), market source, deep-search settings |
app/server.py | HTTP API + static serving + session auth + audit + rate limiting + optional HTTPS |
app/static/index.html | HTML shell: auth overlay, all view sections, admin panel, service worker registration |
app/static/style.css | Styles: dark/light theme via CSS variables, responsive layout |
app/static/app.js | Frontend logic: SPA routing, all views, inline editor, virtual scrolling, drag-and-drop, SVG cover |
app/static/sw.js | Service worker: static-asset caching (network-first for API) |
app/tests/ | 17 test modules: 557 checks covering engine, DB, API, AI, market, research, MCP, tools, manuscripts |
niche_validation_data.py | The 130-niche master dataset |
amazon_category_map.py | Category mapping |
2026-KDP-NICHE-VALIDATION-REPORT.pdf | The master validation report |
Testing & QA
The suite in app/tests/ contains 557 checks across 17 test modules, all green:
test_engine_db.py— scoring, validation, keyword generation, title ideas, red-light scan, revenue estimation, BSR history, configurable bands, roadmap, undo system, pick dedup, memory PDF, niche CRUD, custom niche evidence/categorytest_api_security.py— API behaviour, auth flow, session cookies, admin user management, ID validation, CSV formula-injection, rate limiting, static containmenttest_ai.py— AI Author Studio in demo mode: outline, chapter, copy-edit, quality, grounding, chat history, streaming, error paths, 429 retrytest_market.py— Amazon scrape parsing, PA-API preference, caching, throttling, BSR probing, multi-source fallbacktest_market_settings.py— Market data source settings persistencetest_research.py— PDF/TXT extraction, corpus ranking, web search, URL fetching, auto-analysis, Q&A with citationstest_deepsearch.py— Multi-source aggregation, provider merging, research brief looptest_omnisearch.py— Omni search word/URL fan-out, dedup, AI synthesistest_mcp.py— MCP server presets: integrity, tool-pick mapping, stdio/http e2e, preset-mode teststest_local_mcp.py— Local MCP service manager: start/stop/watchdog/process cleanuptest_tools.py— AI toolbox: core tools, dynamic MCP tools, ToolRunner dispatch, function-callingtest_diagnosis.py— System health checks: server, DB, dataset, AI config, engine probestest_manuscript.py— Manuscript exports: EPUB, DOCX, PDF, HTML, MD, TXTtest_calibration.py— Scoring calibrationtest_master.py— Master update pipelinetest_service_catalog.py— Service catalog and provider managementtest_live_smoke.py— Live smoke test (expected skip in offline mode)
Run them anytime from the Testing page — the suite executes in an isolated subprocess so your live data is never touched, and the web/AI calls are stubbed so the run never leaves your machine.
Security & Data
- Multi-user authentication — PBKDF2-HMAC-SHA256 password hashing (260k iterations), secure session cookies (HttpOnly, SameSite=Strict, 7-day expiry), admin-only user management. Registration is closed after the first user.
- HTTPS — optional via self-signed certificate: set
KDP_HTTPS=1env var; cert auto-generated on first start. Requiresopensslon PATH. - Encrypted API keys — stored with machine-derived XOR + HMAC (not plaintext in
ai_config.json). - Rate limiting — per-endpoint rate limits, stricter for
/api/ai/*endpoints. - Audit logging — all POST/DELETE actions logged to
audit_logtable with timestamp, user, action, detail. - Prompt sanitization — user inputs stripped of control chars, length-capped at 8k, wrapped in delimiters to prevent injection.
- Static file containment — realpath guard prevents path traversal; malformed IDs return 400.
- Local data only — all data in a single SQLite database; nothing leaves the machine unless you configure an outbound service.
- Opt-in outbound calls — Web Search hits DuckDuckGo's keyless API (or your provider), Deep Search hits only sources you tick, Author Studio talks to an LLM only when a key is configured. URLs fetched server-side with scheme allowlist, size cap, no cookies/credentials.
- Service worker — caches static assets for offline access; network-first for API ensures freshness.
Limitations & Roadmap
Resolved (Phases 1–5, 40 items):
- Token counting, prompt sanitization, chat persistence, demo banner, toast notifications, theme toggle, DB auto-backup, configurable chapter word count, audit log, revenue estimation, BSR history, configurable BSR bands, chapter drag-and-drop reorder
- DB migration system, market cache in SQLite, MCP health monitoring, connection pooling, Playwright retry/fallback, DB busy timeout, undo system (soft-delete + 30s restore)
- SSE streaming chat, inline chapter editor, niche edit UI, virtual scrolling for large lists
- HTTPS with self-signed cert, encrypted API key storage, service worker, SVG cover builder
- Multi-user auth (PBKDF2, session cookies, admin panel, user CRUD, role-based access)
Remaining (future roadmap):
- High priority: Niche time-series tracking (trend charts), PDF Markdown rendering, multi-provider market fallback chain
- Medium priority: Search result caching, top-3 BSR probing, citation management, KENP manual entry
- Low priority: Search history sidebar, ES module split of app.js, bulk operations, keyboard shortcuts, live integration test suite
Full details: INTEGRATION.md in the project root.
Command Center
One live surface for revenue, growth, market intelligence, AI tooling, systems, people and security. Aggregate data only — no secrets, tokens or PII.
Payments / Revenue
Usage (last 7d)
Today
Traffic (first-party)
Top paths
Referrals
Signup sources (?ref=)
Capture companion funnel
Market intelligence store
Market model calibration
Library seeding (130 niches)
AI provider & tooling
Quick actions
Diagnosis
Background workers
Runtime & storage
Fix-Loop Effectiveness
Measures whether rewriting weak chapters improves publication quality.
Tracks whether auto-rewriting weak chapters actually improves the publication-quality score. Each run compares the book's quality score before vs after the fix loop (uses quality.report()).
People at a glance
User Management
Add users, toggle access, promote to admin or verify emails.
Accounts & Access
Create, verify, promote and manage user accounts.
Security posture
Recent audit
Operator controls
Sales Playbook Editor
Interactive editor for the sales & marketing playbook. Edit structured content (stages, objections, assets, tracking). Admin only.