Documentation Index
Fetch the complete documentation index at: https://mintlify.com/emmanueljarquin-sys/GrupoMecsaCMS/llms.txt
Use this file to discover all available pages before exploring further.
System Requirements
Before installing Grupo Mecsa CMS, ensure your system meets these requirements:Required Software
- PHP: Version 7.4 or higher (8.0+ recommended)
- Apache: 2.4 or higher (included in XAMPP)
- Composer: Latest version for dependency management
- Supabase Account: Active project with database access
Recommended Environment
XAMPP is the recommended local development environment for Windows users. It includes Apache, PHP, and all necessary components pre-configured.
PHP Extensions
The following PHP extensions must be enabled:curl- For HTTP requests to Supabase APIjson- For JSON encoding/decodingmbstring- For multi-byte string supportopenssl- For secure connectionssession- For user session management
Installation Steps
Clone the Repository
Clone the Grupo Mecsa CMS repository to your web server directory:The project structure should look like this:
Install PHP Dependencies
Use Composer to install the required dependencies:This installs:
- guzzlehttp/guzzle (^7.10) - HTTP client for API requests
Configure Supabase Connection
Set up your Supabase credentials in The system automatically detects production by checking for
config/supabase.php:Finding Your Credentials:
- Go to your Supabase Dashboard
- Select your project
- Navigate to Settings > API
- Copy the Project URL and API keys
Environment-Specific Configuration
For local development, createlocal.supabase.php (gitignored):grupomecsa.net in the hostname.Setup Database Schema
Import the database schema into your Supabase project:
Create the CMS Schema
First, create thecms schema in Supabase SQL Editor:Import Core Tables
Execute each SQL file from thedocs/ directory in this order:- Templates -
sql_cms_templates.sql - Pages -
sql_cms_pages.sql - Menus -
sql_cms_menus.sql - Media Library -
sql_cms_media_library.sql - Widgets -
sql_cms_widgets.sql - Content Versions -
sql_content_versions.sql - SEO Settings -
sql_seo_settings.sqlandsql_seo_meta.sql
Configure Employee Access
Create the
Empleados table in the public schema for user management:Add Your First Admin User
- Create a user in Supabase Auth (Authentication > Users)
- Insert a record in the
Empleadostable:
The
sistemas_acceso field must include ‘CMS’ for the user to access the system. Users without this permission will be denied access even with valid Supabase credentials.Configure Apache
Verify Installation
Access your CMS installation:You should see the login page with:
- Grupo Mecsa branding on the left sidebar
- Login form with email and password fields
- “Forgot password” option
Test Login
- Enter your Supabase user credentials
- Click “Entrar al Sistema”
- If successful, you’ll be redirected to the dashboard
Post-Installation Configuration
Session Management
The CMS uses PHP sessions to maintain user state. Sessions store:token- Supabase access tokenrefresh_token- For token renewalemail- User emailuid- User ID from Supabase Authrol- User role (Administrador, Comercial, Proyecto)nombre- User display namechat_role- Chat system role (if applicable)
Security Considerations
File Permissions
Ensure these directories are writable:Troubleshooting
Common Issues
Issue: “Access Denied” after successful login
Cause: User doesn’t have CMS access in theEmpleados table.
Solution:
Issue: “Email not confirmed” error
Cause: The user’s email hasn’t been verified in Supabase Auth. Solution:- Check email for confirmation link
- Or manually confirm in Supabase Dashboard > Authentication > Users
- Or use the “Reenviar Verificación” button on the login page
Issue: Blank page or errors on login
Cause: PHP errors or missing dependencies. Solution:- Check Apache error logs:
- Enable error display in
php.ini: - Verify Composer dependencies:
Issue: Cannot connect to Supabase
Cause: Incorrect credentials or network issues. Solution:- Verify credentials in
config/supabase.php - Test connection manually:
- Check firewall/network settings
- Ensure SSL certificates are valid
Issue: Windows SSL certificate errors
Cause: XAMPP on Windows may have SSL verification issues. Solution: The system uses--ssl-no-revoke flag for Windows environments automatically. If issues persist:
- Download latest
cacert.pemfrom curl.se - Update
php.ini:
Issue: 403 Forbidden errors on API requests
Cause: Row Level Security (RLS) policies blocking access. Solution:- Use service role key for admin operations
- Review RLS policies in Supabase
- Ensure user has proper role assignments
Debug Mode
Enable debug output by adding toconfig/supabase.php:
Performance Tips
-
Enable OPcache in production:
- Use cURL instead of shell_exec on Linux (automatic)
-
Configure session storage for better performance:
Next Steps
Once installation is complete:- Configure user roles and permissions
- Set up email templates
- Create your first content
- Manage your dashboard
Keep your system updated by regularly running
composer update and pulling the latest changes from the repository.Support
For additional help:- Review the Quickstart Guide for basic setup
- Check module-specific documentation
- Contact the development team for internal support
This is an internal system for Grupo Mecsa authorized personnel only. Keep all credentials secure and follow company security policies.