diff --git a/README.md b/README.md index 2e706de7..b2c8f043 100755 --- a/README.md +++ b/README.md @@ -92,19 +92,20 @@ Endpoint: Some API Endpoint for the full list check the doc: -[POST] /api/auth +| Method | Endpoint | Description | +|--------|------------------|---------------------| +| POST | `/api/auth` | User auth | +| GET | `/api/lead` | Get all leads | +| GET | `/api/lead/{id}` | Get lead detail | +| POST | `/api/lead` | Create new lead | +| PUT | `/api/lead/{id}` | Update existing lead | +| DELETE | `/api/lead/{id}` | Delete a lead | +| GET | `/api/customer` | Get all customers | +| GET | `/api/product` | Get all products | +| GET | `/api/order` | Get all orders | +| GET | `/api/supplier` | Get all suppliers | +| GET | `/api/ticket` | Get all tickets | -[GET] /api/lead - -[GET] /api/lead/{id} - -[POST] /api/lead - -[PUT] /api/lead/{id} - -[DELETE] /api/lead/{id} - -[GET] /api/customer ## Translation (i18n) Check missing translation keys diff --git a/composer.json b/composer.json index 914c402e..273032d6 100755 --- a/composer.json +++ b/composer.json @@ -26,8 +26,8 @@ "h4cc/wkhtmltoimage-i386": "0.12.x", "h4cc/wkhtmltopdf-amd64": "0.12.x", "h4cc/wkhtmltopdf-i386": "0.12.x", - "laravel/framework": "^10.0", - "laravel/helpers": "^1.4", + "laravel/framework": "^10.10", + "laravel/helpers": "^1.6", "laravel/sanctum": "^3.2", "laravel/tinker": "^2.8", "laravel/ui": "^4.0", @@ -57,7 +57,7 @@ "marcocesarato/php-conventional-changelog": "^1.16", "mockery/mockery": "^1.4.4", "nunomaduro/collision": "^7.0", - "phpunit/phpunit": "^10.0", + "phpunit/phpunit": "^10.5", "rector/rector": "^0.15.10", "spatie/laravel-ignition": "^2.0", "squizlabs/php_codesniffer": "^3.7" diff --git a/composer.lock b/composer.lock index 0e9e5741..2d5668f6 100755 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "c147f8d18784dba2da910329dff2bc41", + "content-hash": "99d1ca2b24c5cdb8d4ce325ae764726d", "packages": [ { "name": "akaunting/laravel-money", @@ -131,16 +131,16 @@ }, { "name": "aws/aws-sdk-php", - "version": "3.295.1", + "version": "3.295.3", "source": { "type": "git", "url": "https://github.com/aws/aws-sdk-php.git", - "reference": "31c69734d929510502b6401c01b593521efdcbc5" + "reference": "3346f60c6c5075453f90f703693f764dad76a3a8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/31c69734d929510502b6401c01b593521efdcbc5", - "reference": "31c69734d929510502b6401c01b593521efdcbc5", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/3346f60c6c5075453f90f703693f764dad76a3a8", + "reference": "3346f60c6c5075453f90f703693f764dad76a3a8", "shasum": "" }, "require": { @@ -220,9 +220,9 @@ "support": { "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80", "issues": "https://github.com/aws/aws-sdk-php/issues", - "source": "https://github.com/aws/aws-sdk-php/tree/3.295.1" + "source": "https://github.com/aws/aws-sdk-php/tree/3.295.3" }, - "time": "2023-12-26T19:06:59+00:00" + "time": "2023-12-28T19:32:33+00:00" }, { "name": "barryvdh/laravel-dompdf", @@ -2812,16 +2812,16 @@ }, { "name": "laravel/framework", - "version": "v10.38.2", + "version": "v10.39.0", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "43da808391da3540d44a8dfeb4e46da4ad8f5723" + "reference": "114926b07bfb5fbf2545c03aa2ce5c8c37be650c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/43da808391da3540d44a8dfeb4e46da4ad8f5723", - "reference": "43da808391da3540d44a8dfeb4e46da4ad8f5723", + "url": "https://api.github.com/repos/laravel/framework/zipball/114926b07bfb5fbf2545c03aa2ce5c8c37be650c", + "reference": "114926b07bfb5fbf2545c03aa2ce5c8c37be650c", "shasum": "" }, "require": { @@ -2924,7 +2924,7 @@ "league/flysystem-sftp-v3": "^3.0", "mockery/mockery": "^1.5.1", "nyholm/psr7": "^1.2", - "orchestra/testbench-core": "^8.15.1", + "orchestra/testbench-core": "^8.18", "pda/pheanstalk": "^4.0", "phpstan/phpstan": "^1.4.7", "phpunit/phpunit": "^10.0.7", @@ -3013,7 +3013,7 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2023-12-22T14:39:10+00:00" + "time": "2023-12-27T14:26:28+00:00" }, { "name": "laravel/helpers", @@ -3130,16 +3130,16 @@ }, { "name": "laravel/prompts", - "version": "v0.1.13", + "version": "v0.1.14", "source": { "type": "git", "url": "https://github.com/laravel/prompts.git", - "reference": "e1379d8ead15edd6cc4369c22274345982edc95a" + "reference": "2219fa9c4b944add1e825c3bdb8ecae8bc503bc6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/prompts/zipball/e1379d8ead15edd6cc4369c22274345982edc95a", - "reference": "e1379d8ead15edd6cc4369c22274345982edc95a", + "url": "https://api.github.com/repos/laravel/prompts/zipball/2219fa9c4b944add1e825c3bdb8ecae8bc503bc6", + "reference": "2219fa9c4b944add1e825c3bdb8ecae8bc503bc6", "shasum": "" }, "require": { @@ -3155,7 +3155,7 @@ "require-dev": { "mockery/mockery": "^1.5", "pestphp/pest": "^2.3", - "phpstan/phpstan": "^1.10", + "phpstan/phpstan": "^1.11", "phpstan/phpstan-mockery": "^1.1" }, "suggest": { @@ -3181,22 +3181,22 @@ ], "support": { "issues": "https://github.com/laravel/prompts/issues", - "source": "https://github.com/laravel/prompts/tree/v0.1.13" + "source": "https://github.com/laravel/prompts/tree/v0.1.14" }, - "time": "2023-10-27T13:53:59+00:00" + "time": "2023-12-27T04:18:09+00:00" }, { "name": "laravel/sanctum", - "version": "v3.3.2", + "version": "v3.3.3", "source": { "type": "git", "url": "https://github.com/laravel/sanctum.git", - "reference": "e1a272893bec13cf135627f7e156030b3afe1e60" + "reference": "8c104366459739f3ada0e994bcd3e6fd681ce3d5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/sanctum/zipball/e1a272893bec13cf135627f7e156030b3afe1e60", - "reference": "e1a272893bec13cf135627f7e156030b3afe1e60", + "url": "https://api.github.com/repos/laravel/sanctum/zipball/8c104366459739f3ada0e994bcd3e6fd681ce3d5", + "reference": "8c104366459739f3ada0e994bcd3e6fd681ce3d5", "shasum": "" }, "require": { @@ -3249,7 +3249,7 @@ "issues": "https://github.com/laravel/sanctum/issues", "source": "https://github.com/laravel/sanctum" }, - "time": "2023-11-03T13:42:14+00:00" + "time": "2023-12-19T18:44:48+00:00" }, { "name": "laravel/serializable-closure", @@ -10261,21 +10261,21 @@ }, { "name": "symfony/service-contracts", - "version": "v3.4.0", + "version": "v3.4.1", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "b3313c2dbffaf71c8de2934e2ea56ed2291a3838" + "reference": "fe07cbc8d837f60caf7018068e350cc5163681a0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/b3313c2dbffaf71c8de2934e2ea56ed2291a3838", - "reference": "b3313c2dbffaf71c8de2934e2ea56ed2291a3838", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/fe07cbc8d837f60caf7018068e350cc5163681a0", + "reference": "fe07cbc8d837f60caf7018068e350cc5163681a0", "shasum": "" }, "require": { "php": ">=8.1", - "psr/container": "^2.0" + "psr/container": "^1.1|^2.0" }, "conflict": { "ext-psr": "<1.1|>=2" @@ -10323,7 +10323,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.4.0" + "source": "https://github.com/symfony/service-contracts/tree/v3.4.1" }, "funding": [ { @@ -10339,7 +10339,7 @@ "type": "tidelift" } ], - "time": "2023-07-30T20:28:31+00:00" + "time": "2023-12-26T14:02:43+00:00" }, { "name": "symfony/string", @@ -10524,16 +10524,16 @@ }, { "name": "symfony/translation-contracts", - "version": "v3.4.0", + "version": "v3.4.1", "source": { "type": "git", "url": "https://github.com/symfony/translation-contracts.git", - "reference": "dee0c6e5b4c07ce851b462530088e64b255ac9c5" + "reference": "06450585bf65e978026bda220cdebca3f867fde7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/dee0c6e5b4c07ce851b462530088e64b255ac9c5", - "reference": "dee0c6e5b4c07ce851b462530088e64b255ac9c5", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/06450585bf65e978026bda220cdebca3f867fde7", + "reference": "06450585bf65e978026bda220cdebca3f867fde7", "shasum": "" }, "require": { @@ -10582,7 +10582,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/translation-contracts/tree/v3.4.0" + "source": "https://github.com/symfony/translation-contracts/tree/v3.4.1" }, "funding": [ { @@ -10598,7 +10598,7 @@ "type": "tidelift" } ], - "time": "2023-07-25T15:08:44+00:00" + "time": "2023-12-26T14:02:43+00:00" }, { "name": "symfony/uid", @@ -11549,16 +11549,16 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.42.0", + "version": "v3.43.1", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "632ef1be3447a9b890bef06147475facee535d0f" + "reference": "91c0b47216aa43b09656b4d99aa9dade2f3ad8fc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/632ef1be3447a9b890bef06147475facee535d0f", - "reference": "632ef1be3447a9b890bef06147475facee535d0f", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/91c0b47216aa43b09656b4d99aa9dade2f3ad8fc", + "reference": "91c0b47216aa43b09656b4d99aa9dade2f3ad8fc", "shasum": "" }, "require": { @@ -11588,7 +11588,7 @@ "php-cs-fixer/accessible-object": "^1.1", "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.4", "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.4", - "phpunit/phpunit": "^9.6", + "phpunit/phpunit": "^9.6 || ^10.5.5", "symfony/yaml": "^5.4 || ^6.0 || ^7.0" }, "suggest": { @@ -11627,7 +11627,7 @@ ], "support": { "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.42.0" + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.43.1" }, "funding": [ { @@ -11635,7 +11635,7 @@ "type": "github" } ], - "time": "2023-12-24T14:38:51+00:00" + "time": "2023-12-29T09:42:16+00:00" }, { "name": "hamcrest/hamcrest-php", @@ -12631,16 +12631,16 @@ }, { "name": "phpunit/phpunit", - "version": "10.5.3", + "version": "10.5.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "6fce887c71076a73f32fd3e0774a6833fc5c7f19" + "reference": "ed21115d505b4b4f7dc7b5651464e19a2c7f7856" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/6fce887c71076a73f32fd3e0774a6833fc5c7f19", - "reference": "6fce887c71076a73f32fd3e0774a6833fc5c7f19", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/ed21115d505b4b4f7dc7b5651464e19a2c7f7856", + "reference": "ed21115d505b4b4f7dc7b5651464e19a2c7f7856", "shasum": "" }, "require": { @@ -12712,7 +12712,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.3" + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.5" }, "funding": [ { @@ -12728,7 +12728,7 @@ "type": "tidelift" } ], - "time": "2023-12-13T07:25:23+00:00" + "time": "2023-12-27T15:13:52+00:00" }, { "name": "rector/rector", diff --git a/etc/infrastructure/php/Dockerfile b/etc/infrastructure/php/Dockerfile index 573b8d55..d195893d 100644 --- a/etc/infrastructure/php/Dockerfile +++ b/etc/infrastructure/php/Dockerfile @@ -1,18 +1,15 @@ FROM php:8.2-fpm # Arguments defined in docker-compose.yml -ARG USERNAME=www-data -ENV uid=1000 +#ARG USERNAME=www-data +#ENV uid=1000 -# Update & upgrade apt -RUN apt-get update && apt-get install -y -RUN apt install -y apt-utils - -# Install dependencies -RUN apt install -y libicu-dev vim redis-tools git libxml2-dev wget ca-certificates zip unzip mc htop nano && \ - pecl channel-update pecl.php.net +# Update & upgrade apt Install dependencies +RUN apt-get update && apt-get install -y \ + apt-utils libicu-dev vim redis-tools git libxml2-dev wget ca-certificates zip unzip mc htop nano curl mariadb-client +RUN pecl channel-update pecl.php.net RUN apt-get update -y && apt-get install -y libwebp-dev libjpeg-dev libjpeg62-turbo-dev libpng-dev libxpm-dev \ - libfreetype6-dev zlib1g-dev libzip-dev mariadb-client + libfreetype6-dev zlib1g-dev libzip-dev # Install php extensions RUN docker-php-ext-install \ @@ -41,24 +38,20 @@ COPY ./conf.d/xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini COPY --from=composer:latest /usr/bin/composer /usr/bin/composer # Create system user to run Composer and Artisan Commands -RUN usermod -G www-data,root -u $uid -d /home/$USERNAME $USERNAME -RUN mkdir -p /home/$USERNAME/.composer && \ - chown -R $USERNAME:$USERNAME /home/$USERNAME +#RUN usermod -G www-data,root -u $uid -d /home/$USERNAME $USERNAME +#RUN mkdir -p /home/$USERNAME/.composer && \ +# chown -R $USERNAME:$USERNAME /home/$USERNAME # [Optional] Add sudo support. Omit if you don't need to install software after connecting. -RUN apt-get install -y sudo \ - && echo $user ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \ - && chmod 0440 /etc/sudoers.d/$USERNAME - -# Set enviroment vars -ENV APP_DIR=/var/www/crm/ - -WORKDIR ${APP_DIR} +#RUN apt-get install -y sudo \ +# && echo $user ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \ +# && chmod 0440 /etc/sudoers.d/$USERNAME +ADD . /var/www/crm/ # Chage permissions RUN chown www-data:www-data /var/www/crm/ -R +RUN chmod 775 /var/www/crm/ -R - -ENV COMPOSER_ALLOW_SUPERUSER=1 +#ENV COMPOSER_ALLOW_SUPERUSER=1 #RUN composer install