### Clone and Install Relaticle Project Source: https://relaticle.com/docs/developer Use this command to clone the repository and install dependencies for local development. ```bash git clone https://github.com/Relaticle/relaticle.git cd relaticle && composer app-install composer run dev ``` -------------------------------- ### Get Companies with Query Parameters Source: https://relaticle.com/docs/api Example of making a GET request to the /v1/companies endpoint with various query parameters for filtering, sorting, and pagination. ```shell curl -X GET \ 'https://api.relaticle.com/v1/companies' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' ``` -------------------------------- ### Manual Relaticle Installation Steps Source: https://relaticle.com/docs/developer Follow these steps for a manual installation of Relaticle, including composer, npm, and artisan commands. ```bash git clone https://github.com/Relaticle/relaticle.git cd relaticle composer install npm install cp .env.example .env php artisan key:generate php artisan migrate php artisan storage:link npm run build composer run dev ``` -------------------------------- ### Start Docker Containers Source: https://relaticle.com/docs/self-hosting Start the Relaticle Docker containers in detached mode. ```bash docker compose up -d ``` -------------------------------- ### Install Composer and NPM Dependencies Source: https://relaticle.com/docs/self-hosting Installs project dependencies using Composer for PHP and NPM for Node.js. `--no-dev` and `--optimize-autoloader` are used for production. ```bash composer install --no-dev --optimize-autoloader npm ci && npm run build ``` -------------------------------- ### Start Supervisor Horizon Process Source: https://relaticle.com/docs/self-hosting Commands to reload Supervisor configuration, update processes, and start the Relaticle Horizon worker. ```bash sudo supervisorctl reread sudo supervisorctl update sudo supervisorctl start relaticle-horizon ``` -------------------------------- ### Configure Environment and Generate Key Source: https://relaticle.com/docs/self-hosting Copies the example environment file and generates a new application key. Edit the `.env` file with your specific credentials. ```bash cp .env.example .env php artisan key:generate ``` -------------------------------- ### Nginx Configuration for Relaticle Source: https://relaticle.com/docs/self-hosting Example Nginx server block configuration for serving the Relaticle application. Ensure `server_name` and PHP-FPM socket path are correct. ```nginx server { listen 80; server_name crm.example.com; root /var/www/relaticle/public; index index.php; location / { try_files $uri $uri/ /index.php?$query_string; } location ~ \.php$ { fastcgi_pass unix:/run/php/php8.4-fpm.sock; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } location ~ /\.(?!well-known).* { deny all; } } ``` -------------------------------- ### Import Opportunities CSV Example Source: https://relaticle.com/docs/import CSV format for importing opportunities. Includes required 'name' and optional custom fields like 'amount' and 'stage'. Relationships like 'company' and 'contact' can be matched by various identifiers. ```csv name,company,contact,custom_fields_amount,custom_fields_stage Q1 Enterprise Deal,acme.com,john@acme.com,50000,Proposal ``` -------------------------------- ### Request with JSON Body Source: https://relaticle.com/docs/api Example of a request that includes a JSON body for parameters like per_page, cursor, and page. ```shell curl -X POST \ 'https://api.relaticle.com/v1/some-endpoint' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ -d '{ "per_page": 16, "cursor": "ab", "page": 52 }' ``` -------------------------------- ### Import Notes CSV Example Source: https://relaticle.com/docs/import CSV format for importing notes. Requires a 'title' and can link to 'company'. Notes are created as new records and do not use matching. ```csv title,company Meeting Notes,acme.com ``` -------------------------------- ### Get Current User Source: https://relaticle.com/docs/api Retrieves information about the currently authenticated user. ```shell curl -X GET \ 'https://api.relaticle.com/v1/user' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' ``` -------------------------------- ### Get Notes Source: https://relaticle.com/docs/api Retrieves a list of notes from the CRM workspace. ```APIDOC ## GET /v1/notes ### Description Retrieves a list of notes in your CRM workspace. ### Method GET ### Endpoint /v1/notes ``` -------------------------------- ### Get Tasks Source: https://relaticle.com/docs/api Retrieves a list of tasks from the CRM workspace. ```APIDOC ## GET /v1/tasks ### Description Retrieves a list of tasks in your CRM workspace. ### Method GET ### Endpoint /v1/tasks ``` -------------------------------- ### Get Opportunity by ID Source: https://relaticle.com/docs/api Retrieves a specific sales opportunity by its ID. Ensure the provided ID is valid. ```shell curl -X GET \ 'https://api.relaticle.com/v1/opportunities/789' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' ``` -------------------------------- ### Import Tasks CSV Example Source: https://relaticle.com/docs/import CSV format for importing tasks. Requires a 'title' and can include an 'assignee', 'company', and custom fields like 'due_date' and 'priority'. Assignees can be matched by email. ```csv title,assignee,company,custom_fields_due_date,custom_fields_priority Follow up with client,assignee@yourcompany.com,acme.com,2024-03-15,High ``` -------------------------------- ### Get Opportunity by ID Source: https://relaticle.com/docs/api Retrieves a specific sales opportunity by its ID. ```APIDOC ## GET /v1/opportunities/{id} ### Description Retrieves a specific sales opportunity by its unique identifier. ### Method GET ### Endpoint /v1/opportunities/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the opportunity. ``` -------------------------------- ### Get User Info Source: https://relaticle.com/docs/api Retrieves information about the currently authenticated user. ```APIDOC ## GET /v1/user ### Description Retrieves information about the currently authenticated user. ### Method GET ### Endpoint /v1/user ``` -------------------------------- ### Get Opportunities Source: https://relaticle.com/docs/api Retrieves a list of sales opportunities from the CRM workspace. ```APIDOC ## GET /v1/opportunities ### Description Retrieves a list of sales opportunities in your CRM workspace. ### Method GET ### Endpoint /v1/opportunities ``` -------------------------------- ### Get Task by ID Source: https://relaticle.com/docs/api Retrieves a specific task by its ID. ```APIDOC ## GET /v1/tasks/{id} ### Description Retrieves a specific task by its unique identifier. ### Method GET ### Endpoint /v1/tasks/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the task. ``` -------------------------------- ### Get Note by ID Source: https://relaticle.com/docs/api Retrieves a specific note by its ID. ```APIDOC ## GET /v1/notes/{id} ### Description Retrieves a specific note by its unique identifier. ### Method GET ### Endpoint /v1/notes/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the note. ``` -------------------------------- ### Get Company by ID Source: https://relaticle.com/docs/api Retrieves a specific company by its ID. ```APIDOC ## GET /v1/companies/{id} ### Description Retrieves a specific company by its unique identifier. ### Method GET ### Endpoint /v1/companies/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the company. ``` -------------------------------- ### Custom Field Naming Convention Source: https://relaticle.com/docs/import Example of how to name columns for custom fields in CSV imports. Use the prefix 'custom_fields_' followed by the field code. ```text custom_fields_industry custom_fields_emails custom_fields_website ``` -------------------------------- ### Scheduler Cron Job Setup Source: https://relaticle.com/docs/self-hosting Adds a cron job to the `www-data` user's crontab to run the Laravel scheduler every minute. Ensure the path to the application is correct. ```bash * * * * * cd /var/www/relaticle && php artisan schedule:run >> /dev/null 2>&1 ``` -------------------------------- ### Get Company by ID Source: https://relaticle.com/docs/api Retrieves a specific company by its ID. Ensure the provided ID is valid. ```shell curl -X GET \ 'https://api.relaticle.com/v1/companies/123' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' ``` -------------------------------- ### Get Note by ID Source: https://relaticle.com/docs/api Retrieves a specific note by its ID. Ensure the provided ID is valid. ```shell curl -X GET \ 'https://api.relaticle.com/v1/notes/112' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' ``` -------------------------------- ### Get Person by ID Source: https://relaticle.com/docs/api Retrieves a specific person by their ID. Ensure the provided ID is valid. ```shell curl -X GET \ 'https://api.relaticle.com/v1/people/456' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' ``` -------------------------------- ### Get Task by ID Source: https://relaticle.com/docs/api Retrieves a specific task by its ID. Ensure the provided ID is valid. ```shell curl -X GET \ 'https://api.relaticle.com/v1/tasks/101' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' ``` -------------------------------- ### Get Person by ID Source: https://relaticle.com/docs/api Retrieves a specific person (contact) by their ID. ```APIDOC ## GET /v1/people/{id} ### Description Retrieves a specific person (contact) by their unique identifier. ### Method GET ### Endpoint /v1/people/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the person. ``` -------------------------------- ### Get People Source: https://relaticle.com/docs/api Retrieves a list of people (contacts) from the CRM workspace. ```APIDOC ## GET /v1/people ### Description Retrieves a list of people (contacts) in your CRM workspace. ### Method GET ### Endpoint /v1/people ``` -------------------------------- ### Get Companies Source: https://relaticle.com/docs/api Retrieves a list of companies from the CRM workspace. Supports filtering, sorting, and pagination. ```APIDOC ## GET /v1/companies ### Description Retrieves a list of companies. Supports filtering by name, custom fields, and creation date, as well as sorting and inclusion of creator information. ### Method GET ### Endpoint /v1/companies ### Query Parameters - **filter[name]** (string) - Optional - Filter companies by name. - **filter[custom_fields]** (string) - Optional - Filter companies by custom fields. - **filter[created_after]** (string) - Optional - Filter companies created after a specific date. - **filter[created_before]** (string) - Optional - Filter companies created before a specific date. - **sort** (string) - Optional - Sort order, e.g., "-created_at" for descending by creation date. - **include** (string) - Optional - Include related data, e.g., "creator". - **per_page** (integer) - Optional - Number of results per page. Defaults to 15. - **cursor** (string) - Optional - Cursor for pagination. - **page** (integer) - Optional - Page number for pagination. ``` -------------------------------- ### Check PostgreSQL Container Status Source: https://relaticle.com/docs/self-hosting Use this command to verify if the PostgreSQL container is running as part of your Docker Compose setup. ```bash docker compose ps postgres ``` -------------------------------- ### Set Up Database and Storage Link Source: https://relaticle.com/docs/self-hosting Runs database migrations and creates a symbolic link for the storage directory. Ensure database credentials in `.env` are correct. ```bash php artisan migrate --force php artisan storage:link ``` -------------------------------- ### Create .env File Source: https://relaticle.com/docs/self-hosting Create a .env file to configure your Relaticle instance with essential variables like APP_KEY, DB_PASSWORD, and APP_URL. ```env APP_KEY=base64:your-generated-key-here DB_PASSWORD=your-secure-database-password APP_URL=https://crm.example.com ``` -------------------------------- ### Create Admin Account Source: https://relaticle.com/docs/self-hosting Create an administrator account for your self-hosted Relaticle instance. ```bash docker compose exec app php artisan make:filament-user ``` -------------------------------- ### Download Compose File Source: https://relaticle.com/docs/self-hosting Download the Docker Compose file to set up Relaticle. ```bash curl -o compose.yml https://raw.githubusercontent.com/Relaticle/relaticle/main/compose.yml ``` -------------------------------- ### Configure Claude Desktop for Relaticle MCP Source: https://relaticle.com/docs/mcp Add this configuration to your 'claude_desktop_config.json' file to connect Claude Desktop to the Relaticle MCP server. Replace 'YOUR_TOKEN' with your actual access token. ```json { "mcpServers": { "relaticle": { "type": "streamable-http", "url": "https://mcp.relaticle.com", "headers": { "Authorization": "Bearer YOUR_TOKEN" } } } } ``` -------------------------------- ### PostgreSQL Environment Configuration for Relaticle Source: https://relaticle.com/docs/developer Configure your .env file with these PostgreSQL database credentials for Relaticle. ```dotenv DB_CONNECTION=pgsql DB_HOST=127.0.0.1 DB_PORT=5432 DB_DATABASE=relaticle DB_USERNAME=postgres DB_PASSWORD=your_password ``` -------------------------------- ### Create Filament Admin User on Dokploy Source: https://relaticle.com/docs/self-hosting Open the Dokploy terminal for the `app` container and run this command to create an administrator user. ```bash php artisan make:filament-user ``` -------------------------------- ### Clone Relaticle Repository Source: https://relaticle.com/docs/self-hosting Clones the Relaticle repository to the specified directory on the server. This is the first step in manual deployment. ```bash git clone https://github.com/Relaticle/relaticle.git /var/www/relaticle cd /var/www/relaticle ``` -------------------------------- ### View Application Logs Source: https://relaticle.com/docs/self-hosting Displays the last 50 lines of the 'app' container logs. Useful for diagnosing startup issues and other runtime errors. ```bash docker compose logs app --tail 50 ``` -------------------------------- ### Set Storage and Cache Permissions Source: https://relaticle.com/docs/developer Ensure correct file permissions for storage and bootstrap/cache directories to resolve file upload errors. ```bash chmod -R 775 storage bootstrap/cache ``` -------------------------------- ### Create System Administrator Source: https://relaticle.com/docs/self-hosting Use this command to create a system administrator account, which has instance-wide management capabilities. Alternatively, select 'sysadmin' when prompted by `make:filament-user`. ```bash docker compose exec app php artisan sysadmin:create ``` -------------------------------- ### Configure VS Code (GitHub Copilot) for Relaticle MCP Source: https://relaticle.com/docs/mcp Add this configuration to your VS Code settings file ('.vscode/mcp.json') to connect GitHub Copilot to the Relaticle MCP server. Replace 'YOUR_TOKEN' with your generated access token. ```json { "servers": { "relaticle": { "type": "streamable-http", "url": "https://mcp.relaticle.com", "headers": { "Authorization": "Bearer YOUR_TOKEN" } } } } ``` -------------------------------- ### Generate APP_KEY for Dokploy Source: https://relaticle.com/docs/self-hosting Use this command in your terminal to generate a base64 encoded `APP_KEY` for Dokploy. ```bash echo "base64:$(openssl rand -base64 32)" ``` -------------------------------- ### Relaticle Quality Tool Commands Source: https://relaticle.com/docs/developer Run these composer commands to format code, check for linting errors, perform static analysis, and execute tests. ```bash composer lint # Format with Pint + Rector composer test:lint # Check formatting composer test:types # PHPStan analysis composer test:pest # Run tests composer test # All checks (required before PR) ``` -------------------------------- ### View Application Logs (Extended) Source: https://relaticle.com/docs/self-hosting Displays the last 100 lines of the 'app' container logs. Useful for diagnosing 500 errors after deployment. ```bash docker compose logs app --tail 100 ``` -------------------------------- ### Create Task Source: https://relaticle.com/docs/api Creates a new task. Requires a Bearer token for authentication. ```shell curl -X POST \ 'https://api.relaticle.com/v1/tasks' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ -d '{ "subject": "Follow up with client", "due_date": "2023-12-31", "person_id": 456 }' ``` -------------------------------- ### Create Filament User Source: https://relaticle.com/docs/self-hosting Use this command to create a new user for the Filament panel. You will be prompted to select a panel, then enter user details. ```bash docker compose exec app php artisan make:filament-user ``` -------------------------------- ### List Opportunities Source: https://relaticle.com/docs/api Retrieves a list of sales opportunities. Supports filtering, sorting, and pagination. ```shell curl -X GET \ 'https://api.relaticle.com/v1/opportunities?filter[status]=open&sort=-close_date' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' ``` -------------------------------- ### Create Note Source: https://relaticle.com/docs/api Creates a new note. Requires a Bearer token for authentication. ```shell curl -X POST \ 'https://api.relaticle.com/v1/notes' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ -d '{ "content": "Meeting summary notes.", "related_to_type": "company", "related_to_id": 123 }' ``` -------------------------------- ### View PostgreSQL Container Logs Source: https://relaticle.com/docs/self-hosting Inspect the last 20 lines of the PostgreSQL container logs to diagnose connection or startup issues. ```bash docker compose logs postgres --tail 20 ``` -------------------------------- ### Set Environment Variables for Dokploy Deployment Source: https://relaticle.com/docs/self-hosting Configure these environment variables in the Dokploy service's **Environment** tab. Generate `APP_KEY` using the provided command. Set `APP_PORT=8080` to avoid conflicts. ```env APP_KEY=base64:your-generated-key-here DB_PASSWORD=your-secure-database-password APP_URL=https://crm.yourdomain.com APP_PORT=8080 ``` -------------------------------- ### Generate Application Key Source: https://relaticle.com/docs/self-hosting Generate a base64 encoded application key for security. ```bash echo "APP_KEY=base64:$(openssl rand -base64 32)" ``` -------------------------------- ### Create Opportunity Source: https://relaticle.com/docs/api Creates a new sales opportunity. Requires a Bearer token for authentication. ```shell curl -X POST \ 'https://api.relaticle.com/v1/opportunities' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ -d '{ "name": "New Sales Opportunity", "amount": 10000, "company_id": 123, "person_id": 456 }' ``` -------------------------------- ### Set File Permissions Source: https://relaticle.com/docs/self-hosting Sets ownership and permissions for the storage and bootstrap cache directories. This is crucial for the web server to write files. ```bash chown -R www-data:www-data storage bootstrap/cache chmod -R 775 storage bootstrap/cache ``` -------------------------------- ### Create Filament Admin User Source: https://relaticle.com/docs/self-hosting Generates a command to create the initial administrator user for the Filament panel. ```bash php artisan make:filament-user ``` -------------------------------- ### List Tasks Source: https://relaticle.com/docs/api Retrieves a list of tasks. Supports filtering, sorting, and pagination. ```shell curl -X GET \ 'https://api.relaticle.com/v1/tasks?filter[completed]=false&sort=due_date' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' ``` -------------------------------- ### List Custom Fields Source: https://relaticle.com/docs/api Retrieves a list of custom field definitions configured for your workspace. ```shell curl -X GET \ 'https://api.relaticle.com/v1/custom-fields' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' ``` -------------------------------- ### Generate APP_KEY Source: https://relaticle.com/docs/self-hosting Generates a base64 encoded application key using OpenSSL. This key is required for application security and should be added to the `.env` file. ```bash echo "base64:$(openssl rand -base64 32)" ``` -------------------------------- ### Clear View Cache and Build Assets Source: https://relaticle.com/docs/developer Clear the view cache and rebuild frontend assets to resolve view cache issues. ```bash php artisan view:clear && npm run build ``` -------------------------------- ### Run Composer Tests Source: https://relaticle.com/docs/developer Execute all tests defined in the composer.json scripts, typically for verifying code quality before committing. ```bash composer test ``` -------------------------------- ### Restore PostgreSQL Database Source: https://relaticle.com/docs/self-hosting Restores the Relaticle PostgreSQL database from a gzipped SQL backup file. Ensure the backup file path is correct. ```bash docker compose exec -T postgres psql -U relaticle relaticle /backups/relaticle-$(date +%Y%m%d).sql.gz ``` -------------------------------- ### Supervisor Configuration for Horizon Source: https://relaticle.com/docs/self-hosting Configuration file for Supervisor to manage the Relaticle Horizon queue worker. Ensure log paths and user are correctly set. ```ini [program:relaticle-horizon] process_name=%(program_name)s command=php /var/www/relaticle/artisan horizon autostart=true autorestart=true user=www-data redirect_stderr=true stdout_logfile=/var/www/relaticle/storage/logs/horizon.log stopwaitsecs=3600 ``` -------------------------------- ### Add Relaticle MCP Server via Claude CLI Source: https://relaticle.com/docs/mcp Use this command in your terminal to add the Relaticle MCP server to Claude Code. Ensure you replace 'YOUR_TOKEN' with your generated access token. ```bash claude mcp add relaticle \ --transport streamable-http \ https://mcp.relaticle.com \ --header "Authorization: Bearer YOUR_TOKEN" ``` -------------------------------- ### Task Import Template Source: https://relaticle.com/docs/import Template for importing task data. Map the 'assignee' column to Assignees → Email to assign tasks. ```csv id,title,assignee,custom_fields_due_date,custom_fields_priority ,Follow up with client,assignee@yourcompany.com,2024-03-15,High ``` -------------------------------- ### Test Mail Sending Source: https://relaticle.com/docs/self-hosting Sends a raw test email using the configured SMTP settings. Use this to verify email sending functionality. ```bash docker compose exec app php artisan tinker --execute "Mail::raw('Test', fn(\$m) => \$m->to('you@example.com')->subject('Test'))" ``` -------------------------------- ### List Notes Source: https://relaticle.com/docs/api Retrieves a list of notes. Supports filtering, sorting, and pagination. ```shell curl -X GET \ 'https://api.relaticle.com/v1/notes?filter[created_after]=2023-01-01' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' ``` -------------------------------- ### Note Import Template Source: https://relaticle.com/docs/import Template for importing note data. Export existing records to include all custom fields. ```csv title,company Meeting Notes,acme.com ``` -------------------------------- ### Pull Latest Docker Images Source: https://relaticle.com/docs/self-hosting Run this command in your project directory to download the latest Docker images for your services. ```bash docker compose pull ``` -------------------------------- ### Configure Git Hooks Path Source: https://relaticle.com/docs/developer Set the core.hooksPath configuration in Git to point to the .githooks directory for enabling pre-commit checks. ```bash git config core.hooksPath .githooks ``` -------------------------------- ### Backup PostgreSQL Database Source: https://relaticle.com/docs/self-hosting Executes a database dump for the Relaticle PostgreSQL database. The backup file is named with the current date. ```bash docker compose exec postgres pg_dump -U relaticle relaticle > backup-$(date +%Y%m%d).sql ``` -------------------------------- ### View Horizon Logs Source: https://relaticle.com/docs/self-hosting Displays the last 50 lines of the 'horizon' container logs. Useful for diagnosing issues with Horizon processing jobs. ```bash docker compose logs horizon --tail 50 ``` -------------------------------- ### Create Company Source: https://relaticle.com/docs/api Creates a new company in the CRM workspace. Requires a Bearer token for authentication. ```shell curl -X POST \ 'https://api.relaticle.com/v1/companies' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ -d '{ "name": "New Company Name", "custom_fields": { "field_id": "value" } }' ``` -------------------------------- ### List Custom Fields Source: https://relaticle.com/docs/api Lists custom field definitions configured for your workspace. ```APIDOC ## GET /v1/custom-fields ### Description Lists all custom field definitions configured for your workspace. ### Method GET ### Endpoint /v1/custom-fields ``` -------------------------------- ### Opportunity Import Template Source: https://relaticle.com/docs/import Template for importing opportunity data. Map 'company' and 'contact' columns to link to existing records. ```csv id,name,company,contact,custom_fields_amount,custom_fields_stage ,Q1 Enterprise Deal,acme.com,john@acme.com,50000,Proposal ``` -------------------------------- ### Configure Traefik Labels for Relaticle Service Source: https://relaticle.com/docs/self-hosting Add these labels to your `app` service in `compose.yml` to enable Traefik reverse proxying. Ensure `APP_URL` is set to your public HTTPS URL when using a reverse proxy. ```yaml labels: - "traefik.enable=true" - "traefik.http.routers.relaticle.rule=Host(`crm.example.com`)" - "traefik.http.routers.relaticle.entrypoints=websecure" - "traefik.http.routers.relaticle.tls.certresolver=letsencrypt" - "traefik.http.services.relaticle.loadbalancer.server.port=8080" ``` -------------------------------- ### Create Task Source: https://relaticle.com/docs/api Creates a new task in the CRM workspace. ```APIDOC ## POST /v1/tasks ### Description Creates a new task in your CRM workspace. ### Method POST ### Endpoint /v1/tasks ``` -------------------------------- ### Configure Environment Variables for Coolify Deployment Source: https://relaticle.com/docs/self-hosting Add these environment variables in the Coolify resource's **Environment Variables** section. Ensure `APP_URL` is set to your public HTTPS domain. ```env APP_KEY=base64:your-generated-key-here DB_PASSWORD=your-secure-database-password APP_URL=https://crm.yourdomain.com ``` -------------------------------- ### Create Feature Branch Source: https://relaticle.com/docs/developer Use this command to create a new branch for developing a specific feature, following Gitflow or similar branching strategies. ```bash git checkout -b feat/your-feature ``` -------------------------------- ### Run Specific Feature Tests Source: https://relaticle.com/docs/developer Execute a specific feature test file or filter tests by method name using the php artisan test command. ```bash php artisan test tests/Feature/ExampleTest.php ``` ```bash php artisan test --filter="test_method_name" ``` -------------------------------- ### Create Note Source: https://relaticle.com/docs/api Creates a new note in the CRM workspace. ```APIDOC ## POST /v1/notes ### Description Creates a new note in your CRM workspace. ### Method POST ### Endpoint /v1/notes ``` -------------------------------- ### Check Docker Compose Process Status Source: https://relaticle.com/docs/self-hosting Lists the status of all services defined in the `docker-compose.yml` file. Useful for verifying if the Horizon container is running. ```bash docker compose ps ``` -------------------------------- ### Company Import Template Source: https://relaticle.com/docs/import Use this template for importing company data. Ensure custom fields are prefixed with 'custom_fields_'. ```csv id,name,account_owner_email,custom_fields_industry,custom_fields_domains ,Acme Corporation,owner@yourcompany.com,Technology,acme.com ``` -------------------------------- ### Create Person Source: https://relaticle.com/docs/api Creates a new person (contact) in the CRM workspace. Requires a Bearer token for authentication. ```shell curl -X POST \ 'https://api.relaticle.com/v1/people' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ -d '{ "first_name": "John", "last_name": "Doe", "email": "john.doe@example.com", "company_id": 123 }' ``` -------------------------------- ### Mixed Import: Create and Update Records Source: https://relaticle.com/docs/import This format allows for both creating new records and updating existing ones within the same import file. Blank IDs indicate new record creation. ```csv id,name 01KCCFMZ52QWZSQZWVG0AP704V,Update This Company ,New Company (blank ID = create new) ``` -------------------------------- ### Opportunities Source: https://relaticle.com/docs/mcp Manage deal records, including listing, retrieving, creating, updating, and deleting. ```APIDOC ## list_opportunities ### Description List deals with optional search and filter by company. ### Method GET ### Endpoint /opportunities ### Parameters #### Query Parameters - **search** (string) - Optional - Search by deal name. - **company_id** (string) - Optional - Filter by company ID. - **per_page** (integer) - Optional - Number of results per page (default 15). - **page** (integer) - Optional - Page number. ``` ```APIDOC ## get_opportunity ### Description Get a single opportunity by ID with full details and relationships. ### Method GET ### Endpoint /opportunities/{id} ``` ```APIDOC ## create_opportunity ### Description Create a new deal. ### Method POST ### Endpoint /opportunities ### Parameters #### Request Body - **name** (string) - Required - The name of the deal. - **company_id** (string) - Optional - The ID of the company associated with the deal. - **contact_id** (string) - Optional - The ID of the contact associated with the deal. - **custom_fields** (object) - Optional - Key-value pairs for custom fields. ``` ```APIDOC ## update_opportunity ### Description Update a deal by ID. ### Method PUT ### Endpoint /opportunities/{id} ### Parameters #### Request Body - **custom_fields** (object) - Optional - Key-value pairs for custom fields. ``` ```APIDOC ## delete_opportunity ### Description Soft-delete a deal by ID. ### Method DELETE ### Endpoint /opportunities/{id} ``` -------------------------------- ### Create Company Source: https://relaticle.com/docs/api Creates a new company in the CRM workspace. ```APIDOC ## POST /v1/companies ### Description Creates a new company in the CRM workspace. ### Method POST ### Endpoint /v1/companies ### Request Body - **per_page** (integer) - Optional - Number of results per page. - **cursor** (string) - Optional - Cursor for pagination. - **page** (integer) - Optional - Page number for pagination. ### Request Example { "per_page": 16, "cursor": "ab", "page": 52 } ``` -------------------------------- ### Company Import Fields Source: https://relaticle.com/docs/import Import company data including name, account owner email, industry, and domains. Ensure the 'name' field is always provided. ```csv name,account_owner_email,custom_fields_industry,custom_fields_domains Acme Corporation,owner@yourcompany.com,Technology,acme.com ``` -------------------------------- ### Caddy Reverse Proxy Configuration Source: https://relaticle.com/docs/self-hosting Configure Caddy as a reverse proxy. Caddy automatically handles SSL certificate acquisition and renewal using Let's Encrypt. ```caddy crm.example.com { reverse_proxy 127.0.0.1:80 } ``` -------------------------------- ### Relaticle Core Models Architecture Source: https://relaticle.com/docs/developer Visual representation of the core data models and their relationships within the Relaticle application. ```text Team ─┬─ User (via Membership) ├─ Company ─┬─ People │ └─ Opportunity ─── People ├─ Task (many-to-many with Company, People, Opportunity) └─ Note (many-to-many with Company, People, Opportunity) ``` -------------------------------- ### Tasks Source: https://relaticle.com/docs/mcp Manage task records, including listing, retrieving, creating, updating, deleting, and linking/unlinking entities. ```APIDOC ## list_tasks ### Description List tasks with optional search by title. ### Method GET ### Endpoint /tasks ### Parameters #### Query Parameters - **search** (string) - Optional - Search by task title. - **per_page** (integer) - Optional - Number of results per page (default 15). - **page** (integer) - Optional - Page number. ``` ```APIDOC ## get_task ### Description Get a single task by ID with full details and relationships. ### Method GET ### Endpoint /tasks/{id} ``` ```APIDOC ## create_task ### Description Create a new task. ### Method POST ### Endpoint /tasks ### Parameters #### Request Body - **title** (string) - Required - The title of the task. - **custom_fields** (object) - Optional - Key-value pairs for custom fields. ``` ```APIDOC ## update_task ### Description Update a task by ID. ### Method PUT ### Endpoint /tasks/{id} ### Parameters #### Request Body - **custom_fields** (object) - Optional - Key-value pairs for custom fields. ``` ```APIDOC ## delete_task ### Description Soft-delete a task by ID. ### Method DELETE ### Endpoint /tasks/{id} ``` ```APIDOC ## attach_task_to_entities ### Description Link a task to companies, people, opportunities, or assign users. Adds without removing existing links. ### Method POST ### Endpoint /tasks/{id}/attach ### Parameters #### Request Body - **entity_type** (string) - Required - Type of entity to link (company, people, opportunity). - **entity_ids** (array) - Required - Array of entity IDs to link. - **user_ids** (array) - Optional - Array of user IDs to assign. ``` ```APIDOC ## detach_task_from_entities ### Description Unlink a task from companies, people, opportunities, or unassign users. ### Method POST ### Endpoint /tasks/{id}/detach ### Parameters #### Request Body - **entity_type** (string) - Required - Type of entity to unlink (company, people, opportunity). - **entity_ids** (array) - Required - Array of entity IDs to unlink. - **user_ids** (array) - Optional - Array of user IDs to unassign. ``` -------------------------------- ### Account Source: https://relaticle.com/docs/mcp Retrieve information about the authenticated user, current team, team members, and token abilities. ```APIDOC ## whoami ### Description Get the authenticated user, current team, team members, and token abilities. ### Method GET ### Endpoint /account/whoami ``` -------------------------------- ### Create Opportunity Source: https://relaticle.com/docs/api Creates a new sales opportunity in the CRM workspace. ```APIDOC ## POST /v1/opportunities ### Description Creates a new sales opportunity in your CRM workspace. ### Method POST ### Endpoint /v1/opportunities ``` -------------------------------- ### People Import Template Source: https://relaticle.com/docs/import Template for importing people data. Map the 'company' column to Company → Domain to link to existing companies. ```csv id,name,company,custom_fields_emails,custom_fields_title ,John Doe,acme.com,john@acme.com,CEO ``` -------------------------------- ### Fix Storage Permissions Source: https://relaticle.com/docs/self-hosting Corrects ownership and permissions for the storage directory within the application container. This resolves 'permission errors on storage'. ```bash docker compose exec app chown -R www-data:www-data /var/www/html/storage docker compose exec app chmod -R 775 /var/www/html/storage ``` -------------------------------- ### Update Opportunity by ID Source: https://relaticle.com/docs/api Updates an existing sales opportunity identified by its ID. Partial updates are supported. ```shell curl -X PUT \ 'https://api.relaticle.com/v1/opportunities/789' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ -d '{ "status": "closed_won", "amount": 12000 }' ``` -------------------------------- ### Create Person Source: https://relaticle.com/docs/api Creates a new person (contact) in the CRM workspace. ```APIDOC ## POST /v1/people ### Description Creates a new person (contact) in your CRM workspace. ### Method POST ### Endpoint /v1/people ``` -------------------------------- ### Notes Source: https://relaticle.com/docs/mcp Manage note records, including listing, retrieving, creating, updating, deleting, and linking/unlinking entities. ```APIDOC ## list_notes ### Description List notes with optional search by title. ### Method GET ### Endpoint /notes ### Parameters #### Query Parameters - **search** (string) - Optional - Search by note title. - **per_page** (integer) - Optional - Number of results per page (default 15). - **page** (integer) - Optional - Page number. ``` ```APIDOC ## get_note ### Description Get a single note by ID with full details and relationships. ### Method GET ### Endpoint /notes/{id} ``` ```APIDOC ## create_note ### Description Create a new note. ### Method POST ### Endpoint /notes ### Parameters #### Request Body - **title** (string) - Required - The title of the note. - **custom_fields** (object) - Optional - Key-value pairs for custom fields. ``` ```APIDOC ## update_note ### Description Update a note by ID. ### Method PUT ### Endpoint /notes/{id} ### Parameters #### Request Body - **custom_fields** (object) - Optional - Key-value pairs for custom fields. ``` ```APIDOC ## delete_note ### Description Soft-delete a note by ID. ### Method DELETE ### Endpoint /notes/{id} ``` ```APIDOC ## attach_note_to_entities ### Description Link a note to companies, people, or opportunities. Adds without removing existing links. ### Method POST ### Endpoint /notes/{id}/attach ### Parameters #### Request Body - **entity_type** (string) - Required - Type of entity to link (company, people, opportunity). - **entity_ids** (array) - Required - Array of entity IDs to link. ``` ```APIDOC ## detach_note_from_entities ### Description Unlink a note from companies, people, or opportunities. ### Method POST ### Endpoint /notes/{id}/detach ### Parameters #### Request Body - **entity_type** (string) - Required - Type of entity to unlink (company, people, opportunity). - **entity_ids** (array) - Required - Array of entity IDs to unlink. ``` -------------------------------- ### Clear Application Caches Source: https://relaticle.com/docs/self-hosting Clears all application caches, including configuration, route, view, and event caches. This can resolve issues after deployment or configuration changes. ```bash docker compose exec app php artisan optimize:clear ``` -------------------------------- ### Update Company by ID Source: https://relaticle.com/docs/api Updates an existing company identified by its ID. Partial updates are supported. ```shell curl -X PUT \ 'https://api.relaticle.com/v1/companies/123' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ -d '{ "name": "Updated Company Name" }' ``` -------------------------------- ### List Companies Source: https://relaticle.com/docs/api Retrieves a list of companies from the CRM workspace. Supports filtering, sorting, and pagination. ```shell curl -X GET \ 'https://api.relaticle.com/v1/companies?filter[name]=example&sort=-created_at&include=creator&per_page=15&page=1' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' ``` -------------------------------- ### CSV Import with ID-based Updates Source: https://relaticle.com/docs/import Use this format to update existing records by providing their IDs. Rows with valid IDs will be updated, while rows with blank IDs will be created as new records. ```csv id,name,custom_fields_industry 01KCCFMZ52QWZSQZWVG0AP704V,Acme Corporation,Software 01KCCFN1A8XVQR4ZFWB3KC5M7P,TechStart Inc,Hardware ``` -------------------------------- ### Update Person by ID Source: https://relaticle.com/docs/api Updates an existing person identified by their ID. Partial updates are supported. ```shell curl -X PUT \ 'https://api.relaticle.com/v1/people/456' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ -d '{ "phone": "123-456-7890" }' ``` -------------------------------- ### People Import Fields Source: https://relaticle.com/docs/import Import people data including name, company, emails, and title. The 'company' field can link to an existing company by domain, ID, or name. ```csv name,company,custom_fields_emails,custom_fields_title John Doe,acme.com,john@acme.com,CEO Jane Smith,acme.com,jane@acme.com,CTO ``` -------------------------------- ### Update Note by ID Source: https://relaticle.com/docs/api Updates an existing note identified by its ID. Partial updates are supported. ```shell curl -X PUT \ 'https://api.relaticle.com/v1/notes/112' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ -d '{ "content": "Updated meeting summary notes." }' ``` -------------------------------- ### Companies Source: https://relaticle.com/docs/mcp Manage company records, including listing, retrieving, creating, updating, and deleting. ```APIDOC ## list_companies ### Description List companies with optional search by name and pagination. ### Method GET ### Endpoint /companies ### Parameters #### Query Parameters - **search** (string) - Optional - Search by company name. - **per_page** (integer) - Optional - Number of results per page (default 15). - **page** (integer) - Optional - Page number. ``` ```APIDOC ## get_company ### Description Get a single company by ID with full details and relationships. ### Method GET ### Endpoint /companies/{id} ``` ```APIDOC ## create_company ### Description Create a new company. ### Method POST ### Endpoint /companies ### Parameters #### Request Body - **name** (string) - Required - The name of the company. - **custom_fields** (object) - Optional - Key-value pairs for custom fields. ``` ```APIDOC ## update_company ### Description Update a company by ID. ### Method PUT ### Endpoint /companies/{id} ### Parameters #### Request Body - **custom_fields** (object) - Optional - Key-value pairs for custom fields. ``` ```APIDOC ## delete_company ### Description Soft-delete a company by ID. ### Method DELETE ### Endpoint /companies/{id} ``` -------------------------------- ### List People Source: https://relaticle.com/docs/api Retrieves a list of people (contacts) in the CRM workspace. Supports filtering, sorting, and pagination. ```shell curl -X GET \ 'https://api.relaticle.com/v1/people?sort=-created_at&include=company' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' ``` -------------------------------- ### Update Task by ID Source: https://relaticle.com/docs/api Updates an existing task identified by its ID. Partial updates are supported. ```shell curl -X PUT \ 'https://api.relaticle.com/v1/tasks/101' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ -d '{ "completed": true }' ``` -------------------------------- ### Nginx Reverse Proxy Configuration Source: https://relaticle.com/docs/self-hosting Configure Nginx as a reverse proxy to handle SSL termination and route traffic to the application container. Ensure your SSL certificates are correctly placed. ```nginx server { listen 443 ssl http2; server_name crm.example.com; ssl_certificate /etc/letsencrypt/live/crm.example.com/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/crm.example.com/privkey.pem; location / { proxy_pass http://127.0.0.1:80; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; } } server { listen 80; server_name crm.example.com; return 301 https://$server_name$request_uri; } ``` -------------------------------- ### People Source: https://relaticle.com/docs/mcp Manage contact records, including listing, retrieving, creating, updating, and deleting. ```APIDOC ## list_people ### Description List contacts with optional search and filter by company. ### Method GET ### Endpoint /people ### Parameters #### Query Parameters - **search** (string) - Optional - Search by contact name. - **company_id** (string) - Optional - Filter by company ID. - **per_page** (integer) - Optional - Number of results per page (default 15). - **page** (integer) - Optional - Page number. ``` ```APIDOC ## get_people ### Description Get a single person by ID with full details and relationships. ### Method GET ### Endpoint /people/{id} ``` ```APIDOC ## create_people ### Description Create a new contact. ### Method POST ### Endpoint /people ### Parameters #### Request Body - **name** (string) - Required - The name of the contact. - **company_id** (string) - Optional - The ID of the company the contact belongs to. - **custom_fields** (object) - Optional - Key-value pairs for custom fields. ``` ```APIDOC ## update_people ### Description Update a contact by ID. ### Method PUT ### Endpoint /people/{id} ### Parameters #### Request Body - **custom_fields** (object) - Optional - Key-value pairs for custom fields. ``` ```APIDOC ## delete_people ### Description Soft-delete a contact by ID. ### Method DELETE ### Endpoint /people/{id} ``` -------------------------------- ### Restart Horizon Container Source: https://relaticle.com/docs/self-hosting Restarts the Horizon Docker container. This can resolve issues where Horizon is not processing jobs correctly. ```bash docker compose restart horizon ``` -------------------------------- ### Restart Queue Workers Source: https://relaticle.com/docs/developer Use this command to restart queue workers when they are not processing jobs. ```bash php artisan queue:restart ```