{"id":19721041,"url":"https://github.com/oodies/oc_bilemo","last_synced_at":"2026-04-29T14:37:17.059Z","repository":{"id":102791752,"uuid":"128068643","full_name":"oodies/oc_bilemo","owner":"oodies","description":"E-Commerce API for project 7 on OpenClassrooms","archived":false,"fork":false,"pushed_at":"2018-06-07T15:06:43.000Z","size":396,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-06-01T09:59:27.375Z","etag":null,"topics":["openclassrooms","php7","symfony4"],"latest_commit_sha":null,"homepage":"http://bilemo.oodie.fr","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/oodies.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-04-04T13:48:14.000Z","updated_at":"2022-02-12T09:09:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"ef6ae093-71fd-456f-957c-96e37b052b9c","html_url":"https://github.com/oodies/oc_bilemo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/oodies/oc_bilemo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oodies%2Foc_bilemo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oodies%2Foc_bilemo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oodies%2Foc_bilemo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oodies%2Foc_bilemo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oodies","download_url":"https://codeload.github.com/oodies/oc_bilemo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oodies%2Foc_bilemo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32429356,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T13:34:34.882Z","status":"ssl_error","status_checked_at":"2026-04-29T13:34:29.830Z","response_time":110,"last_error":"SSL_read: 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":["openclassrooms","php7","symfony4"],"created_at":"2024-11-11T23:13:12.190Z","updated_at":"2026-04-29T14:37:17.054Z","avatar_url":"https://github.com/oodies.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# E-Commerce API\n-----------------------------------------\nProject number 7 of Openclassrooms \"Developpeur d'application PHP / Symfony\" cursus\n\nThe objectif of this project is to create a web service with an API.\n\n## Code quality\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/38afc8b330ff45feba8958f6bead3f67)](https://www.codacy.com/app/sebastien.chomy/oc_bilemo?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=sebastien-chomy/oc_bilemo\u0026amp;utm_campaign=Badge_Grade)\n\n## Demontration\nPreview example : [http://bilemo.oodie.fr](http://bilemo.oodie.fr)\n- **/login**  Authenticate\n- **/tokens** Get JWT\n- **/apidoc** API Documents\n\n## Installation\n\n### 1 - Download or clone the repository git\n```console\ngit clone https://github.com/sebastien-chomy/oc_bilemo.git my_project\n```\n\n### 2 - Generating the Public and Private Key\nfrom **/my_project/config/jwt/** \n\nCreate the Public and Private key to access the API by reading the following instructions [Readme](/config/jwt/readme.md)\n\n### 3 - Download dependencies\nfrom **/my_project/**\n```console\ncomposer install\n``` \nBefore you start using Composer, you must first install it on your system.\nhttps://getcomposer.org/\n\n\n## Create database, schema and load data fixtures \nFollow these steps\n \n### 1 - Create database\nFrom **/my_project/**\n```\nphp bin/console doctrine:database:create\n```\n\n### 2 - Create schema\nFrom **/my_project/**\n```console\nphp bin/console doctrine:schema:create\n```\nOR\n```console\nphp bin/console doctrine:schema:update --force\n```\n\n### 3 - Fixtures of data\nFrom **/my_project/**\n```console\nphp bin/console doctrine:fixture:load\n```\n\n### 4 - Preparation\nFrom **/my_project/**\n```console\nphp bin/console cache:clear --env=prod \n```\n\n## Configuration\nFor that project works it is necessary to change a file **/my_project/.env**\n\n```ini\n###\u003e symfony/framework-bundle ###\nAPP_ENV=\u003cYour environment dev|test|prod\u003e\nAPP_SECRET=d6e73c5232ea0cabd4c4f86a69653eeb\n###\u003c symfony/framework-bundle ###\n\n###\u003e doctrine/doctrine-bundle ###\n# Format described at http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url\n# For an SQLite database, use: \"sqlite:///%kernel.project_dir%/var/data.db\"\n# Configure your db driver and server_version in config/packages/doctrine.yaml\nDATABASE_URL=mysql://db_user:db_password@127.0.0.1:3306/db_name\n###\u003c doctrine/doctrine-bundle ###\n\n###\u003e lexik/jwt-authentication-bundle ###\n# Key paths should be relative to the project directory\nJWT_PRIVATE_KEY_PATH=config/jwt/private.pem\nJWT_PUBLIC_KEY_PATH=config/jwt/public.pem\nJWT_PASSPHRASE=\u003cYour passphrase\u003e\nJWT_TTL=3600\n###\u003c lexik/jwt-authentication-bundle ###\n```\n\n## VirtualHost\n\n```Apache\n\u003cVirtualHost *:80\u003e\n\tServerName oc_bilemo.local\n\tDocumentRoot \"path/to/my/project/public\"\n\tAddDefaultCharset utf-8\n\n\t\u003cDirectory  \"path/to/my/project/public\"\u003e\n\t\tDirectoryIndex index.php\n\t\tOptions Indexes FollowSymlinks\n\t\tRequire all granted\n\t\tAllowOverride None\n\n\t\t\u003cIfModule rewrite_module\u003e\n\t\t\tRewriteEngine On\n\t\t\tRewriteCond %{HTTP:Authorization} ^(.*)\n\t\t\tRewriteRule .* - [e=HTTP_AUTHORIZATION:%1]\t\t\t\t\t\t\n\t\t\tRewriteCond %{REQUEST_FILENAME} !-f\n\t\t\tRewriteRule ^(.*)$ index.php [QSA,L]\n\t\t\u003c/IfModule\u003e\n\t\u003c/Directory\u003e\n\tErrorLog logs/oc_bilemo-error.log\n\tCustomLog logs/oc_bilemo-access.log combined\n\u003c/VirtualHost\u003e\n```\n\n## Usage\n\n### Authentication\n\nFor be authentified to API you need to obtain an access token from JWT. There are two options with this test user:\n\n{ \n    \"username\": \"customer_1\",\n    \"password\": \"12345\"\n}\n\n#### Use APIDoc\n\nFrom **http://oc_bilemo.local/apidoc** and **POST /api/login** sandbox.\nGive username, password value and execute to get the token as follows.\n```json\n{\n    \"token\": \"eyJhbGciOiJSUzI1NiJ9.eyJyb2xlcyI6WyJST0xFX0FQSV9VU0VSIl0sInVzZXJuYW1lIjoiY3VzdG9tZXJfMSIsImlhdCI6MTUyNzA3NTMyMiwiZXhwIjoxNTI3MDc4OTIyfQ.Q0boOWli_pNPZmby6WZp08_Ks8970Zjt1pqt6XOz5nt-NtZKEvPI51ErTkMLhxUtGqEadYvGJIyQ ...\"\n}\n```\n\n#### Use the frontend\nFrom the frontend on this url : **/login** then **/tokens** to obtained this token.\n\n### API Document\n[Screenshot ApiDoc](/doc/img/screenshot-ApiDoc.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foodies%2Foc_bilemo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foodies%2Foc_bilemo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foodies%2Foc_bilemo/lists"}