forked from Rockachopa/Timmy-time-dashboard
feat: replace GitHub page with embedded Timmy chat interface
Replaces the marketing landing page with a minimal, full-screen chat interface that connects to a running Timmy instance. Mobile-first design with single vertical scroll direction, looping scroll, no zoom, no buttons — just type and press Enter to talk to Timmy. - docs/index.html: full rewrite as a clean chat UI with dark terminal theme, looping infinite scroll, markdown rendering, connection status, and /connect, /clear, /help slash commands - src/dashboard/app.py: add CORS middleware so the GitHub Pages site can reach a local Timmy server cross-origin - src/config.py: add cors_origins setting (defaults to ["*"]) https://claude.ai/code/session_01AWLxg6KDWsfCATiuvsRMGr
This commit is contained in:
1274
docs/index.html
1274
docs/index.html
File diff suppressed because it is too large
Load Diff
@@ -72,6 +72,10 @@ class Settings(BaseSettings):
|
||||
# Default is False (telemetry disabled) to align with sovereign AI vision.
|
||||
telemetry_enabled: bool = False
|
||||
|
||||
# CORS allowed origins for the web chat interface (GitHub Pages, etc.)
|
||||
# Set CORS_ORIGINS as a comma-separated list, e.g. "http://localhost:3000,https://example.com"
|
||||
cors_origins: list[str] = ["*"]
|
||||
|
||||
# Environment mode: development | production
|
||||
# In production, security settings are strictly enforced.
|
||||
timmy_env: Literal["development", "production"] = "development"
|
||||
|
||||
@@ -5,6 +5,7 @@ from contextlib import asynccontextmanager
|
||||
from pathlib import Path
|
||||
|
||||
from fastapi import FastAPI, Request
|
||||
from fastapi.middleware.cors import CORSMiddleware
|
||||
from fastapi.responses import HTMLResponse
|
||||
from fastapi.staticfiles import StaticFiles
|
||||
from fastapi.templating import Jinja2Templates
|
||||
@@ -170,6 +171,14 @@ app = FastAPI(
|
||||
redoc_url="/redoc" if settings.debug else None,
|
||||
)
|
||||
|
||||
app.add_middleware(
|
||||
CORSMiddleware,
|
||||
allow_origins=settings.cors_origins,
|
||||
allow_credentials=True,
|
||||
allow_methods=["*"],
|
||||
allow_headers=["*"],
|
||||
)
|
||||
|
||||
templates = Jinja2Templates(directory=str(BASE_DIR / "templates"))
|
||||
app.mount("/static", StaticFiles(directory=str(PROJECT_ROOT / "static")), name="static")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user