Code Monkey home page Code Monkey logo

farm-army-frontend's Introduction

farm.army - Frontend

Track your farming and pool performance on the Binance Smart Chain, Polygon, Fantom, KuCoin Community Chain, Harmony, Celo, Moonriver, Crypto.com: Cronos, Moonbeam

Tech Stack

  • PHP 8 + Symfony
  • node.js + npm (Webpack, Symfony encore)
  • Vue.js 2.x (needs migration to 3.x)
  • jQuery (to be replaced)
  • Bootstrap 5

Business Values

  • Expected requests: 1-2 per second
  • Backend is using external APIs, which have rate limits. So basic no massive calls are allowed
  • Backend is behind a HTTP Loadbalancer, consider when calling

Install

Install PHP and node.js packages

composer install
npm install

Create local database (default via dotenv is to use sqlite)

bin/console doctrine:schema:update --force

Token Icons

Common token icons are included others are used via external repositories inside remotes/. Feel free to update them frequently. Hint: they are heavy cached. See cache clear section Init them once via:

git submodule update --init --recursive

Run

For a running development system run the following command. You can also use nginx or Symfony encore (Webpack) stuff

symfony server:start
npm run-script dev-server
bin/console d:s:u --force
http://127.0.0.1:8000

You need to import farm locally first from the backend

bin/console app:cross_fetch_farm -vv

If you want need a running backend checkout also https://github.com/farm-army/farm-army-backend. You can also change backend url via BACKEND_BASE_URL or running chain CHAIN inside via .env

Cache

There are several caches. Clear cache via Symfony command or clear var/cache/* folders

Technical Debt

  • Migrate more page content to Vue.js and 3.x

Folder Structure

  • src PHP code
  • assets Vue.js "applications" provided in subdirectories
  • remotes External repositories that provide value for the project eg icons and token lists

farm-army-frontend's People

Contributors

aint9 avatar haehnchen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

farm-army-frontend's Issues

"Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait" Error

[PHP-FPM ] [12-Jan-2022 07:06:45 UTC] 2022-01-12T07:06:45+00:00 [critical] Uncaught Exception: "App\Kernel" uses "Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait", but does not implement the required method "protected function configureContainer(ContainerConfigurator $c): void".

Database missing

The database initialization file for the front end project is missing. Backend has a sql file, but the PHP frontend doesn't

When starting the frontend I get:
An exception occurred while executing 'SELECT f0_.id AS id_0, f0_.hash AS hash_1, f0_.farm_id AS farm_id_2, f0_.name AS name_3, f0_.tvl AS tvl_4, f0_.json AS json_5, f0_.created_at AS created_at_6, f0_.updated_at AS updated_at_7, f0_.last_found_at AS last_found_at_8, f0_.token AS token_9, f0_.chain AS chain_10, f0_.leverage AS leverage_11, f0_.compound AS compound_12, f0_.token0 AS token0_13, f0_.token1 AS token1_14 FROM farm f0_ ORDER BY f0_.created_at DESC LIMIT 20':

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.