项目作者: belushkin

项目描述 :
Shortener PHP assessment
高级语言: PHP
项目地址: git://github.com/belushkin/shortener.git
创建时间: 2019-11-20T15:39:21Z
项目社区:https://github.com/belushkin/shortener

开源协议:

下载


Shortener PHP assessment

You are supposed to create a simple URL shortener (think: bit.ly )

Splitting given task into stories and putting estimations before coding

Task description Given estimate Real estimate
Investigation existing shortener solutions (shorting functions) 1h 1h
Create DB schema 30m 1h
Describe class relation 25m 25m
Create Dockerfile (Symfony 4) and tools 15m 15m
Create Contollers 1h 2h
Create Entities 30m 1h
Create Form 30m 1h
Create Shortener Service 1h 1h
Integrate and test app 3h 3h
Total 8h 10h

Resources I found and I would follow:

How app does look like

alt text

Requirements of the assessment:

  • Make MVP
  • Design proper shortening function

Technologies used in the assessment

  • Symfony 4.3
  • Docker
  • Docker Compose
  • PHP 7.3.10
  • PhpUnit 7.5.17
  • Bash
  • Git
  • Bootstrap

Prerequisites

Docker.io and docker-compose must be installed in the system in order to be able to use the app.
OS Linux

How to setup the application:

  1. git clone https://github.com/belushkin/shortener.git
  2. cd shortener; ./toolbox.sh up
  3. docker-compose exec web php bin/console doctrine:schema:create

How to run tests

  1. ./toolbox.sh tests

URL of the running app

http://localhost:8000/

http://localhost:8080 (adminer)

  • server: db-mysql
  • username: root
  • password: root
  • db: app

Basic script usage:

Application has toolbox.sh script. It is very easy run, stop, ssh, rebuild, run tests and stop the application.

  1. ./toolbox.sh up # run the application
  2. ./toolbox.sh rebuild # rebuild the image
  3. ./toolbox.sh ssh # ssh to the container
  4. ./toolbox.sh tests # run tests
  5. ./toolbox.sh down # stop the application

Contributors

@belushkin

License

MIT License