+
Skip to content

A secure interface for accessing a catalog of premium mobile products, using JWT for authentication and powered by response caching.

License

Notifications You must be signed in to change notification settings

JessyFra/OCP7_BileMo

Repository files navigation

Bile Mo API 📱

This project was completed as part of my learning journey for the OpenClassrooms (PHP/Symfony Application Developer) program.
--> Version : Français 📖
--> Documentation : API Doc 📃

📖 Description

Bile Mo API is an API for a company specializing in the sale of high-end mobile phones, providing access to its catalog through a B2B (Business to Business) interface.
Access to the API is restricted to registered clients who must authenticate via a JWT token.
Data is exposed in JSON format, following levels 1, 2, and 3 of the Richardson model.
Responses are cached to improve query performance.

🚀 Features

  • JWT Authentication : Secure access via a JWT token to validate user identity.
  • Catalog Management : Access to the company’s product catalog with detailed information on mobile phones.
  • Response Caching : Responses are cached to optimize performance.
  • RESTful Architecture : Follows the three-level Richardson model.
  • Secure Communication : Secured exchanges with clients using JWT.

🚧 Installation

Prerequisites

Before you start, ensure that you have the following installed on your machine :

  • PHP (version 8.0 or higher)
  • Symfony (version 7 or higher)
  • Composer
  • MySQL Database

Installation steps

  1. Clone the repository
    Use Git to clone the project :

    git clone https://github.com/TolMen/OCBileMo.git
  2. Install dependencies
    Run the following command to install the necessary libraries :

    symfony console composer install
  3. Create the database
    Modify the .env file to configure your database :

    DATABASE_URL=mysql://db_user:db_password@127.0.0.1:3306/db_name

    Then run the following commands :

    symfony console doctrine:database:create
    php bin/console doctrine:schema:update --force
  4. Configure JWT
    Install the JWT package and generate secret keys :

    composer require lexik/jwt-authentication-bundle
    php bin/console lexik:jwt:generate-keypair

    Make sure the paths to the private and public key files are correctly defined in your .env file :

    JWT_PASSPHRASE=YourSecretPhrase

Thank you for exploring this project.
Feel free to explore, modify, and improve it ! ✨

For any questions or collaboration, don't hesitate to contact me ! 📩

TolMen - LinkedIn

About

A secure interface for accessing a catalog of premium mobile products, using JWT for authentication and powered by response caching.

Topics

Resources

License

Stars

Watchers

Forks

Languages

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载