Code Monkey home page Code Monkey logo

clapmi's Introduction

Technical Requirements


The must

  1. The initial data for users, posts and categories should be populated in the database via seeders.
  2. The application must be written in PHP 8.0
  3. The application must use Laravel Framework v.8
  4. The application must use the Bearer Token authentication
  5. Database seeding must be implemented
  6. The code must be pushed into your personal repository which is available to us
  • We really want to see your individual commits
  • Please avoid big commits by breaking them down into smaller and descriptive commits, ideally containing code specific to a feature.

The recommended

  • The application should have database Migrations and Seeders files
  • Every table should have an Eloquent model and relationships (if applicable)
  • Every endpoint should have its own controller and the methods of that controller must be linked to a route
  • Every route should be protected by a middleware
  • The application should have unit and feature tests

Nice to have (bonus points)

Tasks:

Create a rest api for a content management that does the following as shown in the image above:

  • Posts
    • Create posts
    • Delete posts
    • Edit posts
    • List posts
  • Categories
    • Create a post category
    • List all post categories
    • Edit a post category
    • Delete a post category
  • Users
    • Create a user
    • List all users
    • Delete a userBearer Token authentication
    • Edit a single user’s profile information
User Story Definition
API prefix The API routing prefix must follow the following convention: /api/v1/{route_name} For example: https://{{base_url}}/api/v1/user/login https://{{base_url}}/api/v1/posts
Bearer Token authentication A valid JWT token must be created to enable access to protected routes. This token must contain the user_uuid as a claim The issuer must be the API server domain The implementation must use an asymmetric key. Authentication must be carried out using JWT (Check out lcobucci laravel package for this, any other package of your choosing works too)
Middleware protection All API routes must be protected by a middleware to avoid injections attacks, Laravel provides a default middleware that needs to be implemented. In addition there must be another middleware to protect secure routes. This middleware need to validate the authenticity of the user token and allow user tokens on the User side.
User endpoint (CRUD) This endpoint will handle the CRUD methods for the user, as well it will enable the following features: Login/logout forgot/reset password listing all user posts Keep in mind that this endpoint must affect only the current logged in user. User A cannot see or edit anything from User B
Forgot/reset password This endpoint will handle the forgot and restet password feature, this feature will do the following: The user will request a token to reset its password, if the email is valid a token will be generated. This token must be unique and there must be only one available token per user at the time. After a successful password update the token must be deleted
Categories endpoint (CRUD) This endpoint will handle the CRUD methods for the categories. The initial data for these endpoints most be added into the DB via seeders.
Posts endpoint (CRUD) This endpoint will handle the CRUD methods for the brands. The initial data for these endpoints most be added into the DB via seeders.

Submitting Your Code

When you are finished with your testing code, please send a mail with the link to your submission to ‘[email protected]’.

You will be asked for your git repository and any comments/feedback

clapmi's People

Contributors

kenmutisya avatar

Watchers

James Cloos avatar  avatar  avatar

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.