feat: implement MCP server and dashboard for football data platform

Add complete Nike football data platform with:
- FastMCP server exposing football data tools over HTTP
- RapidAPI client for free-api-live-football-data integration
- Bootstrap web dashboard with live match/standings views
- REST API endpoints for dashboard consumption
- Docker support with multi-stage build
- Comprehensive README with architecture docs
- Minimal .gitignore replacing verbose Python template
This commit is contained in:
2026-03-21 18:19:42 +00:00
parent b8689d530a
commit ee8436d5b8
81 changed files with 50251 additions and 176 deletions

49
scripts/apply_schema.py Normal file
View File

@@ -0,0 +1,49 @@
#!/usr/bin/env python3
"""Apply Nike schema to Portia PostgreSQL."""
import os
import sys
from dotenv import load_dotenv
import psycopg2
load_dotenv('/home/robert/gitea/nike/.env')
try:
conn = psycopg2.connect(
host=os.getenv('DB_HOST'),
port=int(os.getenv('DB_PORT', 5432)),
user=os.getenv('DB_USER'),
password=os.getenv('DB_PASSWORD'),
dbname='nike',
)
except Exception as e:
print(f"❌ Cannot connect to DB: {e}")
sys.exit(1)
conn.autocommit = True
cur = conn.cursor()
schema_path = os.path.join(os.path.dirname(__file__), '..', 'schema.sql')
with open(schema_path, 'r') as f:
sql = f.read()
try:
cur.execute(sql)
print("✅ Schema applied successfully.")
except Exception as e:
print(f"❌ Schema error: {e}")
cur.close()
conn.close()
sys.exit(1)
cur.execute("""
SELECT table_name FROM information_schema.tables
WHERE table_schema = 'public' ORDER BY table_name;
""")
tables = cur.fetchall()
print(f" {len(tables)} tables in public schema:")
for t in tables:
print(f"{t[0]}")
cur.close()
conn.close()