Skip to main content
Manage all program documents through an integrated Google Drive file browser with upload, organization, and search capabilities.

Overview

The Document Repository provides a unified interface to access, organize, and manage all Master’s program documentation stored in Google Drive.

Key Features

Drive Integration

Direct connection to Google Drive with real-time sync

File Browser

Navigate folder structures with breadcrumb navigation

Bulk Upload

Upload multiple files simultaneously with progress tracking

Universal Search

Search files and folders across the entire repository

Repository Home

Interface Layout

alt=β€œRepository interface with sidebar and file grid” /> The repository interface consists of:
  1. Top Navigation Bar
    • Breadcrumb navigation
    • Search bar
    • New folder button
    • Refresh button
    • View mode toggle (grid/list)
    • Upload button
  2. Left Sidebar (Desktop only)
    • Folder tree navigation
    • Expandable/collapsible folders
    • Current location highlight
  3. Main Content Area
    • File and folder cards (grid view)
    • File and folder rows (list view)
    • Selection checkboxes

View Modes

  • Large file icons
  • File thumbnails (for images/PDFs)
  • Best for visual browsing
const [viewMode, setViewMode] = useState(
  localStorage.getItem('repoViewMode') || 'grid'
);
The breadcrumb shows your current location:
🏠 Google Drive > Estudiantes > 2024-1 > EST-2024-01-001
  • Click any level to jump to that folder
  • Home icon returns to root
  • Current location is highlighted in blue

Folder Tree Sidebar

Expand folders to see nested structure:
  • ▢️ Click arrow to expand
  • β–Ό Click arrow to collapse
  • πŸ“ Click folder name to navigate
  • Current folder has blue background
The folder tree loads dynamically. Only visible folders are expanded to improve performance.

File Management

Uploading Files

1

Click Upload Button

Located in top-right corner with cloud upload icon
2

Select Files

Drag and drop or click to browse (multi-select supported)
3

Monitor Progress

Progress bar shows upload status for each file
4

Automatic Refresh

File list refreshes automatically when upload completes

File Uploader Modal

alt=β€œFile upload modal with progress bars” /> Features:
  • Multiple file selection
  • Drag-and-drop zone
  • Individual progress bars
  • Cancel option per file
  • Success/error indicators
// Upload to current folder
const handleUpload = async (files) => {
  for (const file of files) {
    await api.drive.uploadFile(currentFolder.id, file);
  }
  handleRefresh();
};

Creating Folders

1

Click New Folder

Plus icon in the toolbar
2

Enter Name

Popup dialog requests folder name
3

Confirm

Folder is created in current location
Folder names must be unique within the same parent folder. Duplicate names will show an error.

File Actions

Hover over any file or folder to reveal action buttons:
IconActionDescription
πŸ‘οΈPreviewView file preview (images, PDFs)
⬇️DownloadDownload file to your computer
πŸ”—Copy LinkCopy shareable Drive link
πŸ“‚Open in DriveOpen file in Google Drive web interface
πŸ—‘οΈDeleteMove file to Drive trash

Bulk Selection

1

Enable Selection

Click checkboxes on files/folders
2

Selection Counter

Top-right shows β€œX seleccionados”
3

Bulk Actions

Delete button appears in toolbar
4

Clear Selection

Click X or refresh page
alt=β€œMultiple files selected with action bar” />

Search Functionality

The search bar performs universal search across:
  • File names
  • Folder names
  • File contents (for supported types)
  • Metadata
const handleSearch = async () => {
  const results = await api.drive.searchUniversal(searchQuery);
  const foundFiles = results.filter(item => item.type === 'file');
  const foundFolders = results.filter(item => item.type === 'folder');
  
  setFiles(foundFiles);
  setFolders(foundFolders);
};

Search Results

Search results show:
  • File/Folder Name: Highlighted matches
  • Parent Folder Path: Where the file is located
  • Last Modified: Date timestamp
  • File Type: Icon indicator
Press Enter or click the search icon to trigger search. Results update in real-time as you type (500ms debounce).
Click the X button in the search bar to:
  • Clear search query
  • Return to current folder view
  • Reset filters

File Types & Icons

Supported File Types

The repository recognizes and displays icons for:
const fileIcons = {
  // Documents
  'pdf': <FilePdf />,
  'doc': <FileWord />,
  'docx': <FileWord />,
  
  // Spreadsheets
  'xls': <FileExcel />,
  'xlsx': <FileExcel />,
  'csv': <FileSpreadsheet />,
  
  // Presentations
  'ppt': <FilePowerpoint />,
  'pptx': <FilePowerpoint />,
  
  // Images
  'jpg': <FileImage />,
  'jpeg': <FileImage />,
  'png': <FileImage />,
  'gif': <FileImage />,
  
  // Archives
  'zip': <FileArchive />,
  'rar': <FileArchive />,
  
  // Default
  'default': <File />
};

File Thumbnails

For image files and PDFs, the system displays thumbnails:
  • Auto-generated from Drive API
  • 200x200px preview size
  • Cached for performance

Folder Structure

πŸ“ Google Drive (Root)
β”œβ”€β”€ πŸ“ Estudiantes/
β”‚   β”œβ”€β”€ πŸ“ 2024-1/
β”‚   β”‚   β”œβ”€β”€ πŸ“ EST-2024-01-001/
β”‚   β”‚   β”œβ”€β”€ πŸ“ EST-2024-01-002/
β”‚   β”‚   └── ...
β”‚   └── πŸ“ 2024-2/
β”‚       └── ...
β”œβ”€β”€ πŸ“ Docentes/
β”‚   β”œβ”€β”€ πŸ“ DOC-2024-01-001/
β”‚   └── ...
β”œβ”€β”€ πŸ“ Tesis/
β”‚   β”œβ”€β”€ πŸ“ 2024/
β”‚   β”‚   β”œβ”€β”€ πŸ“ [Student Name] - TES-2024-01-001/
β”‚   β”‚   └── ...
β”‚   └── πŸ“ 2023/
β”‚       └── ...
β”œβ”€β”€ πŸ“ Eventos/
β”‚   β”œβ”€β”€ πŸ“ Seminarios/
β”‚   β”œβ”€β”€ πŸ“ Congresos/
β”‚   └── ...
└── πŸ“ Administrativo/
    β”œβ”€β”€ πŸ“ Actas/
    β”œβ”€β”€ πŸ“ Resoluciones/
    └── ...

Auto-Created Folders

The system automatically creates folders when:
  • A new student is registered (with toggle enabled)
  • A new teacher is added
  • A new thesis is created
  • An event is scheduled
Auto-created folders follow naming conventions based on entity type and ID.

Folder Explorer Component

The <FolderExplorer> component is used throughout the system:
<FolderExplorer
  folderId={formData.ID_Carpeta_Drive}
  folderUrl={formData.URL_Carpeta_Drive}
  entityType="estudiante"
  entityId={formData.ID_Estudiante}
  entityData={formData}
/>

Integration Points

  • Student forms (Documents tab)
  • Teacher forms
  • Thesis forms
  • Event forms
  • Standalone repository page

Refresh & Sync

Manual Refresh

Click the refresh button (πŸ”„) to:
  • Reload current folder contents
  • Sync with Drive changes
  • Update folder tree
  • Clear cache

Automatic Refresh

The repository auto-refreshes after:
  • File upload completes
  • Folder is created
  • File/folder is deleted
  • Navigation to new folder
const handleRefresh = () => {
  if (currentFolder) {
    loadFolderContents(currentFolder.id);
  } else {
    loadRootFolder();
  }
  setTreeRefreshKey(prev => prev + 1); // Triggers tree reload
};

Performance Optimization

Lazy Loading

Folders load on-demand when expanded

Debounced Search

Search waits 500ms after typing stops

Cached Thumbnails

File previews are cached in browser

Parallel Requests

File list and folder tree load simultaneously

Loading States

alt=β€œSkeleton loaders for files and folders” />
  • Skeleton cards during load
  • Spinner icon on refresh button
  • Progress bars during upload

Error Handling

Common Errors

ErrorCauseSolution
No se pudo conectar con DriveDrive API connection failedCheck internet connection and retry
Carpeta no encontradaFolder was deleted or movedNavigate back to parent folder
Permiso denegadoInsufficient Drive permissionsContact system administrator
Archivo muy grandeFile exceeds upload limitUse Google Drive web interface for large files
If you see repeated connection errors, the Drive API credentials may need to be refreshed. Contact your system administrator.

Source Code Reference

Key components:
  • Repository home: Fronted/src/pages/repository/RepositoryHome.jsx:14
  • File manager: Fronted/src/pages/repository/FileManager.jsx
  • File uploader: Fronted/src/pages/repository/FileUploader.jsx
  • Folder tree: Fronted/src/pages/repository/FolderTree.jsx
  • Folder explorer: Fronted/src/components/common/FolderExplorer.jsx
  • Drive API: Backend/services/DriveManager.js

API Integration

The repository uses Google Drive API v3:
// Backend
api.drive = {
  getRootFolder: () => GET /api/drive/root,
  getFolderTree: (folderId, depth) => GET /api/drive/tree/${folderId},
  getFiles: (folderId) => GET /api/drive/files/${folderId},
  uploadFile: (folderId, file) => POST /api/drive/upload,
  createFolder: (parentId, name) => POST /api/drive/folder,
  deleteFile: (fileId) => DELETE /api/drive/file/${fileId},
  searchUniversal: (query) => GET /api/drive/search?q=${query}
}

Student Management

Access student document folders

Thesis Tracking

Manage thesis documents

Teacher Management

Access faculty documents

Build docs developers (and LLMs) love