Giter VIP home page Giter VIP logo

pokemon's Introduction

SETUP

This document will serve as a setup guide for this appilcation.

Technologies

  • Docker
  • PHP 8.2
  • Laravel 10
  • Composer
  • Angular

Docker

The docker-composer.yml includes the following services

api

This container runs the backend api laravel application

app

This container runs the frontend app angular application

mysql

This runs the mysql database uses by the backend api for data store

redis

The redis service is used by the backend api for queuing. The idea is to queue very large CSV files and process in batches to avoid over working the server resources

nginx

This runs the webs server for serving the frontend and backend pages

Running this application

  1. Add these to your /etc/hosts
127.0.0.1   api.pokemon.test
127.0.0.1   pokemon.test
  1. From inside the pokemon directory, to build and start the containters
docker compose up -d

If you experience permission issues, please try, which will try to build the api image with your user id and group id

GROUPID=$(id -g ${USER}) USERID=$(id -u ${USER}) docker compose build --no-cache && docker compose up -d

NB: This will try to run the application on the following ports

  • 80 : Web server
  • 3306 : MySQL server
  • 6379 : Redis server
  • 4200 : App development server
  1. Install composer packages in the backend api
docker compose exec -it api composer install
  1. Run migration and seeders
docker compose exec -it api php artisan migrate:fresh --seed
  1. Running Laravel tests This application uses the Laravel Pest tests. The test covers the application requirements.
docker compose exec -it api php artisan test
  1. Build the frontend app
docker compose exec -it app ng build
  1. Visit frontend app

NB: The backend api provides the following endpoints, which are being called by the frontend

GET|HEAD api/pokemons ............................. pokemons.index  › PokemonController@index 
POST     api/pokemons/import ...................... pokemons.import › PokemonController@import 

NB: Frontend development enviroment is accessible on http://localhost:4200/

Screenshots

screenshot screenshot1

pokemon's People

Contributors

digitlimit avatar

Watchers

 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.