Giter Site home page Giter Site logo

code-test's Introduction

Hello Zak! Thank you for considering joining the Lawline team. Below is a coding exercise that will allow you to highlight your skills.

You have up to 48 hours to submit, however, we respect your time and expect this to only take a few hours. Please make commits reguarly so we can track your progress.

Getting Started

  1. Fork the code challenge repository on Github
  2. Run composer install
  3. Perform the configuration for a fresh install of Laravel
  4. Update the first line of this README with your name (so that it reads "Hello, YOUR NAME!"). Commit this change. This will serve as a starting timestamp.
  5. Complete the exercise below.
  6. Commit progress regularly.
  7. When your're done, upload your code.
  8. Email James [email protected] with any questions/issues

Requirements

  • You have up to 48 hours to submit.
  • Create a simple RESTful API written in Laravel/PHP.
    • All responses should be JSON
    • All requests should be JSON
  • Bonus: UI Interface implemented in a JS Framework

The Exercise

The exercise consists of users, subscriptions and products. A user will have the ability to add & remove products within their account. A user must have an active subscription to add a product to their account.

Users

Each user must have, but is not limited to:

  • ID
  • First Name
  • Last Name
  • Email (unique)

Please note:

  • These users are the only users that are able to make requests via the API.
  • User creation/maintenance is not done through the API (see Database section below).
  • Users can own many products

Products

Each product must have, but is not limited to:

  • ID
  • Name
  • Description
  • Price
  • Image

Database

  • MySQL
  • All tables in the database must be created programatically
  • The user table should be seeded with at least five users

Authentication

You must implement an authentication system so that the API knows which of the users is making the request. All requests should ensure that an authorized user is making the request. In the event of an unauthorized user, an error should be thrown.

Requests

The following requests should be implemented:

  • Add product
    • All fields required except ID and image
  • Update product
    • All fields required except image
  • Delete product
  • Get product
  • Upload product image
  • Get list of all products
  • Attach product to requesting user
  • Remove product from requesting user
  • List products attached to requesting user

Tests

You must write tests to back up your code. You are free to use any testing tools or frameworks you like.

UI (Bonus)

Create a simple ui interface, written in your favorite JS Framework (Preferred: VueJS) for a user to

  • Authenticate
  • View all avaliable products
  • Add/Remove products

Completion

When you are finished you will push up the application to a personal git repo. Then please notify James via email [email protected] with the subject Lawline Code Challenge and the link to the github repo. Please include:

  • Instructions on how to create and seed database tables
  • Instructions on how authentication works
  • Instructions on how to compile assets (if anything)
  • Anything else you think James should know to run the application (if anything)

James is available for any questions you may have via email at [email protected].

Good Luck

code-test's People

Contributors

zakriyarahman avatar jterrono avatar

Watchers

James Cloos 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.