Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tolmen/ocp7_bilemo
Projet API_Symfony - OpenClassrooms (Développeur d'application PHP/Symfony)
https://github.com/tolmen/ocp7_bilemo
api-rest openclassrooms php symfony
Last synced: 10 days ago
JSON representation
Projet API_Symfony - OpenClassrooms (Développeur d'application PHP/Symfony)
- Host: GitHub
- URL: https://github.com/tolmen/ocp7_bilemo
- Owner: TolMen
- License: mit
- Created: 2024-10-16T16:58:12.000Z (3 months ago)
- Default Branch: master
- Last Pushed: 2024-11-06T10:41:31.000Z (2 months ago)
- Last Synced: 2024-11-06T11:40:06.011Z (2 months ago)
- Topics: api-rest, openclassrooms, php, symfony
- Language: PHP
- Homepage:
- Size: 846 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# API Bile Mo
> **Ce projet a été réalisé dans le cadre de mon apprentissage pour le parcours d'OpenClassrooms (Développeur d'application PHP/Symfony).**
BileMo is a company specializing in the sale of high-end mobile phones.
It offers access to its catalog via an API, for other platforms, thus adopting a B2B (business to business) sales model.Access to the API will be reserved for referenced clients, who must authenticate via a JWT Token.
The data is exposed in JSON format, respecting levels 1, 2 and 3 of the Richardson model.
Responses are cached to improve query performance.## Installation
To install and run this project, follow the steps below :
### Prerequisites
- **PHP** (version 8.0 ou supérieure)
- **Symfony** (version 7 ou supérieure)
- **Composer**
- **Une base de données**### Installation steps
1 - Git clone the project
https://github.com/TolMen/OCBileMo
2 - Install libraries
- symfony console composer install
3 - Create database
- Update DATABASE_URL .env file with your database configuration :
DATABASE_URL=mysql://db_user:[email protected]:3306/db_name
- Create database :
symfony console doctrine:database:create
- Create database structure :
php bin/console doctrine:schema:update --force
- Insert fictive data (optional) :
symfony console doctrine:fixtures:load
4 - Configure JWT
- Install the JWT package by running the following command :
composer require lexik/jwt-authentication-bundle
- Generate a secret key for JWT :
php bin/console lexik:jwt:generate-keypair
- Make sure the paths to the private and public key files are set correctly in your .env file :
JWT_PASSPHRASE=VotrePhraseSecrète
## Author
[TolMen](https://github.com/TolMen) - [LinkedIn](https://www.linkedin.com/in/jessyfrachisse/)
## License
This project is licensed under MIT - View file [license](LICENSE) for more details.
Feel free to contact me with any questions or contributions. Have a nice visit on our blog !