2.1 KiB
2.1 KiB
Settings Models
Overview
The Settings module provides two singleton configuration models for global site settings and map-specific settings.
Models (2):
- SiteSettings — Org branding + theme + SMTP + feature toggles
- MapSettings — Map center/zoom + walk sheet config
Key Features:
- Singleton pattern (always ID "default")
- SMTP override hierarchy (SiteSettings → env vars)
- Feature flags (enableInfluence, enableMap, enableNewsletter, enableLandingPages)
- Theme color customization (admin + public)
- Walk sheet customization (title, subtitle, footer, QR codes)
See Schema Reference for complete field listings.
SiteSettings (Singleton)
ID: Always "default" (enforced by seed + UI)
Sections:
- Organization — Name, logo, favicon
- Admin Theme — Primary color, background color
- Public Theme — Primary color, background color, container color, header gradient
- Email Branding — From name, footer text, login subtitle
- SMTP Configuration — Host, port, user, pass, from address, active provider, test mode
- Feature Toggles — Enable/disable modules
SMTP Hierarchy:
- If SiteSettings.smtpHost is set → use SiteSettings SMTP
- Else → fallback to env vars (SMTP_HOST, SMTP_PORT, etc.)
MapSettings (Singleton)
ID: Always "default" (enforced by seed + UI)
Sections:
- Map Center — Latitude, longitude, zoom (default: Edmonton, AB)
- Walk Sheet — Title, subtitle, footer text
- QR Codes — 3 QR code slots (URL + label each)
QR Code Usage:
- Rendered on printable walk sheets
- Typically links to volunteer portal, shift signup, campaign page
- Generated via Mini QR service (GET /api/qr?url=...)
Related Documentation
- Schema Reference — Complete field listings
- Seeding — Default settings
- API Settings Routes — REST endpoints
- Admin Settings Page — Settings UI
- Admin Map Settings Page — Map settings UI