An executive analytics and intelligence dashboard for Rotaract South Asia MDIO, providing comprehensive membership, compliance, youth service (Interact), and TRF contribution metrics across Zones 4, 5, 6 & 7 and worldwide.
- Executive Dashboard (
/): Multi-select Zone & District filtering, interactive KPI cards, demographic distributions, top leaderboards, and deep data drilldown tables. - Zone Drilldown (
/zone/[zoneId]): Granular zone-level analytics, district comparison directories, and demographic breakdowns. - District Deep Dive (
/district/[districtId]): District officer directories, compliance alerts (arrears, missing officers), TRF impact, and club rosters. - Universal Club Report (
/club/[clubId]): Dedicated profiles for Rotaract clubs across South Asia featuring membership standing, sponsorship details, TRF contributions, and compliance status. - Worldwide Statistics (
/worldwide): Global Rotaract & Interact club and membership leaderboards with quarter-over-quarter and baseline growth analysis. - Youth Service & Interact Ecosystem: Tracking Rotary clubs without Rotaract/Interact sponsorship, Interact club growth, and expansion opportunity metrics.
- Model Context Protocol (MCP) Server: 15 analytical AI tools (including
list_baseline_outcomes), 9 resources, and 4 prompts over local stdio (npm run mcp) and remote HTTP (POST /api/mcp). HTTP is dual-era: default2025-11-25(OpenAI-compatible legacy), full2026-07-28when requested (Claude modern connectors). Stdio stays on the MCP SDK2025-11-25path until upstream ships2026-07-28. - MCP Documentation (
/docs): Human-friendly setup guide for Claude, ChatGPT, Cursor, and other MCP clients, plus tool, resource, and workflow reference. - Public REST API (
/api/v1/): Internal/compatibility JSON endpoints (summary, leaderboards, districts, clubs, compliance, opportunities, TRF, interact, worldwide). Prefer MCP for AI assistants. - Production Host Routing: Canonical production routing at
https://insights.rsamdio.org/with 301 edge redirects for Netlify subdomains and legacy addresses. - SEO / GEO / AIO:
/llms.txt(llmstxt.org v2),/llms-full.txt,/ai-overview.md, enriched JSON-LD (Organization, WebSite, Dataset, SoftwareApplication), AI-crawler-awarerobots.txt, and sitemap entries for discovery files.
- Framework: Next.js 16 (App Router) with React 19
- Visual Analytics: Chart.js &
react-chartjs-2with datalabels - Data Tables: TanStack Table (
@tanstack/react-table) with client-side sorting, pagination, and multi-field search - AI & Integrations: Model Context Protocol (MCP) SDK (
@modelcontextprotocol/sdk), OpenAPI 3.1.0 - Styling: Vanilla CSS (
app/globals.css) with glassmorphism, responsive grid layouts, and mobile-first media queries - Typography: Self-hosted
next/font/google(Inter) with zero render-blocking requests - Analytics: Google Analytics (
gtag.js) with automatic client-side App Router route tracking
├── app/ # Next.js App Router routes
│ ├── layout.js # Root layout with header badge & footer
│ ├── page.js # Executive dashboard
│ ├── zone/[zoneId]/ # Zone drilldown pages
│ ├── district/[districtId]/# District deep dive pages
│ ├── club/[clubId]/ # Universal club report pages
│ ├── worldwide/ # Worldwide statistics page
│ ├── docs/ # MCP setup & tool documentation
│ ├── .well-known/ # Domain verification challenge
│ └── api/ # API endpoints
│ ├── v1/ # 20 Public REST endpoints
│ ├── mcp/ # Remote MCP JSON-RPC 2.0 endpoint
│ └── filters/ # UI filter options endpoint
├── components/ # Reusable React components
│ ├── charts/ # Chart.js visualizations (Bar, Doughnut)
│ ├── sections/ # TopCharts, KPI leaderboards
│ ├── tables/ # TanStack DataTables & GlobalTables
│ └── ui/ # MetricCards, HeaderFilters, Analytics, Tabs
├── data/ # Pre-aggregated JSON & CSV data payloads
├── fulldata/ # Raw master Excel workbooks
├── basedata/ # Historical baseline CSV files
├── lib/ # Core business logic & API services
│ ├── api.js # Data access layer & cache
│ ├── services/ # Analytics & query services
│ └── mcp/ # MCP tool definitions & schemas
├── openai-skills/ # Packaged OpenAI agent skills
├── public/ # Static assets, redirects & openapi.json
│ ├── _redirects # Netlify CDN edge redirects
│ └── openapi.json # OpenAPI 3.1.0 specification
├── scripts/ # Data processing & verification pipeline
│ ├── generate_dashboard_data.js
│ ├── mcp_server.js # Stdio MCP server
│ ├── validate_harness.js # Integrity validator
│ └── verify_production.mjs # Integration test suite
├── netlify.toml # Netlify configuration & redirects
├── proxy.js # Next.js 16 host proxy middleware
└── .agents/ # AI agent rules & architecture documentation
- Node.js 18.17+ or 20+
- npm or yarn
npm installnpm run devOpen http://localhost:3000 in your browser.
npm run build
npm run startRun the local MCP stdio server for Cursor, Claude Desktop, or Antigravity (MCP SDK protocol 2025-11-25):
npm run mcpOr connect remotely via SSE at https://insights.rsamdio.org/sse or HTTP JSON-RPC 2.0 at POST https://insights.rsamdio.org/api/mcp (dual-era: default 2025-11-25, full 2026-07-28 when negotiated).
# Validate documentation links, data schemas, and typography invariants
npm run validate-harness
# Run automated integration smoke tests against production or localhost
node scripts/verify_production.mjs https://insights.rsamdio.orgThe dashboard relies on pre-aggregated data generated from master Excel files (fulldata/MasterData.xlsx) and baseline files (basedata/).
- Place the new master workbook in
fulldata/MasterData.xlsx. - Update the
DATA_AS_OF_DATEconstant at the top ofscripts/generate_dashboard_data.js(e.g.'13 Aug 2026'). - Run the data generator:
npm run generate-data
- The script parses the raw club sheets, calculates deltas, and updates all JSON/CSV files in
data/. The UI automatically detects updated files without requiring a server restart.
The REST API endpoints and Model Context Protocol (MCP) server include structured, non-blocking telemetry powered by Axiom ($0/month on Axiom Cloud Free tier up to 500 GB/month).
| Variable | Description | Default |
|---|---|---|
AXIOM_TOKEN |
Axiom API Token with Ingest permission (AXIOM_API_TOKEN alias also accepted) |
(Disabled if omitted) |
AXIOM_DATASET |
Target dataset name | rotaract-analytics |
AXIOM_ORG_ID |
Optional organization ID | None |
AXIOM_URL |
Axiom API base URL | https://api.axiom.co |
DEBUG_TELEMETRY |
Set to 1 or true to print telemetry payloads to console |
false |
api_request: Path, normalized route, HTTP method, status code, latency (ms), query parameters, caller IP, user agent, referer.mcp_tool: MCP tool name, sanitized arguments, execution latency (ms), outcome (success/failure), error details, caller source (http,sse,stdio,http-direct), returned slice item count (resultCount), total matching database records (totalMatches), caller IP, user agent, session ID, JSON-RPC request ID, optionalprotocolVersion/protocolEra/resultType.mcp_request: Protocol methods (initialize,server/discover,tools/list,tools/call,manifest/get,sse/connect), status code, latency, user agent, caller IP, session ID, negotiatedprotocolVersion, optionalrequestedProtocolVersion,protocolEra(legacy|modern),negotiationOutcome,errorCode, boundedclientName/clientVersion, andresultTypewhen present.
- Serverless Anti-Freeze: Route handlers coordinate with
flushTelemetry(800)to ensure pending ingestion tasks complete before AWS Lambda / Netlify execution freezes on response completion. - Auto-Loaded Stdio Environment:
scripts/mcp_server.jsautomatically loads.env.localor.envat startup for zero-configuration tracing during Cursor, Claude Desktop, or CLI sessions. - Safe Fallback: When
AXIOM_TOKENis not configured, telemetry is safely disabled with zero overhead, network requests, or crashes.
The information in this dashboard is sourced from Rotary International / RISAO for informational purposes by Rotaract South Asia MDIO. Official notices of dues and termination are issued exclusively by Rotary International.