The Shared UI Library for the NovaEco System-of-Systems. This library provides standardized templates, CSS, and macros (like the Mission Control Launchpad) to ensure a consistent user experience across all vertical sectors (Agro, Trade, etc.).
Since this is an internal library, install it directly from GitHub using pip.
For Production (Pinned Version):
Add this to your requirements.txt:
git+https://github.com/novaeco-tech/novaeco-ui.git@v0.1.0#egg=novaeco-ui
For Local Development (Editable):
# Clone the repo first
git clone https://github.com/novaeco-tech/novaeco-ui.git
# Install in editable mode
pip install -e ./novaeco-uiIn your Flask application (app.py or create_app), register the blueprint to expose the static assets and templates.
from flask import Flask
from novaeco_ui import novaeco_ui_bp
app = Flask(__name__)
# Register the blueprint
# This makes templates available under 'novaeco_ui/'
# and static files under '/static/novaeco_ui/'
app.register_blueprint(novaeco_ui_bp)The library provides a Jinja2 macro to render the global navigation bar. You must pass the service URLs dynamically to ensure it works in both Local Dev and Production.
In your base template (e.g., base.html):
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="{{ url_for('novaeco_ui.static', filename='css/launchpad.css') }}">
</head>
<body>
{% from 'novaeco_ui/launchpad.html' import render_launchpad %}
{{ render_launchpad(
user=current_user,
active_app='agro',
urls={
'app': config.get('APP_URL'),
'agro': config.get('AGRO_URL'),
'trade': config.get('TRADE_URL'),
'auth_logout': config.get('AUTH_LOGOUT_URL')
}
)
}}
<main>
{% block content %}{% endblock %}
</main>
</body>
</html>This repository uses a VERSION file as the single source of truth.
We do not use git push tags manually. We use the NovaEco CLI and GitHub Actions.
-
Make your changes (CSS/HTML).
-
Bump the version using the CLI (requires
novaeco-devtools):# Bumps VERSION from 0.1.0 -> 0.1.1 novaeco version patch ui -
Push to main:
git add VERSION git commit -m "chore(release): bump to 0.1.1" git push -
Wait for CI:
- The GitHub Action will detect the change in
VERSION. - It will auto-tag the commit as
v0.1.1. - It will create a GitHub Release.
- The GitHub Action will detect the change in
-
Update Consumers:
- Go to
novaeco(Core) or other sector repos. - Update their
requirements.txtto the new tag.
- Go to