Skip to content

Exposer une API REST pour BileMo, une entreprise spécialisée dans la vente de smartphones en B2B. Objectif : fournir à toutes les plateformes qui le souhaitent l’accès au catalogue via une API. Voir les issues fermées pour plus de détails. (https://github.com/ashk74/P7_bilemo/issues)

Notifications You must be signed in to change notification settings

ashk74/P7_bilemo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project 7 : BileMo (Application developer - PHP / Symfony - OpenClassrooms)

Codacy Badge

Context

  • Create a web service exposing an API for BileMo.
  • BileMo is a company offering a wide selection of high-end cell phones
  • Sell exclusively in B2B
  • Provide access to the catalog via an API to all platforms that want it

Technical Requirements

Framework & Bundles

  • Framework : Symfony 5.4.7
  • willdurand/hateoas-bundle : Generate hypermedia links to create a self-discovering API
  • lexik/jwt-authentication-bundle : Create stateless authentication with a token
  • nelmio/api-doc-bundle : Create API documentation with annotations

Web Server

  • PHP 7.2.5 or higher
  • PHP extensions : Ctype, iconv, JSON, PCRE, Session, SimpleXML and Tokenizer
  • SQL DBMS
  • Versions used in this project
    • Apache 2.4.46
    • MySQL 5.7.34
    • PHP 8.1.4

Composer

Installation

1. Download or clone the project

2. Edit .env file

# SQL DBMS
DATABASE_URL="mysql://username:password@host:port/dbname"

3. Set your PHP version

  • List and select PHP version (minimum 7.2.5)
symfony local:php:list
  • Set your PHP version
echo 8.1.4 > .php-version

4. Install packages needed

Run your terminal at root project

composer install

5. Create database and tables

php bin/console doctrine:database:create
php bin/console doctrine:migrations:migrate

6. Load fixtures with pictures and avatar

php bin/console doctrine:fixtures:load

7. Generate SSL keys for JWT Token

php bin/console lexik:jwt:generate-keypair

8. Test

Great ! You are ready to use BileMo API :)

About

Exposer une API REST pour BileMo, une entreprise spécialisée dans la vente de smartphones en B2B. Objectif : fournir à toutes les plateformes qui le souhaitent l’accès au catalogue via une API. Voir les issues fermées pour plus de détails. (https://github.com/ashk74/P7_bilemo/issues)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages