Summary
Frontend (ReactJS)
User Interface Functions
- renderMap() : Renders the interactive map on the UI.
- displayAOITool() : Provides tools for drawing the Area of Interest (AOI) on the map.
- showSatelliteDataOptions() : Displays available satellite data options for selection.
- updateFiltersUI() : Updates the UI with filter options for image selection.
- displayResults() : Shows analysis results on the map or in a separate results panel.
- handleModuleSelection() : Manages the user's selection of different modules (Bathymetry, Shoreline, etc.).
User Interaction Handlers
- handleSignIn() : Manages the sign-in flow for users.
- handleRegistration() : Handles new user registrations.
- handleVideoTutorial() : Triggers the video tutorial for first-time users.
- handleDownloadResults() : Initiates the download of results.
State Management Functions
- setSelectedSatellite() : Stores the selected satellite in the state.
- setAOI() : Saves the drawn AOI to the state.
- setSelectedImages() : Saves the selected images and applied filters to the state.
- setAnalysisParameters() : Stores analysis parameters like bands, algorithms, and thresholds.
Backend (NodeJS)
Authentication and User Management
- registerUser() : Registers a new user in the system.
- authenticateUser() : Authenticates user credentials.
Geospatial Data Processing
- fetchSatelliteData() : Retrieves satellite data from Google Earth Engine.
- processBathymetry() : Processes bathymetric data based on user inputs.
- processShorelineAnalysis() : Performs shoreline change analysis.
- processCoastalSqueezeAnalysis() : Conducts coastal squeeze analysis.
Data Management
- saveUserAnalysis() : Saves a user's analysis session for later retrieval.
- retrieveUserAnalysis() : Retrieves a saved analysis session for the user.
API Integration
- geeQuery() : Sends a query to Google Earth Engine and retrieves results.
- downloadData() : Prepares data for download and sends it to the frontend.
Utility Functions
- logActivity() : Logs user activity for analytics or debugging.
- sendEmailNotification() : Sends notifications or confirmations to users via email.
These functions represent a high-level view of the possible interactions and data flow between the frontend and backend in a geospatial analysis application like CASSIE. The frontend is mainly concerned with user interaction and presentation, while the backend handles data processing, storage, and external API communication.