Skip to content

LFZDavid/BileMo

Repository files navigation

BileMo

Mobile phone wholesaler API

symfony-logo

developped with Symfony 5.2

Maintainability


Technical Requirements


  • PHP ( version >= 7.2.5 )
  • Database :
    • mariadb ( version >= 10.2 )
      or
    • mysql ( version >= 5.7 )
  • composer ( version : >= 2 )

more infos : symfony documentation


Dependencies

  • doctrine/doctrine-migrations-bundle : "^3.1"
  • phpdocumentor/reflection-docblock : "^5.2"
  • lexik/jwt-authentication-bundle : "^2.11"
  • sensio/framework-extra-bundle : "^6.1"
  • symfony/proxy-manager-bridge : "5.2.*"
  • liip/test-fixtures-bundle : "^1.11"
  • symfony/framework-bundle : "5.2.*"
  • doctrine/doctrine-bundle : "^2.3"
  • nelmio/api-doc-bundle : "^3.0"
  • doctrine/annotations : "^1.13"
  • symfony/serializer : "5.2.*"
  • symfony/validator : "5.2.*"
  • doctrine/orm : "^2.8"

Installation

  1. Get files :

git clone https://github.com/LFZDavid/BileMo.git
  1. Install dependencies :

cd Bilemo/
composer install
  1. Database :

  • set database connection in .env file
# DATABASE_URL="mysql://db_user:db_password@127.0.0.1:3306/db_name?serverVersion=5.7"

Make sure your local server is running and use de command :

composer init-db

It's a shortcut for :

php bin/console d:d:d --if-exists --force
php bin/console d:d:c
php bin/console d:m:m -n

Demo data will be installed with the last migration file

  1. Jwt authentication

  • Generate SSH key for LexikJWTAuthenticationBundle with the command :
php bin/console lexik:jwt:generate-keypair 
  1. (optional) Fixtures for test/dev
composer init-db-dev

Test Api

  1. Set : Content-Type: application/json in all your request Header

  2. Get token :
    send a POST request to api/#_check with this JSON parameter in the body

    {
        "username":"SupplierDemo",
        "password":"pwddemo"
    }
    

    This will returns you an unique (temporary) token

  3. Add token to Header :
    Authorization :Bearer token


Documentation

  • Access documentation :
    • With your web browser, go to : /api/doc
    • or send a GET request to : /api/doc.json

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published