Skip to content

JENNYPCHEN/API_Rest_BileMo

Repository files navigation

API_Rest_BileMo

Codacy Badge

Hi there,

Thank you for being interested in my project. The project is to build a REST API with Symfony for a B2B mobile phone company. The project is part of my Php/Symfony course from OpenClassrooms.

Please let me know what you think about my project. Any thoughts and suggestions are greatly appreciated.

project7pic1

API documentation

project7pic2

API documentation

Features

  • API documentation generated by Swagger.
  • API allows PHP object communicate in Json Format.
  • Clients can get the products details.
  • Clients can create/edit/delete his/her users and he/she can get his/her users details.
  • JWT token system is implemented for authentication.
  • A refresh token system is implemented so that users do not need to re-login when token is expired
  • the API is RESTful and respect level 1, 2 and 3 of Richardson Maturity Model
  • Prequisites

  • PHP > 7.4.9
  • Symfony > 5.4
  • Local server, e.g. XAMPP/WAMP for local use.
  • Libraries will be installed using Composer.
  • Starting the application

    You can run the application on your computer for development and testing purposes by following the simple steps below:

    Installation

    Step1 Clone / Download

    Clone the repository of this page.Open the folder "P7_api_rest_bilemo"

    Step 2 Configure environment variables

    Open .env file and line 27 (database URL) with your own detail.

    Step 3 Install all dependencies

    Install Composer if you do not have it yet.
    In your cmd, go to the directory where you want to install the project and install dependencies with composer with the commands below:

    $ cd some\directory
    $ composer install

    All dependencies should be installed in a vendor directory.

    Step 4 Create database

    Create a new database using the command below:
    $ php bin/console doctrine:database:create
    $ php bin/console doctrine:migrations:migrate

    You can import fixture by running the command below:

    $ php bin/console doctrine:fixtures:load

    Generate the SSL keys

    $ php bin/console lexik:jwt:generate-keypair

    Wohooo

    Here you go! you can go to "/api" to see the API documentation !

    Have a great day!

    ChingYi P.C
    http://chingyipc.com/