{"id":26238466,"url":"https://github.com/ahmed-alnaqa/jsonfpt","last_synced_at":"2026-05-15T20:31:03.024Z","repository":{"id":39791887,"uuid":"239644767","full_name":"ahmed-alnaqa/jsonfpt","owner":"ahmed-alnaqa","description":"This project store and translate contacts json file","archived":false,"fork":false,"pushed_at":"2023-02-02T11:14:21.000Z","size":399,"stargazers_count":0,"open_issues_count":6,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-30T07:34:55.630Z","etag":null,"topics":["eloquent","google-api","laravel","php","rest-api"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ahmed-alnaqa.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-02-11T00:45:00.000Z","updated_at":"2020-02-11T01:48:57.000Z","dependencies_parsed_at":"2023-02-17T19:00:57.333Z","dependency_job_id":null,"html_url":"https://github.com/ahmed-alnaqa/jsonfpt","commit_stats":null,"previous_names":["ahmed-alnaqa/jsonfpt"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ahmed-alnaqa/jsonfpt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmed-alnaqa%2Fjsonfpt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmed-alnaqa%2Fjsonfpt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmed-alnaqa%2Fjsonfpt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmed-alnaqa%2Fjsonfpt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ahmed-alnaqa","download_url":"https://codeload.github.com/ahmed-alnaqa/jsonfpt/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmed-alnaqa%2Fjsonfpt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33078898,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-15T20:25:35.270Z","status":"ssl_error","status_checked_at":"2026-05-15T20:25:34.732Z","response_time":103,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["eloquent","google-api","laravel","php","rest-api"],"created_at":"2025-03-13T06:14:04.090Z","updated_at":"2026-05-15T20:31:03.005Z","avatar_url":"https://github.com/ahmed-alnaqa.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Requirements\n- php 7, apache2, mysql 5.7\n- Composer\n- Git\n\n## Installation\n- Clone the project.\n- Go to project directory and run `composer install`\n- Create mysql database (ex:`json_fpt`) and configure it in the `.env` file.\n- Make sure you have the right `.env` parameters configuration especially `GOOGLE_TRANSLATE_API_URL` and `GOOGLE_API_KEY`\n- Run `php artisan migrate` to migrate the schema.\n- Run `php artisan serve` to start the server.\n\n## Endpoints\n- Get resources\n\n  GET `api/resources` | Return resources (paginated)\n- Post resources\n\n  POST `api/resources` | create and store resource | request body = ['file' =\u003e 'filepath', 'language' =\u003e 'languageToTranslate']\n  \n- Get resource\n\n  GET `api/resource/{id}` | get resource | `id` = the resource id\n\n- Get resource contacts\n\n  GET `api/resource/{resource}/contacts` | get resource contacts | `resource` = the resource id\n\n- Get contacts\n\n  GET `api/contacts` | get contacts \n\n- Get contact\n\n  GET `api/contacts/{id}` | get contact | `id` = the contact id\n  \n## How it works\n1- Go and create resource through endpoint `api/resources`, choosing contacts json file to upload and the language you want to translate.\n\n2- In Console run command `php artisan contacts:translate --limit={limit}` to loop on bulk of uploaded contacts and translate them.\n```ssh\nNOTE: \n- We can sechdule this command to run every second for example.\n```\n\n## Why that solution\n* Storing and translating file at the same time is a very bad choice especially when you upload large file.\n* Translating all contacts at the same time will let `Goole API` to block the request because it has a limitation in number of requests per second and the size of the text you want translate.\n* This solution will provide a good performance for most of the large files because we separated uploading large files and trnaslating them in two different processes.\n\n## Postman collection for a demo\nYou can import this collection [https://www.getpostman.com/collections/9648a355413ebb8ed8b4] into your postman account and run a demo for the project.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahmed-alnaqa%2Fjsonfpt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fahmed-alnaqa%2Fjsonfpt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahmed-alnaqa%2Fjsonfpt/lists"}