Git Product home page Git Product logo

hiring-project's Introduction

Hiring Project Exercise

The project is a super simple API done in phalcon and an ember.js frontend app.

The model is just one table of candidates with name and age. The API has implemented the GET /api/applicants.

On the client side there is only one route, /candidates that uses the API to show a list of candidates.

Requirements

docker
docker-compose
node 12
npm 7

Running the projects

Server

This will run the php app and a mariadb database, the php app runs in port 8080

cd server
docker-compose up -d
docker-compose exec php php composer.phar install
docker-compose exec php vendor/bin/phinx migrate
docker-compose exec php vendor/bin/phinx seed:run

You will be able to see a couple of records in the db and in this url http://localhost:8080/api/applicants

Client

This will run the ember app, the front end run in port 4200, and proxy the api requests

cd client
npm install
npm start

You will be able to see the app running in the browser with http://localhost:4200/

HOMEWORK

What you need to do, is implement the add new candidate from the front end and backend.

Hints:

from the front end, you need to create a form with name and age using the built in components https://guides.emberjs.com/release/components/built-in-components/

from the @action defined in app/controllers/candidates.js you can use the variables to create a new applicant record using this.store.createRecord and then save it.

On the back end, you need to implement $app->post('/api/applicants', function () use ($app) {}); that will receive the data in json:api format

hiring-project's People

Contributors

marceloandrader avatar

Watchers

 avatar Jonathan Boykin 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.