Skip to main content

Overview

As a Quality Hub GINEZ administrator, you’re responsible for keeping the system running smoothly, performing routine maintenance, and troubleshooting issues. This guide covers essential maintenance tasks, system health monitoring, and optimization strategies.

Daily Maintenance Tasks

Morning System Check

Perform these checks at the start of each business day:
1

Verify System Access

  • Log in to confirm the application is running
  • Check that the dashboard loads correctly
  • Verify Supabase connection is active
2

Review Pending Approvals

  • Go to Configuración → Usuarios
  • Check for pending user registrations
  • Approve or reject new user requests
3

Check Audit Logs

  • Review Configuración → Auditoría
  • Look for unusual activity overnight
  • Investigate any red flags
4

Test Critical Functions

  • Create a test bitácora entry
  • View a report to confirm data is loading
  • Download a document to verify catalog access

User Support Tasks

Throughout the day: ✅ Monitor for user-reported issues ✅ Reset passwords for locked-out users ✅ Assist with permission-related questions ✅ Help users navigate the system

Weekly Maintenance Tasks

Data Quality Review

Every week:
1

Review Recent Bitácora Entries

  • Check for incomplete or suspicious entries
  • Verify batch numbers are formatted correctly
  • Look for duplicate entries
2

Quality Control Validation

  • Review conformity rates by branch
  • Investigate batches marked non-conforming
  • Verify measurements are within expected ranges
3

Catalog Synchronization

  • Verify Google Sheets sync is working
  • Check for new products added
  • Update product standards if needed
4

User Activity Review

  • Check inactive user accounts
  • Review permission changes made
  • Verify new users are properly onboarded

Performance Monitoring

Check system performance:
  • Page Load Times: Dashboard should load in < 3 seconds
  • Database Queries: Reports should generate in < 5 seconds
  • Supabase Usage: Monitor API request limits
  • Storage Usage: Track database growth trends

Monthly Maintenance Tasks

Comprehensive System Review

1

User Access Audit

  • Review all active users and their roles
  • Disable accounts for departed employees
  • Update roles for users who changed positions
  • Verify no unauthorized admin accounts exist
2

Permission Review

  • Check that permissions align with job functions
  • Remove excessive permissions
  • Grant new permissions as needed
  • Document any changes made
3

Data Cleanup

  • Archive old records if necessary
  • Remove test data
  • Clean up duplicate entries
  • Verify data integrity
4

Documentation Update

  • Review internal procedures
  • Update screenshots if UI changed
  • Document new workflows
  • Update user training materials
5

Backup Verification

  • Confirm Supabase automated backups are running
  • Test restore procedure (in development environment)
  • Document backup locations
  • Verify backup retention policies

System Health Check

1

Database Health

Access Supabase dashboard:
  • Check database size and growth rate
  • Review slow query logs
  • Monitor connection pool usage
  • Verify RLS policies are enforced
2

Application Performance

  • Review browser console for JavaScript errors
  • Test all modules for functionality
  • Check mobile responsiveness
  • Verify all links and buttons work
3

Integration Status

  • Test Google Sheets catalog sync
  • Verify Google Drive document links
  • Check email delivery (password resets)
  • Test authentication flow

Troubleshooting Common Issues

Users Cannot Log In

Symptoms: User enters correct credentials but cannot access system Possible Causes:
  • Account not approved
  • Email not verified
  • Supabase authentication service down
  • Browser cache/cookies issue
Solutions:
1

Verify Account Status

  • Check Configuración → Usuarios
  • Ensure user account is approved
  • Verify email is confirmed in Supabase
2

Check Supabase Status

  • Visit Supabase Status
  • Check your project’s health in Supabase dashboard
3

User Troubleshooting

Ask user to:
  • Clear browser cache and cookies
  • Try incognito/private browsing mode
  • Try a different browser
  • Check for browser extensions blocking authentication
4

Reset Password

  • Have user request password reset
  • Or manually reset via Supabase dashboard

Data Not Loading / Blank Pages

Symptoms: Dashboard or modules show “Loading…” indefinitely or blank content Possible Causes:
  • Supabase connection issue
  • RLS policies blocking data
  • JavaScript errors
  • API rate limits exceeded
Solutions:
1

Check Browser Console

  • Press F12 to open developer tools
  • Look for red error messages
  • Screenshot errors for troubleshooting
2

Verify Database Connection

  • Check Supabase dashboard
  • Verify project is not paused
  • Check API keys are valid
3

Test with Admin Account

  • Log in with administrator account
  • If data loads, it’s a permissions issue
  • If data still doesn’t load, it’s a system issue
4

Check RLS Policies

In Supabase:
  • Go to Table Editor
  • Verify RLS is enabled
  • Test policies with SQL query

Reports Showing Incorrect Data

Symptoms: KPIs or charts display unexpected values Possible Causes:
  • Incorrect filters applied
  • Data entry errors in bitácora
  • Calculation logic issues
  • Date range problems
Solutions:
1

Verify Filters

  • Check date range selection
  • Ensure correct branch/product filters
  • Reset filters and try again
2

Audit Source Data

  • Go to Bitácora or Control de Calidad
  • Manually review recent entries
  • Look for obviously incorrect values
  • Correct data entry errors
3

Test Calculations

  • Manually calculate a KPI
  • Compare with system value
  • If mismatch, investigate calculation logic

Catalog Not Syncing

Symptoms: New products don’t appear in catalog Possible Causes:
  • Google Sheets not published
  • CSV export URL changed
  • Network/CORS issues
  • Sheet formatting changed
Solutions:
1

Verify Google Sheets

  • Ensure sheet is published to web
  • Check CSV export URL is accessible
  • Test URL in browser (should download CSV)
2

Check Environment Variables

  • Verify .env.local has correct URLs:
    • SHEET_MP_CSV_URL
    • SHEET_PT_CSV_URL
  • Restart development server after changes
3

Test Data Format

  • Download CSV manually
  • Verify column headers match expected format
  • Check for special characters or encoding issues

System Optimization

Performance Tuning

1

Database Optimization

In Supabase dashboard:
  • Review slow query logs
  • Add indexes to frequently queried columns
  • Optimize RLS policies
  • Archive old data if table is large
2

Caching Strategy

Consider implementing:
  • Catalog data caching (instead of fetching every page load)
  • User profile caching
  • Report data caching for common queries
3

Code Optimization

Work with developers to:
  • Implement lazy loading for heavy components
  • Optimize React render cycles
  • Reduce bundle size
  • Compress images

Storage Management

Supabase free tier has storage limits. Monitor usage to avoid service interruption.
Monitor Storage Usage:
  • Database size
  • File uploads (avatars, documents)
  • Logs and audit tables
Optimize Storage:
  • Archive old audit logs
  • Compress uploaded images
  • Remove unused test data
  • Implement data retention policies

Backup and Recovery

Supabase Automated Backups

Supabase provides automated backups:
  • Free tier: Daily backups (7 day retention)
  • Pro tier: Daily backups with point-in-time recovery
Access Backups:
  1. Go to Supabase Dashboard
  2. Select your project
  3. Navigate to Database → Backups
  4. View available backup points

Manual Backup Procedures

1

Export Critical Tables

-- In Supabase SQL Editor
COPY (SELECT * FROM bitacora_produccion) TO '/tmp/bitacora_backup.csv' CSV HEADER;
COPY (SELECT * FROM profiles) TO '/tmp/profiles_backup.csv' CSV HEADER;
2

Download Database Dump

Use Supabase CLI or pg_dump:
pg_dump -h db.xxx.supabase.co -U postgres -d postgres > backup.sql
3

Store Securely

  • Save backups to secure, encrypted storage
  • Keep multiple versions (daily, weekly, monthly)
  • Test restore procedures regularly

Disaster Recovery Plan

If the system becomes unavailable:
1

Assess the Situation

  • Determine scope of outage
  • Check Supabase status page
  • Review error logs
2

Communicate with Users

  • Notify users of outage
  • Provide estimated restoration time
  • Offer alternative procedures if available
3

Restore Service

  • If Supabase issue: Wait for resolution
  • If application issue: Deploy previous working version
  • If data corruption: Restore from backup
4

Post-Mortem

  • Document what happened
  • Identify root cause
  • Implement preventive measures
  • Update disaster recovery procedures

Security Maintenance

Regular Security Tasks

1

Update Dependencies

Monthly or when security vulnerabilities announced:
npm audit
npm update
npm audit fix
2

Review API Keys

  • Rotate Supabase keys if exposed
  • Check for API key leaks in public repos
  • Verify environment variables are secure
3

Monitor Authentication

  • Review failed login attempts
  • Check for brute force patterns
  • Disable accounts with suspicious activity
4

Audit Admin Accounts

  • Verify all admin accounts are authorized
  • Remove admin privileges from departed employees
  • Use admin accounts only when necessary

Security Best Practices

Use Strong Passwords: Enforce password complexity Enable 2FA: For admin accounts (if available) Regular Audits: Review logs and access patterns Principle of Least Privilege: Grant minimal necessary permissions Keep Updated: Apply security patches promptly

Monitoring and Alerts

Key Metrics to Monitor

MetricTargetAction Threshold
System Uptime99.5%+< 99% - investigate
Page Load Time< 3 sec> 5 sec - optimize
Failed Logins< 5/day> 20/day - security check
Database Size< 80% limit> 90% - archive data
API Errors< 1% requests> 5% - urgent investigation
User GrowthSteadySudden spike - verify legitimate

Setting Up Alerts

Supabase Alerts:
  1. Go to Supabase Dashboard
  2. Navigate to Settings → Monitoring
  3. Configure alerts for:
    • High CPU usage
    • Storage nearly full
    • Connection pool exhausted
    • API error rate spikes
Application Monitoring:
  • Use browser extension to monitor page performance
  • Set up error tracking (e.g., Sentry)
  • Monitor user reports and feedback

Maintenance Checklist

Daily

  • System access check
  • Review pending user approvals
  • Check audit logs
  • Respond to user support requests

Weekly

  • Data quality review
  • Performance monitoring
  • Catalog sync verification
  • Inactive user review

Monthly

  • Comprehensive user access audit
  • Permission review and cleanup
  • Database health check
  • Backup verification
  • Security dependency updates
  • Documentation updates

Quarterly

  • Full system security audit
  • Disaster recovery drill
  • User training sessions
  • Feature usage analysis
  • Capacity planning review

Getting Help

Internal Resources

  • System documentation in /docs
  • Source code comments
  • README.md in project root

External Resources

Escalation Path

  1. Level 1 - User Issues: Admin troubleshoots
  2. Level 2 - System Issues: Development team
  3. Level 3 - Infrastructure: Supabase support / IT
  4. Level 4 - Critical: Management escalation

Build docs developers (and LLMs) love