Skip to content

Automotivated/engine

Repository files navigation

Automotivated.engine()

Automotivated.engine( ) is an search api for automotive inventory. It's build with Symfony and connects to Elasticsearch with a MySQL database for datastorage.

Vroom

This API is build for Automotivated.vroom( ) and is out of the box compatible with eachother. How sweet!

Before we begin

Put on some nice Electro Swing and make sure you got the following applications installed:

<code like a pro>
Here is a little list off applications I use for development. Not required to run the application, but are always nice to have and will definitely make your life a little less frustrating

</code like a pro>

Hey Ho, Let's Go! (installation)

Open your favorite (fish || zsh) flavoured (oh-my-fish || oh-my-zsh) terminal (iterm) and go to your projects folder and clone this repo!

<code like a pro>
I'm using fish with oh-my-fish and my own feest theme. Install is super easy and can be done with one command: omf install https://github.com/FKobus/theme-feest
</code like a pro>

Start with cloning the project to your own development machine

git clone https://github.com/Automotivated/engine.git

Go to the root of your clone and install all dependencies

composer install

We assume you got Elasticsearch, MySQL, Apache2/Nginx installed. If not.. Please do before continuing.

Troubleshooting on a Mac

Seems that on a mac somethings won't get setup correctly within the cache folder of Symfony. I'm working locally, if you're using Vagrant, this might not apply to you. Because of access to files the following situations can happen with updating with composer:

// Clearing the cache for the dev environment with debug
// true

[Symfony\Component\Filesystem\Exception\IOException]
Failed to remove file "/Users/itsame/Projects/Automotivated/engine/var/cache/de~/profiler/de/56/aa56de": .

We need to setup the file permissions Symfony help. Go to your root and cleanup any existing cache files.

rm -rf var/cache/*
rm -rf var/logs/*

Next we need to determine the user of your webserver:

ps axo user,comm | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1
# OUTPUT:
_www             /usr/sbin/httpd
# _www is the user

Followed by determing who you are.. isn't that the real question in life?

whoami

Now do the following twice (once for your webserver and once for yourself)

sudo chmod -R +a "<USER> allow delete,write,append,file_inherit,directory_inherit" var

Something like this:

sudo chmod -R +a "_www allow delete,write,append,file_inherit,directory_inherit" var
sudo chmod -R +a "itsame allow delete,write,append,file_inherit,directory_inherit" var

Core concepts

  • The API will follow the rules of json:api
  • It should return data under 50ms?? (let's try)

TODO:

Research

http://obtao.com/blog/2014/02/indexing-and-simple-search-with-elasticsearch-and-symfony/

About

Automotivated.engine( )

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published