How tansatwibu/works_2 works
Long Chau Store Intelligence collects store data for three brands, tracks daily presence and changes, and serves a browser dashboard for exploring store counts, locations and events. The main workflow runs crawlers, persists snapshots and store records in MongoDB, then exposes them through HTTP APIs to the dashboard. The README documents the scheduled three-crawler run; crawler-to-sync wiring is not shown in the sampled excerpts, so that handoff is not drawn. The dashboard’s stores and events capabilities are represented even though their full UI flow was not sampled.
Main entry points: run_daily.ps1 Daily scheduler · dashboardView.js Dashboard views · dashboardController.js UI controller · server.js HTTP server
Components 21
Data collection
- Daily scheduler
run_daily.ps1 - Long Chau crawler
crawl_nhathuoc.py - Bách Hoá Xanh crawler
crawl_bhx.py - Vaccination crawler
crawl_tiemchung.py
Daily tracking
- Node sync
sync_daily.js - Python sync
sync_daily.py - MongoDB
Dashboard backend
- HTTP server
server.js - API routes
src/routes/apiRoutes.js - Dashboard controller
src/controllers/dashboardController.js - Dashboard data model
src/models/dashboardModel.js
Dashboard interface
- Dashboard shell
dashboard.html - UI controller
frontend/dashboardController.js - API client
frontend/dashboardModel.js - Chart utilities
frontend/chartUtils.js - Dashboard views
frontend/dashboardView.js - Stats dashboard
dashboard.html - Store listing
dashboard.html - Store events
dashboard.html
Other components
- Operator
- Dashboard user
Connections 20
- Operator → Daily scheduler: starts daily run
README.md - Daily scheduler → Long Chau crawler: runs crawler
README.md - Daily scheduler → Bách Hoá Xanh crawler: runs crawler
README.md - Daily scheduler → Vaccination crawler: runs crawler
README.md - Node sync → MongoDB: writes records
sync_daily.js - Python sync → MongoDB: writes records
sync_daily.py - Operator → HTTP server: opens dashboard
README.md - HTTP server → API routes: resolves route
server.js - HTTP server → Dashboard shell: serves static files
server.js - API routes → Dashboard controller: dispatches request
src/routes/apiRoutes.js - Dashboard controller → Dashboard data model: calls query
src/controllers/dashboardController.js - Dashboard data model → MongoDB: queries collections
src/models/dashboardModel.js - Dashboard user → Dashboard shell: uses dashboard
README.md - UI controller → API client: requests data
frontend/dashboardController.js - API client → API routes: fetches API
frontend/dashboardModel.js - UI controller → Chart utilities: calculates date range
frontend/dashboardController.js - UI controller → Dashboard views: renders results
frontend/dashboardController.js - Dashboard views → Stats dashboard: updates dashboard
frontend/dashboardView.js - Dashboard views → Store listing: renders stores
frontend/dashboardView.js - Dashboard views → Store events: renders events
frontend/dashboardView.js