marcotas / gifapp

A Gif Application

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GIF APP

This is a simple project to search and share gif images.

Requirements

  • Docker

How to run the app

Run the following commands

docker-compose build api
docker-compose up -d api
docker-compose exec api php artisan migrate
docker-compose exec api php artisan passport:install

Copy the password grant client id and secret from the last command above, and paste on .env file inside the frontend directory. For Example:

# This is an example
API_CLIENT_ID=2
API_CLIENT_SECRET=FaoSakbFtcF8aTjU5cY1eSry3G35timV7cxeDbF4

Then you now can start the app service:

docker-compose up -d app

Then you can access http://localhost:5000.

Tests

The automated tests should be run in your local environament. For now it's not possible to run with docker. And only backend (API) are available.

Minification algorithm for URL

I used the bijective algorithm to convert a integer number to a base 62 alphabet. I've used this existing algorithm in this repo.

The requested url is stored in database and the minitifed url convert it's integer ID to a string. It's that simple.

About

A Gif Application


Languages

Language:PHP 74.7%Language:Vue 13.3%Language:JavaScript 8.7%Language:Blade 1.6%Language:SCSS 0.6%Language:Shell 0.5%Language:Dockerfile 0.4%Language:Sass 0.3%