How songhaotian694-oss/portal-search-app works
Employment Portal Search is a local desktop application for collecting employment-sharing articles, extracting structured student records, and searching or exporting those records from SQLite. The user configures an allowed portal and authenticates in an embedded browser, then starts or resumes collection and recognition; results are available through search, exploration, and export views. The graph follows documented workflow and sampled router wiring. Some UI and processing internals were not sampled, so those links rely on README statements where available.
Main entry points: sync.py Sync coordinator · main.py FastAPI application · App.tsx React application · process.py Recognition and extraction
Components 25
Desktop interface
- Desktop shell
app/desktop_login.py - React application
frontend/src/App.tsx - Update workspace
frontend/src/pages/WorkspacePage.tsx - Smart search
frontend/src/pages/SearchPage.tsx - Data exploration
frontend/src/pages/ExplorePage.tsx - Frontend API client
frontend/src/services/api.ts
Portal collection
- Portal settings
app/settings.py - Browser authentication
app/crawler/browser_session.py - Saved login state
app/crawler/auth_store.py - Sync coordinator
app/api/sync.py - Portal API reader
app/crawler/portal_api.py - Page adapter
app/crawler/portal_adapter.py - Article downloader
app/crawler/article_downloader.py
Local data processing
- Article text parser
app/processing/html_parser.py - SQLite records
app/database.py - Recognition and extraction
app/api/process.py - Attachment OCR and parsing
app/processing/attachment_parser.py - Record field extraction
app/processing/field_extractor.py
Search and results
- FastAPI application
app/main.py - Structured search
app/api/search.py - Chinese query planner
app/processing/chinese_query.py - Analytics
app/api/analytics.py - Excel export
app/api/export.py
Other components
- User
- School portal
Connections 37
- User → Desktop shell: launches
README.md - Desktop shell → FastAPI application: starts
launcher.py - User → React application: uses
README.md - React application → Frontend API client: requests through
frontend/src/App.tsx - Frontend API client → FastAPI application: calls local API
README.md - React application → Update workspace: routes to
- React application → Smart search: routes to
- React application → Data exploration: routes to
- User → Portal settings: configures
README.md - Portal settings → Browser authentication: configures
app/crawler/browser_session.py - User → Browser authentication: authenticates
README.md - Browser authentication → School portal: opens login page
README.md - Browser authentication → Saved login state: persists session
app/crawler/browser_session.py - Update workspace → Sync coordinator: starts or resumes
README.md - Sync coordinator → Portal API reader: requests records
app/api/sync.py - Sync coordinator → Page adapter: uses page mode
app/api/sync.py - Sync coordinator → Article downloader: downloads articles
app/api/sync.py - Article downloader → Article text parser: extracts article text
app/crawler/article_downloader.py - Sync coordinator → SQLite records: queues and checkpoints
app/api/sync.py - Sync coordinator → Recognition and extraction: starts recognition
app/api/sync.py - Recognition and extraction → SQLite records: reads and writes records
app/api/process.py - Recognition and extraction → Attachment OCR and parsing: parses attachments
app/api/process.py - Recognition and extraction → Record field extraction: extracts fields
app/api/process.py - User → Smart search: searches records
README.md - Smart search → Structured search: submits query
frontend/src/pages/SearchPage.tsx - Structured search → SQLite records: queries records
app/api/search.py - Structured search → Chinese query planner: plans Chinese query
- Structured search → Analytics: summarizes results
app/api/search.py - User → Data exploration: explores relationships
README.md - Data exploration → Frontend API client: requests data
- Smart search → Excel export: exports current results
README.md - User → Excel export: exports all data
README.md - Excel export → SQLite records: reads records
app/api/export.py - FastAPI application → Structured search: registers routes
app/main.py - FastAPI application → Sync coordinator: registers routes
app/main.py - FastAPI application → Recognition and extraction: registers routes
app/main.py - FastAPI application → Excel export: registers routes
app/main.py