This document provides an overview of the application structure to help with deployment and maintenance.
main.py: Entry point for the application, imports from app.pyapp.py: Contains the Flask application, routes, and API endpointsutils/data_processor.py: Core data processing functionality for CSV filesgunicorn_config.py: Configuration for gunicorn server in production
templates/index.html: Main page template for the visualization interface
static/js/script.js: Main JavaScript file for 3D visualizationstatic/css/style.css: CSS styles for the application
-
Required Environment Variables:
SESSION_SECRET: Secret key for Flask sessionsPORT(optional): Port number to run the application on (defaults to 5000)
-
Core Dependencies:
- Flask: Web framework
- Pandas: For data processing
- NumPy: For numerical operations
- Gunicorn: WSGI HTTP Server for production
-
Entry Point: The application should be started using:
gunicorn --bind 0.0.0.0:PORT main:app -
File Uploads: The application processes CSV files directly in memory to avoid disk usage.
-
Memory Requirements: Processing large CSV files can require significant memory. Ensure your server has adequate resources.
-
Slow File Processing:
- Large CSV files are processed with memory-efficient methods, which may take time
- If consistently slow, consider pre-processing files or increasing server resources
-
Browser Performance:
- 3D visualization requires WebGL support
- Performance depends on client hardware and browser capabilities
-
File Size Limits:
- Default maximum upload size is 100MB
- Can be adjusted in the Flask configuration if needed
-
Keeping the Application Running:
- Use nohup, screen, or supervisor as described in the deployment guide
- Implement a monitoring system to restart the application if it crashes
-
Backups:
- The application doesn't store persistent data, but back up your configuration files
- If you customize the code, maintain version control