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.
Overview
The Projects module helps you organize and track client projects throughout their lifecycle. Each project can include multiple photos, category classification, client association, and detailed project information.Key Features
Multi-Photo Upload
Upload and store multiple project photos in Supabase Storage
Client Linking
Associate projects with clients from your directory
Category Organization
Categorize projects for better organization and filtering
Full CRUD
Create, read, update, and delete project records
Creating a New Project
Fill Project Details
Required fields:
- Name (
nombre): Project title or name - Client (
cliente): Select from existing clients - Category (
categoria): Project category ID - Photos (
fotos): Upload one or more images
- Additional project metadata
Photo Upload System
Project photos are stored in Supabase Storage with organized paths based on category:proyectos.php
Storage Structure
Project ID Generation
Projects use auto-incrementing IDs:proyectos.php
Project Record Structure
Pagination
Project listings support pagination:proyectos.php
- Default rows per page: 10
- URL parameters:
?page=2&rowsPerPage=20 - User configurable: Yes
Viewing Projects
Project details include:- Basic Info: Name, client, category
- Photo Gallery: All uploaded project images
- Timestamps: Creation and modification dates
- Metadata: Any additional project details
Projects are displayed in reverse chronological order by default (newest first).
Editing Projects
Update Information
Modify any of the following:
- Project name
- Client association
- Category assignment
- Add or remove photos
Deleting Projects
To delete a project:- Click the delete button
- Confirm the deletion
- The project record is permanently removed
Client Integration
Projects are linked to clients in the Clients module. When viewing a client, you can filter to see all their associated projects.Client Selection
When creating a project, select from the dropdown of existing clients. The client name is stored as a string reference in the project record.Category Organization
Projects must be assigned to a category. Categories are managed in the Content module and help organize projects by:- Service type (Web Design, Branding, Development)
- Industry sector
- Project scope
- Custom classifications
Database Table
Table Name:Proyectos
| Column | Type | Description |
|---|---|---|
id | integer | Auto-incrementing primary key |
nombre | text | Project name/title |
cliente | text | Client name reference |
categoria | integer | Category ID |
fotos | text[] | Array of storage paths |
created_at | timestamptz | Creation timestamp |
API Endpoints
The Projects module uses Supabase REST API:- GET
/rest/v1/Proyectos- List projects - POST
/rest/v1/Proyectos- Create project - PATCH
/rest/v1/Proyectos?id=eq.{id}- Update project - DELETE
/rest/v1/Proyectos?id=eq.{id}- Delete project
Best Practices
Troubleshooting
Photo Upload Fails
Causes:- File size exceeds limits
- Invalid file format
- Storage bucket permissions
upload_max_filesize, post_max_size, and Supabase Storage policies.
Category Not Found
Problem: “Selecciona una categoría válida” error Solution: Ensure the selected category ID exists in thecategoria-servicios table.
Client Association Issues
Problem: Client name not displaying Solution: Verify the client name exactly matches a record in theclientes table.
Next Steps
Clients
Manage client directory
Dashboard
View project statistics