Introduction
The SGD-MCS backend is built on Google Apps Script and provides a comprehensive API for managing academic entities, documents, and file storage through Google Drive and Google Sheets.Architecture
The backend is organized into specialized services:- EntityManager: Universal CRUD operations for all database entities
- DriveManager: Automated folder structure and Drive integration
- DriveFileManager: Advanced file and folder operations
- SearchService: Universal search across database entities
- DataService: Bulk data retrieval for listings
Calling the API
All backend functions are accessed viagoogle.script.run from the frontend:
Response Format
Most API functions return a standardized response object:Some services (SearchService, DataService) return JSON strings that need to be parsed:
Entity Types
The system supports five main entity types:| Type | Spanish | ID Prefix | Description |
|---|---|---|---|
estudiante | Estudiante | EST | Graduate students |
docente | Docente | DOC | Faculty members |
externo | Externo | EXT | External evaluators |
tesis | Tesis | TES | Thesis projects |
evento | Evento | EVE | Academic events |
Automatic Features
Auto-Generated IDs
All entities automatically receive unique IDs (e.g., EST0001, DOC0042) when created without an ID.Audit Trail
The system automatically logs:- User email
- Timestamps (creation and last update)
- Action history for all operations
Drive Integration
Each entity can have an associated Drive folder created automatically with the structure:Getting Started
- Create an entity: Use EntityManager.createItem()
- Manage files: Use DriveManager to manage folders and files
- Search data: Use SearchService.executeSearch()
- List entities: Use DataService for bulk retrieval
Error Handling
All functions use try-catch blocks and return error information:Next Steps
EntityManager
Create, update, and delete entities
DriveManager
Manage Drive folders and structure
SearchService
Search across all entities
DataService
Retrieve entity listings