How darkneko-id/apdn_app works
TKDN Finder is a web app for searching Kemenperin P3DN certificates, with filtering, Excel export, certificate details, product-type enrichment, and admin-managed data refresh and synonyms. The main flow is a user search request through the search route and ranking logic to SQLite, returning results for display or export. Refresh imports P3DN data into the same store. The graph preserves documented capabilities; some internal refresh calls are supported by the SOURCE INDEX rather than full excerpts, so their exact sequencing is not asserted.
Main entry points: main.py FastAPI app · scheduler.py Refresh scheduler · db.py SQLite certificate store · search.py Search routes
Components 20
Web application
- FastAPI app
src/tkdn_finder/main.py - Search routes
src/tkdn_finder/routes/search.py - Certificate detail
src/tkdn_finder/routes/detail.py - Excel export
src/tkdn_finder/routes/export.py - Admin panel
src/tkdn_finder/routes/admin.py - Admin trend charts
src/tkdn_finder/charts.py
Search and enrichment
- FTS fuzzy ranking
src/tkdn_finder/search.py - Synonym expansion
src/tkdn_finder/synonyms.py - Type enrichment
src/tkdn_finder/tipe_enricher.py - P3DN search scraper
src/tkdn_finder/p3dn_search_scraper.py
Data refresh
- Refresh scheduler
src/tkdn_finder/scheduler.py - Bulk downloader
src/tkdn_finder/downloader.py - Source discovery
src/tkdn_finder/scraper.py - Certificate parser
src/tkdn_finder/parser.py - Record merger
src/tkdn_finder/merger.py - Refresh progress
src/tkdn_finder/refresh_state.py
Persistence
- SQLite certificate store
src/tkdn_finder/db.py - Application settings
src/tkdn_finder/config.py
Other components
- Procurement user
- Kemenperin P3DN
Connections 32
- Procurement user → FastAPI app: uses
README.md - FastAPI app → Search routes: registers
src/tkdn_finder/main.py - FastAPI app → Certificate detail: registers
src/tkdn_finder/main.py - FastAPI app → Excel export: registers
src/tkdn_finder/main.py - FastAPI app → Admin panel: registers
src/tkdn_finder/main.py - FastAPI app → Refresh scheduler: starts
src/tkdn_finder/main.py - FastAPI app → SQLite certificate store: initializes
src/tkdn_finder/main.py - FastAPI app → Application settings: loads
src/tkdn_finder/main.py - FastAPI app → Synonym expansion: seeds
src/tkdn_finder/main.py - Search routes → FTS fuzzy ranking: queries
src/tkdn_finder/routes/search.py - FTS fuzzy ranking → SQLite certificate store: reads candidates
src/tkdn_finder/search.py - FTS fuzzy ranking → Synonym expansion: expands query
src/tkdn_finder/search.py - Search routes → SQLite certificate store: reads details
src/tkdn_finder/routes/search.py - Search routes → Type enrichment: enriches type
src/tkdn_finder/routes/search.py - Search routes → P3DN search scraper: checks presence
src/tkdn_finder/routes/search.py - Certificate detail → SQLite certificate store: reads certificate
src/tkdn_finder/routes/detail.py - Excel export → FTS fuzzy ranking: gets results
src/tkdn_finder/routes/export.py - Excel export → SQLite certificate store: reads refresh time
src/tkdn_finder/routes/export.py - Admin panel → Refresh scheduler: triggers refresh
src/tkdn_finder/routes/admin.py - Admin panel → SQLite certificate store: reads and updates
src/tkdn_finder/routes/admin.py - Admin panel → Synonym expansion: manages entries
src/tkdn_finder/routes/admin.py - Admin panel → Admin trend charts: builds trends
src/tkdn_finder/routes/admin.py - Refresh scheduler → Source discovery: discovers sources
src/tkdn_finder/scheduler.py - Refresh scheduler → Bulk downloader: downloads data
src/tkdn_finder/scheduler.py - Refresh scheduler → Certificate parser: parses rows
src/tkdn_finder/scheduler.py - Refresh scheduler → Record merger: merges records
src/tkdn_finder/scheduler.py - Refresh scheduler → SQLite certificate store: records refresh
src/tkdn_finder/scheduler.py - Refresh scheduler → Refresh progress: updates progress
src/tkdn_finder/scheduler.py - Bulk downloader → Kemenperin P3DN: downloads from
README.md - Source discovery → Kemenperin P3DN: discovers on
src/tkdn_finder/scraper.py - Type enrichment → Kemenperin P3DN: fetches type
README.md - P3DN search scraper → Kemenperin P3DN: searches portal
README.md