{"id":26028629,"url":"https://github.com/lfsc09/itrade-api","last_synced_at":"2025-10-20T01:32:43.249Z","repository":{"id":256456811,"uuid":"504725188","full_name":"lfsc09/itrade-api","owner":"lfsc09","description":"API to serve data for itrade-dongs.","archived":false,"fork":false,"pushed_at":"2024-09-10T18:47:19.000Z","size":110,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-09-10T21:05:01.066Z","etag":null,"topics":["mysql","php8","rest-api","slim3"],"latest_commit_sha":null,"homepage":"https://api.itrade-dongs.com.br (Down)","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lfsc09.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-06-18T02:36:39.000Z","updated_at":"2024-09-10T18:47:22.000Z","dependencies_parsed_at":"2024-09-10T21:05:08.736Z","dependency_job_id":"ba7a810c-c169-4128-a158-4cd30991f719","html_url":"https://github.com/lfsc09/itrade-api","commit_stats":null,"previous_names":["lfsc09/itrade-api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lfsc09%2Fitrade-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lfsc09%2Fitrade-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lfsc09%2Fitrade-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lfsc09%2Fitrade-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lfsc09","download_url":"https://codeload.github.com/lfsc09/itrade-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242250942,"owners_count":20096898,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mysql","php8","rest-api","slim3"],"created_at":"2025-03-06T17:19:04.088Z","updated_at":"2025-10-20T01:32:43.142Z","avatar_url":"https://github.com/lfsc09.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Static Badge](https://img.shields.io/badge/license-Apache--2.0-brightgreen)](https://github.com/lfsc09/itrade-api/blob/main/LICENSE)\n![Static Badge](https://img.shields.io/badge/docker--compose-3.9-blue)\n[![Static Badge](https://img.shields.io/badge/trafex/php--nginx-latest-blue)](https://github.com/TrafeX/docker-php-nginx)\n![Static Badge](https://img.shields.io/badge/mysql-latest-blue)\n\n## Generate config file for Slim\n\nGenerate the **config.php** from _config.example.php_:\n\n```php\nputenv('DISPLAY_ERRORS_DETAILS='. TRUE);\n\nputenv('DB_HOSTNAME=localhost');\nputenv('DB_PORT=3306');\nputenv('DB_USER=root');\nputenv('DB_PASS=%PASSWORD%');\nputenv('DB_NAME=u631028490_itrade');\n\nputenv('JWT_SECRET_KEY=%ENCRYPTION_KEY_512%');\nputenv('JWT_SECURE=' . FALSE);\n```\n\n\u003e If you change the DB user password, also update it on `docker-conf/mysql/init/add-user.sql`.\n\n\u003e To use `JWT_SECURE` as `TRUE`, the Webserver container `Dockerfile` must be changed to listen for `ssl` connections. Also the `fullchain.pem` and `privkey.pem` must be provided to the container.\n\u003e\n\u003e https://github.com/TrafeX/docker-php-nginx/blob/master/docs/enable-https.md\n\n\u003c/br\u003e\n\n## Deploy\n\n\u003e Make sure you did the step above before running the `compose up`.\n\nIt uses (https://github.com/TrafeX/docker-php-nginx) docker image for PHP-fpm with Nginx.\n\n```bash\ndocker compose up -d\n```\n\n### Local Testing\n\n#### In Windows\n\n\u003e https://stackoverflow.com/questions/8652948/using-port-number-in-windows-host-file\n\nSetting up the api url dns, for locally testing with front-end.\n\nIn the `hosts` file of Windows.\n\n```properties\n127.x.x.x api.itrade-dongs.com.br\n```\n\n```bash\nnetsh interface portproxy add v4tov4 listenport=80 listenaddress=127.x.x.x connectport=8001 connectaddress=192.168.0.4\n```\n\nYou can test the choosen local IPv4 address with\n\n```bash\nnetstat -a -n -p TCP | grep \"LISTENING\"\n```\n\nShow the proxy maps with\n\n```bash\nnetsh interface portproxy show v4tov4\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flfsc09%2Fitrade-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flfsc09%2Fitrade-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flfsc09%2Fitrade-api/lists"}