PHPackages                             remp/crm-skeleton - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. remp/crm-skeleton

ActiveProject[Utility &amp; Helpers](/categories/utility)

remp/crm-skeleton
=================

REMP - CRM Skeleton

3.0.0(1mo ago)84617[2 issues](https://github.com/remp2020/crm-skeleton/issues)MITJavaScriptPHP ^8.4CI failing

Since Sep 25Pushed 1mo ago8 watchersCompare

[ Source](https://github.com/remp2020/crm-skeleton)[ Packagist](https://packagist.org/packages/remp/crm-skeleton)[ Docs](https://remp2030.com)[ RSS](/packages/remp-crm-skeleton/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (10)Dependencies (60)Versions (44)Used By (0)

CRM Skeleton
============

[](#crm-skeleton)

This is a pre-configured skeleton of CRM application with simple installation.

[![Translation status @ Weblate](https://camo.githubusercontent.com/7dff35ee9ab58277a130e57501a7852a25a02eb084977fb3e86a096dd47ab9c0/68747470733a2f2f686f737465642e7765626c6174652e6f72672f776964676574732f72656d702d63726d2f2d2f7376672d62616467652e737667)](https://hosted.weblate.org/engage/remp-crm/)

CRM is currently available in *sk\_SK*, *cs\_CZ*, *en\_US* and partially *hu\_HU* locales. If you're interested in translating the open-source modules to your language, you can approach us and contribute via [Weblate](https://hosted.weblate.org/engage/remp-crm/).

Installation
------------

[](#installation)

### CRM Skeleton

[](#crm-skeleton-1)

To create skeleton application which will be run directly on the host machine, use:

```
composer create-project remp/crm-skeleton path/to/install

```

If you plan to use our Docker Compose appliance to run application, skip vendor installation as you might not have all extensions installed on your host machine.

```
composer create-project --no-install remp/crm-skeleton path/to/install

```

```
cd path/to/install

```

### Docker

[](#docker)

Simplest posible way is to run this application in docker containers. Docker Compose is used for orchestrating. Except of these two application, there is no need to install anything on host machine.

Recommended *(tested)* versions are:

- [Docker](https://www.docker.com/products/docker-engine) - 24.0.4
- [Docker Compose](https://docs.docker.com/compose/overview/) - 2.19.1

#### Steps to install application within docker

[](#steps-to-install-application-within-docker)

1. Prepare environment &amp; configuration files

    ```
    cp .env.example .env

    ```

    ```
    cp app/config/config.local.example.neon app/config/config.local.neon

    ```

    ```
    cp docker compose.override.example.yml docker compose.override.yml

    ```

    No changes are required if you want to run application as it is.
2. Setup host

    Default host used by application is `http://crm.press`. It should by pointing to localhost (`127.0.0.1`).
3. Start docker compose

    ```
    docker compose up

    ```

    You should see log of starting containers.
4. Enter application docker container

    ```
    docker compose exec crm /bin/bash

    ```

    Following commands will be run inside container.
5. Update permissions for docker application

    Owner of folders `temp`, `log` and `content` is user on host machine. Application needs to have right to write there.

    ```
    chmod -R a+rw temp log content

    ```
6. Install composer packages.

    ```
    composer install

    ```
7. Initialize and migrate database.

    ```
    php bin/command.php phinx:migrate

    ```
8. Initialize random application key (`CRM_KEY` value) in your `.env` file.

    ```
    php bin/command.php application:generate_key

    ```
9. Generate user access resources to control access rights to features in CRM admin.

    ```
    php bin/command.php user:generate_access

    ```
10. Generate API access resources to control access rights of API tokens to specific endpoints.

    ```
    php bin/command.php api:generate_access

    ```
11. Seed database with required data

    ```
    php bin/command.php application:seed

    ```
12. Copy module's assets to your `www` folder. This is part of [composer.json](./composer.json) and it's handled automatically for you in subsequent updates.

    ```
    php bin/command.php application:install_assets

    ```
13. All done

    Access application via web browser. Default configuration:

    - URL:
    - Users:
        - Admin
            - Username: `admin@crm.press`
            - Password: `password`
        - User
            - Username: `user@crm.press`
            - Password: `password`

**IMPORTANT:** Please update steps 7-11 every time you update the CRM - every time you run `composer update`.

Available modules
-----------------

[](#available-modules)

Not all the modules that we open sourced are directly included in this repository. You can [explore other modules](https://github.com/remp2020?q=crm-&type=&language=) and see, whether there are some scratching your itch.

Or you can dive into the docs below and extend the CRM with your own module.

Custom module implementation
----------------------------

[](#custom-module-implementation)

### Definition of the module

[](#definition-of-the-module)

All modules have to implement `Crm\ApplicationModule\ApplicationModuleInterface` and therefore all are dependent on an application module we provide.

We have prepared abstract class `CrmModule` to extend that implements this interface. It includes all extension points the `ApplicationManager` can work with. This section will help you to understand each integration point - what it its purpose and how to use it. You can always use any of the provided modules as a referece for how to structure the code.

Your module implementation should be placed within `app/modules` folder. To create `DemoModule` you'd need to:

- Create folder `app/modules/DemoModule`
- Create class `Crm\DemoModule\DemoModule` within the created folder with the definition of module, extending `Crm\ApplicationModule\CrmModule`.

    ```
