feat: initialize Nike Dashboard with SvelteKit and TailwindCSS

- Add package.json for project dependencies and scripts
- Create app.css with TailwindCSS imports and theme variables
- Set up basic HTML structure in app.html
- Implement API functions in api.ts for fetching status, logs, and running tools
- Define TypeScript interfaces in types.ts for API responses and logs
- Create layout component with navigation and main content area
- Disable SSR and prerendering in layout.ts
- Build main status page with real-time updates and logs
- Develop tool runner page for executing MCP tools with parameters
- Add favicon.svg for branding
- Configure SvelteKit adapter for static site generation
- Set up TypeScript configuration for the project
- Configure Vite with TailwindCSS and API proxy settings
- Create Docker Compose file for containerized deployment
This commit is contained in:
2026-03-28 17:26:40 +00:00
parent ee8436d5b8
commit 482657492d
23 changed files with 3209 additions and 4 deletions

View File

@@ -14,7 +14,7 @@ Queries live data from [free-api-live-football-data](https://rapidapi.com/Creati
│ │
│ GET / → Bootstrap dashboard (dashboard.html)│
│ GET /api/* → Dashboard JSON API │
│ /mcp → FastMCP HTTP (streamable) │
│ /mcp/ → FastMCP HTTP (streamable) │
└──────────┬──────────────────────────────────────────────┘
nike/rapidapi.py
@@ -60,6 +60,41 @@ Queries live data from [free-api-live-football-data](https://rapidapi.com/Creati
---
## Dashboard
The web dashboard is a SvelteKit 2 / Svelte 5 / Tailwind CSS 4 app in `dashboard/`.
| Route | Description |
|-------|-------------|
| `/` | System status: DB, API, MCP health cards; followed teams; tools list; request log |
| `/tools` | Interactive tool runner — pick a tool, fill in parameters, inspect raw output |
### Build (required before serving via FastAPI)
```bash
cd dashboard
npm install
npm run build # outputs to dashboard/build/
```
Once built, `python run.py` serves the SvelteKit app at `http://<host>:{PORT}/`.
### Development (live reload)
Run the FastAPI backend and the SvelteKit dev server in separate terminals:
```bash
# Terminal 1 — backend
python run.py
# Terminal 2 — frontend (proxies /api and /mcp to localhost:8000)
cd dashboard && npm run dev
```
The dev dashboard is at `http://localhost:5173`.
---
## Setup
### Prerequisites
@@ -118,14 +153,14 @@ sudo systemctl enable --now nike
## MCP Client Configuration
Nike exposes a Streamable HTTP MCP endpoint at `/mcp`. To connect an MCP client (e.g. Claude Desktop, Cline, or any MCP-compatible tool), add the following to your client's MCP server configuration:
Nike exposes a Streamable HTTP MCP endpoint at `/mcp/`. To connect an MCP client (e.g. Claude Desktop, Cline, or any MCP-compatible tool), add the following to your client's MCP server configuration:
```json
{
"mcpServers": {
"nike": {
"type": "streamable-http",
"url": "http://<host>:{PORT}/mcp"
"url": "http://<host>:{PORT}/mcp/"
}
}
}