mirror of
https://github.com/zvx-echo6/recon.git
synced 2026-05-20 06:34:40 +02:00
feat(navi): deployment profiles + /api/config endpoint
Add profile-driven config infrastructure:
- config/profiles/{home,regional_pi,minimal_pi}.yaml templates
- lib/deployment_config.py loader (reads RECON_PROFILE env var)
- GET /api/config returns active profile as JSON (5min cache)
Frontend reads this on startup to determine tile source, defaults,
and feature flags. No existing behavior changed.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
d4c5c371ca
commit
e6b81db520
5 changed files with 149 additions and 0 deletions
10
lib/api.py
10
lib/api.py
|
|
@ -24,6 +24,7 @@ from werkzeug.utils import secure_filename
|
|||
|
||||
from .utils import get_config, content_hash, clean_filename_to_title, derive_source_and_category, generate_download_url, setup_logging
|
||||
from .status import StatusDB
|
||||
from .deployment_config import get_deployment_config
|
||||
|
||||
logger = setup_logging('recon.api')
|
||||
|
||||
|
|
@ -1165,6 +1166,15 @@ def api_knowledge_stats():
|
|||
return jsonify(_cache['knowledge_stats'])
|
||||
|
||||
|
||||
@app.route('/api/config')
|
||||
def api_config():
|
||||
"""Return deployment profile config for frontend consumption."""
|
||||
config = get_deployment_config()
|
||||
resp = jsonify(config)
|
||||
resp.headers['Cache-Control'] = 'public, max-age=300'
|
||||
return resp
|
||||
|
||||
|
||||
@app.route('/api/health')
|
||||
def api_health():
|
||||
"""Health check endpoint for monitoring."""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue