How acasinha/spa-tur works
SPA-TUR is a municipal tourism-recording application: staff sign in, choose a module, and record or review visitor, sales, inventory, and monthly nationality data. The router loads module views; their workflows use Firebase/Firestore, while dashboard and administration provide analysis and access management. Offline caching and synchronization support continued use without connectivity. README documentation is only a title, so feature coverage follows the named source modules and sampled code; unsampled modules are represented by their exact view paths, without guessing their internal calls.
Main entry points: router.js View router · inicio/view.js Module shortcuts · registo/view.js Daily visitor log · editor/view.js Monthly editor
Components 22
App shell
- App shell
js/app-shell.js - Sign in
js/login.js - View router
js/router.js - Module shortcuts
views/inicio/view.js
Visitor records
- Daily visitor log
views/registo/view.js - Monthly editor
views/editor/view.js - Editor logic
js/editor.js - Dashboard view
views/dashboard/view.js - Dashboard logic
js/dashboard.js - Form UI
js/ui.js
Operations
- Sales and stock
views/vendas/view.js - Promotional inventory
views/inventario/view.js - User administration
views/admin/view.js - User management
js/users.js
Identity and offline
- API client
js/api.js - Session authentication
js/auth.js - Offline support
js/offline.js - Data synchronization
js/sync.js - Service worker
sw.js - PWA setup
js/pwa.js
Other components
- Staff
- Firebase services
Connections 26
- Staff → App shell: opens
- App shell → View router: initializes
- Staff → Sign in: signs in
- Sign in → Session authentication: authenticates
js/auth.js - View router → Module shortcuts: loads view
js/router.js - View router → Daily visitor log: loads view
js/router.js - View router → Monthly editor: loads view
js/router.js - View router → Dashboard view: loads view
js/router.js - View router → Sales and stock: loads view
js/router.js - View router → Promotional inventory: loads view
js/router.js - View router → User administration: loads view
js/router.js - Module shortcuts → View router: navigates
views/inicio/view.js - Monthly editor → Editor logic: uses logic
- Daily visitor log → Form UI: uses form UI
- Dashboard view → Dashboard logic: uses logic
- User administration → User management: manages accounts
- Daily visitor log → Firebase services: reads and writes
- Monthly editor → Firebase services: reads and writes
- Dashboard view → Firebase services: reads and writes
views/dashboard/view.js - Sales and stock → Firebase services: reads and writes
views/vendas/view.js - Promotional inventory → Firebase services: reads and writes
views/inventario/view.js - Module shortcuts → Firebase services: queries indicators
views/inicio/view.js - API client → Session authentication: gets token
- Offline support → Data synchronization: queues changes
- Service worker → Data synchronization: dispatches sync
sw.js - PWA setup → Service worker: registers