> ## 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.

# Quickstart Guide

> Get up and running with Grupo Mecsa CMS in minutes

## Welcome to Grupo Mecsa CMS

Grupo Mecsa CMS is a comprehensive content management system designed for Grupo Mecsa's internal operations. It provides powerful features for managing users, clients, projects, emails, blog posts, and more, all integrated with Supabase for secure authentication and data storage.

## Quick Setup

Get your CMS up and running in just a few steps:

<Steps>
  <Step title="Install Dependencies">
    Make sure you have XAMPP (or similar Apache/PHP environment) and Composer installed on your system.

    Clone the repository and install PHP dependencies:

    ```bash theme={null}
    git clone <repo-url> GrupoMecsaCMS
    cd GrupoMecsaCMS
    composer install
    ```

    This will install the required Guzzle HTTP client library for API communications.
  </Step>

  <Step title="Configure Supabase">
    Create or update your `config/supabase.php` file with your Supabase credentials:

    ```php theme={null}
    <?php
    global $supabase_url, $supabase_key, $supabase_service_role, $supabase_schema;

    $supabase_url = 'https://your-project.supabase.co';
    $supabase_key = 'your-anon-public-key';
    $supabase_service_role = 'your-service-role-key';
    $supabase_schema = 'cms';
    ?>
    ```

    <Note>
      For local development, you can create a `local.supabase.php` file that will override the default configuration without being tracked in git.
    </Note>
  </Step>

  <Step title="Setup Database">
    Import the database schema from the SQL files in the `docs/` directory:

    * `sql_cms_pages.sql` - Pages system
    * `sql_cms_templates.sql` - Template management
    * `sql_cms_menus.sql` - Menu structure
    * `sql_cms_media_library.sql` - Media library
    * Other SQL files for additional features

    Execute these in your Supabase SQL editor to create the necessary tables and schemas.
  </Step>

  <Step title="Start the Server">
    Start your Apache server through XAMPP and navigate to:

    ```
    http://localhost/GrupoMecsaCMS
    ```

    You'll be redirected to the login page automatically.
  </Step>

  <Step title="First Login">
    Log in with your Supabase user credentials. The system will:

    1. Authenticate against Supabase Auth
    2. Verify your email is confirmed
    3. Check if you have CMS access in the `Empleados` table
    4. Load your role and permissions
    5. Redirect you to the dashboard

    ```php theme={null}
    // Login credentials are verified through Supabase Auth
    $login = $supa->login($email, $pass);
    ```

    <Warning>
      Only users with CMS access in their `sistemas_acceso` field will be granted entry. Make sure your user account has the appropriate permissions set.
    </Warning>
  </Step>
</Steps>

## What's Next?

Now that you're set up, explore the key features:

<CardGroup cols={2}>
  <Card title="User Management" icon="users" href="/users/authentication">
    Manage users, roles, and permissions
  </Card>

  <Card title="Email Builder" icon="envelope" href="/email/overview">
    Create visual email templates with drag-and-drop
  </Card>

  <Card title="Content Management" icon="file-text" href="/modules/content">
    Manage pages, blog posts, and dynamic content
  </Card>

  <Card title="Dashboard" icon="gauge" href="/modules/dashboard">
    View analytics and system overview
  </Card>
</CardGroup>

## System Overview

The CMS is organized into several key modules:

* **Dashboard** - Overview of system activity and quick access
* **Users** - Employee and user management with role-based access
* **Clients** - Client relationship management
* **Projects** - Project tracking and management
* **Email Builder** - Visual email template creator
* **Blog** - Blog post management with categories
* **Pages** - Static and dynamic page management
* **Media** - File and image library
* **Settings** - System configuration and SEO settings

## Key Features

* Role-based access control (Admin, Comercial, Proyecto)
* Visual email builder compatible with Mailchimp/Gmail
* CRUD operations for all modules
* Pagination and filtering in all listings
* SEO optimization tools
* Content versioning
* Template system with dynamic regions
* Media library with folder organization

## Getting Help

If you encounter any issues:

1. Check the [Installation Guide](/installation) for detailed setup instructions
2. Review the installation troubleshooting section for common issues
3. Consult the module-specific documentation for feature details

<Note>
  This system is for internal use by Grupo Mecsa authorized personnel only. Keep your credentials secure and never commit sensitive configuration files to version control.
</Note>
