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.
app/captured/
Quick Niche Validation
Red-Light Scanner
Live Market Check
Manual Validation (book protocol) ▾
ROI Calculator ▾
My Publication Pipeline
Add to Memory
Upload a PDF to Memory
Stored Memory
Validation History
Research Vault
Upload source books (TXT / MD / PDF, text extracted locally) or save web pages into a private corpus. The vault is searched to ground chapters and assistant answers: the Author Studio "Ground with research" toggle feeds matching passages into the writing prompt, and the assistant never invents facts when research is available.
Corpus Search
Ask the Vault Q&A
Ask any question about the books you uploaded. Answers are grounded strictly in your vault and cite the exact source with numbered references [1] [2] — nothing invented.
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 to the vault so chapters ground on it.
Web Search
Keyless DuckDuckGo lookup (or your configured provider). Results can be fetched and saved straight into the vault.
Deep Web Search beta
Multi-source research across every free engine you enabled in Setup → AI Services → Deep Search (DuckDuckGo, Wikipedia, SearXNG, free-tier Brave/Tavily/Serper keys, MCP servers). It searches, opens the top pages, and can have the active AI read and summarize them into a research brief.
Vault Contents
Every upload and web fetch is auto-analyzed the moment it lands (summary, key facts, concepts, structure, quotes) and the analysis is saved with the book so anything related to it can be recalled. View an entry for the full analysis, or run an AI deep analysis for a synthesized profile.
Keywords & Title Ideas from Research
Mining the vault for the strongest keywords and fresh title angles on a topic — great for sharpening a niche's keyword list before writing.
Omni Search everything
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
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 (Amazon autosuggest + search-page scrape). Results are cached for an hour, fetches are throttled and retried with backoff to avoid bot detection, 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.
- 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/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/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.
User Management
Manage users, roles, and permissions for your dashboard.