initial commit — cassandra v0.1
Containerised macro-strategy dashboard: 4-panel web UI (indicators, portfolio, flash news, AI strategic log), MariaDB store, hourly ingestion jobs, OpenRouter-backed AI analysis. Ports the four prototype scripts in the parent dir (market_pulse, flash_news, trading212, strategic_log) into async services backed by a persistent DB and served via FastAPI + Jinja2 + HTMX. APScheduler runs as a separate compose service for crash-safety and easier restarts. Portfolio composition + position names come live from Trading 212; news per-ticker headlines reuse those names. Tone (NOVICE/INTERMEDIATE/ PRO) and analysis style (DRY/SPECULATIVE) are env-configurable and stored on each log row so historical entries show what produced them. Default model is deepseek/deepseek-v4-flash (overridable via env). Light/dark theme toggle, sans-serif for prose surfaces, monospace for data. Bearer-token auth, OpenRouter monthly cost cap, RSS feeds auto- disabled on consecutive failures. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
commit
a10409c02b
61 changed files with 4890 additions and 0 deletions
48
app/templates/partials/calendar.html
Normal file
48
app/templates/partials/calendar.html
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
<div class="cal" id="cal-widget">
|
||||
<div class="cal__nav">
|
||||
<button class="cal__btn"
|
||||
hx-get="/api/log/days?month={{ prev_month }}{% if selected %}&selected={{ selected.isoformat() }}{% endif %}"
|
||||
hx-target="#cal-widget"
|
||||
hx-swap="outerHTML">‹</button>
|
||||
<div class="cal__title">{{ month_name }} {{ year }}</div>
|
||||
<button class="cal__btn"
|
||||
hx-get="/api/log/days?month={{ next_month }}{% if selected %}&selected={{ selected.isoformat() }}{% endif %}"
|
||||
hx-target="#cal-widget"
|
||||
hx-swap="outerHTML">›</button>
|
||||
</div>
|
||||
<div class="cal__grid">
|
||||
<div class="cal__h">Mo</div>
|
||||
<div class="cal__h">Tu</div>
|
||||
<div class="cal__h">We</div>
|
||||
<div class="cal__h">Th</div>
|
||||
<div class="cal__h">Fr</div>
|
||||
<div class="cal__h">Sa</div>
|
||||
<div class="cal__h">Su</div>
|
||||
{% for week in grid %}
|
||||
{% for d in week %}
|
||||
{% if d is none %}
|
||||
<div class="cal__d cal__d--empty"></div>
|
||||
{% else %}
|
||||
{% set has_log = d in days_with_logs %}
|
||||
{% set is_selected = (selected and selected.day == d and selected.month == month and selected.year == year) %}
|
||||
{% set is_today = (today.day == d and today.month == month and today.year == year) %}
|
||||
{% set iso = "%04d-%02d-%02d" | format(year, month, d) %}
|
||||
<button class="cal__d
|
||||
{% if has_log %}cal__d--has-log{% else %}cal__d--no-log{% endif %}
|
||||
{% if is_selected %}cal__d--selected{% endif %}
|
||||
{% if is_today %}cal__d--today{% endif %}"
|
||||
{% if has_log %}
|
||||
hx-get="/api/log/by-date/{{ iso }}?as=html"
|
||||
hx-target="#log-content"
|
||||
hx-swap="innerHTML"
|
||||
hx-push-url="/log/{{ iso }}"
|
||||
onclick="document.querySelectorAll('.cal__d--selected').forEach(b=>b.classList.remove('cal__d--selected'));this.classList.add('cal__d--selected')"
|
||||
{% else %}
|
||||
disabled
|
||||
{% endif %}
|
||||
>{{ d }}</button>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue