Instruction file imported from phil-zyx/config-sheet-sql (
.cursor/rules/structure.mdc). Copyright stays with the author.
Core Components
- This project is a google apps script web app
Frontend Components
- Index.html: Main application interface for SQL query execution
- Admin.html: Administration panel for system configuration
- ConfigCheck.html: Interface for configuration validation
- Help.html: Documentation and help interface
Backend Components
- Code.js: Core application logic and SQL query processing
- API.js: API endpoints and webhook integration
- Config.js: Configuration management and settings
- Template.js: Template system for query patterns
- Validation.js: Data validation and integrity checks
- CheckWorkflow.js: Workflow execution and validation logic
- Utils.js: Shared utility functions
Key Features Implementation
SQL Query Processing
- Implemented in
Code.js - Uses AlaSQL for SQL parsing and execution
- Handles Google Sheets data access and transformation
Configuration Management
- Managed through
Config.js - Supports custom SQL implementations
- Handles validation rules and templates
Workflow System
- Implemented in
CheckWorkflow.js - Supports template-based workflows
- Enables configuration validation
- Integrates with webhook system
API Integration
- Handled by
API.js - Provides webhook endpoints
- Manages external system integration
Data Flow
-
User Interface (
Index.html)- Accepts SQL queries
- Displays results
- Manages query history
-
Query Processing (
Code.js)- Parses SQL
- Accesses Google Sheets
- Executes queries using AlaSQL
-
Data Validation (
Validation.js)- Validates input data
- Ensures data integrity
- Applies business rules
-
Workflow Execution (
CheckWorkflow.js)- Processes templates
- Executes validation rules
- Generates reports
Integration Points
Google Services
- Google Sheets API
- Google Drive API
- Google Apps Script
External Systems
- Webhook endpoints
- Custom SQL implementations
- Validation rules
Security Considerations
- Google OAuth authentication
- Access control for sheets
- Input validation
- Data sanitization
Performance Considerations
- Query optimization
- Data caching
- Batch processing
- Pagination support
Extension Points
Custom SQL Functions
- Implemented through
Config.js - Pluggable architecture
- Custom validation rules
Workflow Templates
- Managed in
Template.js - Customizable validation rules
- Configurable execution flow
API Integration
- Webhook support
- Custom endpoints
- External system integration