How macs-labo/macs works
MacsDB combines scheduled FAMIC data refresh with SQLite-based pesticide search, plus the separately published MACS and ACFinderBE applications. The principal user workflow enters MACS, selects a chemical, crop, or pest search, and gets results from the database. The README documents the refresh and search capabilities; sampled source confirms MACS dispatch and database access, and parts of the update code. Several ACFinder and API internals are not shown, so their detailed interactions are omitted.
Main entry points: index.php Search entry · inc.acis.php Refresh coordinator · inc.sqlite.php SQLite refresh access · inc.acis.sakumotsu.php Crop data shaping
Components 30
Database refresh
- Refresh coordinator
cron/inc.acis.php - Refresh utilities
cron/inc.common.php - SQLite refresh access
cron/inc.sqlite.php - Crop data shaping
cron/inc.acis.sakumotsu.php - Pest data shaping
cron/inc.acis.byochu.php - XLS parsing
cron/Excel/SimpleXLS.php - XLSX parsing
cron/Excel/SimpleXLSX.php
MACS search
- Search entry
macs/index.php - Search session
macs/inc.common.php - Search configuration
macs/inc.setup.php - SQLite search access
macs/inc.sqlite.php - Page rendering
macs/inc.template.php - Chemical search
macs/chem3.php - Crop search
macs/crop2.php - Pest search
macs/pest4.php - MacsDB
ACFinderBE
- Chemical lookup UI
acfinder/chem.js - Crop lookup UI
acfinder/crop.js - Pest lookup UI
acfinder/pest.js - Data loading
acfinder/loader.js - Results tables
acfinder/table.js - Record previews
acfinder/previews/preview.js - File handling
acfinder/filer.js - Application header
acfinder/header.js - Themes
acfinder/theme.js - Offline worker
acfinder/sw.js
Supporting services
- Subscription endpoint
api/subscribe.js - API entry
api/index.php
Other components
- Scheduled checks
- FAMIC data
Connections 18
- Scheduled checks → Refresh coordinator: triggers
- FAMIC data → Refresh coordinator: supplies data
- Refresh coordinator → SQLite refresh access: uses
cron/inc.acis.php - Refresh coordinator → Refresh utilities: uses
cron/inc.common.php - Refresh coordinator → Crop data shaping: invokes
- Refresh coordinator → Pest data shaping: invokes
- Crop data shaping → SQLite refresh access: updates
cron/inc.acis.sakumotsu.php - Pest data shaping → SQLite refresh access: updates
- Search entry → Search session: loads
macs/index.php - Search entry → Search configuration: loads
macs/index.php - Search entry → SQLite search access: loads
macs/index.php - Search entry → Page rendering: loads
macs/index.php - Search entry → Chemical search: dispatches
macs/index.php - Search entry → Crop search: dispatches
macs/index.php - Search entry → Pest search: dispatches
macs/index.php - Crop search → Search session: uses filters
macs/crop2.php - SQLite search access → MacsDB: queries
- SQLite refresh access → MacsDB: writes