How lightning-president-9/coc-ancient-ruins-website works
This is a Flask-based clan analytics and engagement website. Members use its web/API routes to explore current and former member records, monthly and longitudinal performance, forecasts, clusters, player reports, and dashboards; the KARSB chatbot turns natural-language questions into dataset-backed answers. The graph and chatbot flows are directly supported by excerpts; several README-listed capabilities have unsampled implementations, so their internal links are omitted rather than inferred.
Main entry points: chat_controller.py Chat Orchestrator · graph_service.py Graph Services · app.py Flask App · api_routes.py Member APIs
Components 29
Web and APIs
- Flask App
app.py - Member APIs
routes/api_routes.py - GitHub Data APIs
routes/github_api_routes.py - Game Data Pages
routes/coc_routes.py - Rate Limiter
limiter_config.py
Clan Data
- Persisted Member Data
data_persist.py - Monthly Clan JSON
- GitHub Fetcher
services/github_service.py
Analytics
- Graph Routes
routes/graph_routes.py - Graph Services
services/graph_service.py - Member Graphs
graphs/clan_member_graph.py - Former Graphs
graphs/former_member_graph.py - Monthly Analysis
graphs/monthly_analysis_graph.py - Long-term Trends
graphs/all_month_graph.py - Member Clusters
graphs/member_cluster_graph.py - AI Routes
routes/ai_routes.py - Forecast Service
services/ai_service.py - AI Predictions
graphs/ai_prediction_graph.py
Member Experiences
- Player Dashboard
dashboard/player_dashboard.py - Dashboard Data
dashboard/player_data.py - Player Reports
graphs/player_report.py
KARSB Chatbot
- Chat Routes
routes/chatbot_routes.py - Chat Orchestrator
chatbot/chat_controller.py - Month Parsing
chatbot/month_normalizer.py - Dataset Routing
chatbot/domain_router.py - Data Fetching
chatbot/raw_fetcher.py - Operation Resolver
chatbot/operation_resolver.py - Response Builder
chatbot/response_builder.py
Other components
- Clan Member
Connections 30
- Clan Member → Flask App: uses
- Flask App → Member APIs: registers routes
app.py - Flask App → GitHub Data APIs: registers routes
- Clan Member → GitHub Data APIs: requests datasets
- GitHub Data APIs → GitHub Fetcher: fetches JSON
routes/github_api_routes.py - GitHub Fetcher → Monthly Clan JSON: reads
services/github_service.py - Member APIs → Persisted Member Data: serves records
- Member APIs → Rate Limiter: applies limits
routes/api_routes.py - Clan Member → Graph Routes: selects analyses
- Graph Routes → Graph Services: gets graph services
routes/graph_routes.py - Graph Services → Member Graphs: creates instance
services/graph_service.py - Graph Services → Former Graphs: creates instance
services/graph_service.py - Graph Services → Monthly Analysis: creates instance
services/graph_service.py - Graph Services → Long-term Trends: creates instance
services/graph_service.py - Graph Services → Member Clusters: creates instance
services/graph_service.py - Clan Member → AI Routes: views forecasts
- AI Routes → Forecast Service: requests forecast
routes/ai_routes.py - AI Routes → Graph Services: gets cluster service
routes/ai_routes.py - Clan Member → Player Dashboard: views dashboard
- Player Dashboard → Dashboard Data: loads player data
- Clan Member → Player Reports: views reports
- Clan Member → Chat Routes: asks questions
- Chat Routes → Chat Orchestrator: dispatches message
routes/chatbot_routes.py - Chat Orchestrator → Month Parsing: normalizes month
chatbot/chat_controller.py - Chat Orchestrator → Dataset Routing: selects dataset
chatbot/chat_controller.py - Chat Orchestrator → Data Fetching: fetches data
chatbot/chat_controller.py - Chat Orchestrator → Operation Resolver: resolves operation
chatbot/chat_controller.py - Chat Orchestrator → Response Builder: builds answer
chatbot/chat_controller.py - Chat Orchestrator → Monthly Clan JSON: uses hosted JSON
- Game Data Pages → Clan Member: renders game pages