diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..d6c004b --- /dev/null +++ b/.env.example @@ -0,0 +1,30 @@ +# Nike — Football Data Platform +# Copy to .env and fill in your values. Never commit .env. + +# ── TheSportsDB ────────────────────────────────────────── +# Free test key is '3' (limited). Get a premium key at https://www.patreon.com/thesportsdb +NIKE_SPORTSDB_KEY=3 + +# ── Database ────────────────────────────────────────────── +NIKE_DB_HOST=localhost +NIKE_DB_PORT=5432 +NIKE_DB_USER=nike +NIKE_DB_PASSWORD= +NIKE_DB_NAME=nike + +# ── Server ──────────────────────────────────────────────── +NIKE_HOST=0.0.0.0 +NIKE_PORT=8000 +NIKE_LOG_LEVEL=WARNING + +# IPs allowed to set X-Forwarded-* headers (your HAProxy host). +# '*' is safe when Nike's port is firewalled to HAProxy only. +NIKE_TRUSTED_PROXY=* + +# ── Followed teams ──────────────────────────────────────── +# Comma-separated list of "Team Name:League Name" pairs. +NIKE_TEAMS=Toronto FC:MLS, Arsenal:Premier League + +# ── Legacy (not active) ─────────────────────────────────── +# NIKE_RAPIDAPI_KEY= +# NIKE_API_FOOTBALL_KEY= diff --git a/Dockerfile b/Dockerfile index 870418e..51103e4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,6 +2,10 @@ FROM python:3.12-slim WORKDIR /app +RUN apt-get update \ + && apt-get install -y --no-install-recommends curl \ + && rm -rf /var/lib/apt/lists/* + COPY . . RUN pip install --no-cache-dir . diff --git a/dashboard/src/app.css b/dashboard/src/app.css index 3374706..12c6ae4 100644 --- a/dashboard/src/app.css +++ b/dashboard/src/app.css @@ -1,5 +1,8 @@ @import "tailwindcss"; +/* Class-based dark mode: toggled via .dark on . */ +@custom-variant dark (&:where(.dark, .dark *)); + @theme { --color-pitch: #16a34a; --color-pitch-dark: #15803d; diff --git a/dashboard/src/app.html b/dashboard/src/app.html index 046d0e8..3844d39 100644 --- a/dashboard/src/app.html +++ b/dashboard/src/app.html @@ -5,6 +5,16 @@
+
Last cache update: {relTime(status.data.last_cache)}
{/if}
- {tool.name}
+ {tool.name}
{#if tool.premium}
★
{/if}
|
- {tool.description} | +{tool.description} |
| Time | Tool | Args | Duration | |
|---|---|---|---|---|
| {relTime(entry.timestamp)} |
- {entry.tool}
+ {entry.tool}
|
- + | {fmtArgs(entry.args)} |
diff --git a/dashboard/src/routes/tools/+page.svelte b/dashboard/src/routes/tools/+page.svelte
index bf3634c..4a2fa9a 100644
--- a/dashboard/src/routes/tools/+page.svelte
+++ b/dashboard/src/routes/tools/+page.svelte
@@ -178,8 +178,8 @@
- Tool Runner-+ Tool Runner+Run MCP tools interactively and inspect raw API responses. Useful for spotting strange API results. @@ -189,7 +189,7 @@
-
+ Select Tool
{#each TOOLS as tool}
@@ -198,11 +198,11 @@
class="px-3 py-1.5 rounded text-sm font-medium transition-colors
{selectedTool.name === tool.name
? 'bg-green-700 text-white'
- : 'bg-gray-800 text-gray-300 hover:bg-gray-700 border border-gray-700'}"
+ : 'bg-gray-100 dark:bg-gray-800 text-gray-600 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-700 border border-gray-200 dark:border-gray-700'}"
>
{tool.name}
{#if tool.premium}
- ★
+ ★
{/if}
{/each}
@@ -210,34 +210,34 @@
-
+
-
- {selectedTool.name}+{selectedTool.name}{#if selectedTool.premium} Premium {/if}{selectedTool.description} +{selectedTool.description}
{#each selectedTool.params as param}
-
-
-
+
+ Session HistoryNo queries yet. {:else} -
|