Coder Social home page Coder Social logo

bilemo's Introduction

BileMo

Codacy Badge

Specifications

Context

BileMo is a company offering a wide selection of high-end mobile phones.

You are in charge of the development of the BileMo mobile phone showcase. BileMo's business model is not to sell its products directly on the website, but to provide all platforms that want access to the catalog via an API (Application Programming Interface). It is therefore sales exclusively in B2B (business to business).

Customer needs

The first customer has finally signed a partnership contract with BileMo! It’s the fight to respond to needs of this first client who will allow to set up all the APIs and test them right away.

After a dense meeting with the client, a number of information was identified. It must be possible to:

consult the list of BileMo products;
view the details of a BileMo product;
consult the list of registered users linked to a client on the website;
view the details of a registered user linked to a client;
add a new user linked to a client;
delete a user added by a client.

Only referenced customers can access the APIs. API clients must be authenticated via OAuth or JWT.

Data presentation

The first partner of BileMo is very demanding: it requires that you expose your data following the rules of levels 1, 2 and 3 of the Richardson model. He asked that you serve the data in JSON. If possible, the client wishes the responses to be brought into cache in order to optimize the performance of requests to the API.

Installation

Prerequisites

Download libraries via composer

Go to the root folder of the site. In the root folder right click the mouse and then press git bash (or equivalent software). The Open software write " composer install ". The libraries will be installed automatically in a vendor folder.

Redis server

In the API, "Redis" is used for protection against brute force attacks. By using its cache, its recovery is faster, avoids storing in the MySQL database and allows automatic deletion of cached data.

If you do not want or cannot use the Redis server, read the redis.md documentation in the Resources/doc/ folder.

LexikJWTAuthenticationBundle

LexikJWT is the service allowing you to authenticate via a token that you will put in the HTTP header (authorization). They will be given to you after you are authenticated (see Resource/doc/useOfAPI.md for more information on connection).

If you install the project you will need to generate your own SSH key. You will have all the information on in the Resource/doc/lexikJWTAuthentication.md file.

Set up in a host

-Offer accommodation on a hosting.
-Have a domain name that will be the address on which your site will be accessible.
-Have its ID on its hosting (host, password, Identifying).
-Have installed an FTP on his computer.

Site installation on a host

(Example with FileZilla but all FTP works on the same principle)

Open your FTP software. Click on the logo "site manager". A window opens. Click on "New Site" and give it the name you want (example: "My Site"). To the right, you will have to indicate (the IP address, password and its username). Click Connect. !Warning a message warns you after you click Connect you tell yourself if you are connecting or not. After connecting, double-click in the left window on the files or click-Drop the folders in the right window that you want to send to the server. As soon as it appears in the right window, it was sent to your server. !Please note that your home page should be call index.php This is the page that will be loaded when a new visitor arrives on your site.

Database installation

Required

-The IP address of the MySQL server
-Your MySQL Login
-Your MySQL password
-The name of the database, if it has already been created
-The PhpMyAdmin address that allows you to manage your online database

Access

Changed the parameter file of the database (.env.local.php). Now that it's done, your scripts have access to the host database. !If your table is still empty, you have to use the phpMyAdmin that the hosting puts at your disposal to recreate the tables. On your machine, go to your local phpMyAdmin. Use it to export all your tables. This will create a. sql file on your hard disk that will contain your tables. Then go to the phpMyAdmin address of your host. Once there, use the Import feature to import the. sql file that is on your hard disk. Your tables are now loaded on the host's MySQL server.

Website configuration

Do not forget to modify the configuration in the '.env.local.php' file.
On a web host, modify the access path to the public file for the domain on the administration page.

Site installation Complete

Use of API

To use the API, you can go to the documentation via the API, link /api/doc (html) or /api/doc.json (json) Either use the document located in Resource/doc/useOfAPI.md .

bilemo's People

Contributors

michaelgtfr avatar

Watchers

 avatar

bilemo's Issues

"Validator" entity

Features:

Implementation of the "Validator" package in the entities.

Constraints:

Pay attention to the configuration.

Time: 1 day.

add a new user linked to a client

Feature:

  • Creation of a functionality allowing a customer to create a new user

Constraint:

  • follow Richardson's model, pay attention to the method.
  • Waiting for a response "status" and the data after recording in database.
  • RequestParam.

Time: 1day

Pagination of the list of products

Features:
Implementation in the ProductListController.php controller of a pagination.

Constraint:
-used PagerFanta to create this pagination.

Time: 2days

Delete user

Feature:

  • Delete a user defined by the client owner of the user.

Constraint:

  • Attention to the richarson model, use "Delete" as a method

Time: 1day

Hidden

Features:

Cache the data sent to the user to allow faster recovery of the data and thus save bandwidth.

Time: 3days

Security

Feature:

  • Setting up security in files.

Constraints:

  • Use "Validator".

Time: 1 day.

Technical documentation

Features:
-Creation of technical documentation on the operation of the site.

Constraint:
-set up in a "doc" folder.
-Attention, put in the Reame.md file its location.

Time: 2days

List of Products

Creation of a controller allowing the recovery via an API of the list of non-detailed products.

Constaints:

-Documentation creation via Nelmio.
-The recovery format is in Json.

Time: 2days

Authentication

Features:

Setting up an OAuth server to authenticate or facebook, google or linkedln it will become mandatory to use the API or via the bdd with JWT .

Constraints:

Attention to the library to use, it must be up to date and usable on symfony 4

Times: 1week

Retrieved the details of an article

Features:
-Retrieved the details of an article (with photos and characteristics).

Constraints:
- Attention the API must respect Richardson model 3.

Time: 4days

Setting up elements in the views.

Features:

  • Setting up views (visible part in html of the site) to have a visible overview of the API.

Constraints:

  • Used bootstrap, twig, asset for links.

Time: 2days

authentication via a web page

Features.

authentication of a user from a web page. Why? because if he uses the documentation to find out what he can do and recovered? he must authenticate.

time: 2 days

Diagramme UML

Features:
-creation of sequence diagrams, physical data model, and class diagram of the entire project.

Constraints:
-set up in a "UML" folder at the root of the project.

Time: 3days

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.