11 Commits

Author SHA1 Message Date
c81d0b780d Implement performance optimizations for chart updates: adaptive throttling, data sampling, dynamic bin adjustment, and request batching 2025-08-27 08:21:58 +00:00
f8bb35e5be Remove unnecessary debug outputs for production performance 2025-08-27 08:03:15 +00:00
52b8ab2248 Fix wealth distribution histogram issue by correcting wealth calculation and improving data handling 2025-08-26 09:32:30 +00:00
eedaa253e4 Add comprehensive SEO improvements: meta tags, robots.txt, sitemap.xml, and favicon. Fix meta description rendering issues with proper HTML entity encoding. Update port configuration to use PORT environment variable. 2025-08-26 08:29:34 +00:00
dc6204068f Add: Advanced diagnostic tools for production debugging
New Diagnostic Endpoints:
- /test-simulation: Full simulation flow testing
- /api/test-websocket: WebSocket connectivity testing

Enhanced Browser Testing:
- testWebSocket(): Test real-time communication
- testDistributionChart(): Enhanced chart diagnostics
- WebSocket test message handler for live testing

Debugging Improvements:
- Real-time WebSocket message testing
- Manual chart update testing
- Complete simulation data flow validation
- End-to-end connectivity verification

These tools will help identify the exact failure point
in the wealth distribution histogram issue.
2025-08-24 19:01:01 +00:00
97e9e18ee5 Enhanced: Comprehensive production debugging and Nginx proxy support
Debugging Tools:
- Added /debug endpoint to verify deployment and test distribution functionality
- Added browser console test function: testDistributionChart()
- Enhanced SocketIO settings with better transport priorities
- Added comprehensive error tracking and status reporting

Nginx Configuration:
- Created NGINX_CONFIG.md with complete proxy setup guide
- Improved WebSocket transport settings and timeouts
- Better ping/pong settings for connection stability

Production Compatibility:
- Optimized SocketIO for proxy environments
- Enhanced fallback mechanisms
- Production-ready logging and error handling

This should resolve proxy-related issues and provide clear diagnostic tools.
2025-08-24 18:53:09 +00:00
0fbee684f4 Clean up: Remove Python cache files from repository
- Removed __pycache__ directories from git tracking
- These files are now properly excluded by .gitignore
- Maintains repository cleanliness as per best practices
2025-08-24 18:36:35 +00:00
1baf8421df Fix wealth distribution chart functionality 2025-08-24 20:12:52 +02:00
3a08de3a4a Fix wealth distribution chart functionality
- Add get_wealth_histogram() method to EconomicModel for histogram data
- Add new API endpoint /simulation/<id>/distribution for chart data
- Extend main data API with include_distribution parameter
- Update real-time progress updates to include distribution data
- Fix frontend updateCharts() to handle wealth distribution chart
- Add distribution data processing in simulation.js
- Update test_charts.py to verify histogram functionality

Resolves issue where wealth distribution chart was not updating during simulations.
2025-08-24 20:10:58 +02:00
27e185c2a6 Fix Markov simulation chart display issue
- Fix circular import issue by moving simulation_manager to app/__init__.py
- Enhance get_wealth_evolution to include inequality metrics data
- Add get_inequality_evolution method for complete chart data
- Update API to return top10_shares and capital_shares in evolution data
- Modify onSimulationComplete to fetch and populate charts with complete data
- Fix simulation threading to properly mark completion state
- Add test script to verify chart data generation

The charts now properly display simulation results by fetching complete
evolution data when simulation completes, resolving the empty diagrams issue.
2025-08-24 19:44:24 +02:00
26c82959a2 Initial commit: Markov Economics Simulation App 2025-08-24 19:12:50 +02:00