szkkteam / agrosys

Farm management software which aims to help manage farm operations and production activities

Home Page:https://agrosys-staging.herokuapp.com/dashboard/overview

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Agro-Systems

Farm management software which aims to help manage farm operations and production activities

Table of contents

Features

  • Localized frontend with i18n
  • Local state management on the frontend with redux
  • REST Api
  • React framework

Demo can be found here: Demo

Login details

username: user1@user.com
password: password

Flask Backend

The backend is structured using the Application Factory Pattern, in conjunction with a little bit of declarative configuration in backend/config.py (for ordered registration of extensions, and auto-detection of views, models, serializers, model admins and cli commands). The entry point is the create_app() method in backend/app.py (wsgi.py in production).

React Frontend

Entry point is at frontend/app/index.js.

Local Development

This assumes you're on a reasonably standard *nix system. Windows might work if you know what you're doing, but you're on your own there.

Dependencies:

  • Python 3.6+
  • Your virtualenv tool of choice (strongly recommended)
  • PostgreSQL or MariaDB (MySQL)
  • Redis (used for sessions persistence and the Celery tasks queue)
  • node.js & npm (v6 or later recommended, only required for development)
  • MailHog (not required, but it's awesome for testing email related tasks)
# install
$ git clone git@github.com:szkkteam/agrosys.git
$ cd flask-react-spa
$ mkvirtualenv -p /path/to/python3 flask_react_spa
$ pip install -r requirements.txt
$ pip install -r requirements-dev.txt  # for tests and sphinx docs

# configure
$ edit `backend/config.example.py` and save as `backend/config.py`
$ edit `frontend/app/config.example.js` and save as `frontend/app/config.js`

# set up database
$ sudo -u postgres -i psql
postgres=# CREATE USER flask_api WITH PASSWORD 'flask_api';
postgres=# CREATE DATABASE flask_api;
postgres=# GRANT ALL PRIVILEGES ON DATABASE flask_api TO flask_api;
postgres=# \q  # (quit)

# run db migrations
$ python manage.py db upgrade

# load db fixtures (optional)
$ python manage.py db fixtures fixtures.json

# frontend dev server:
$ npm install
$ npm run start

# backend dev server:
$ python manage.py run

# backend celery workers:
$ python manage.py celery worker
$ python manage.py celery beat

License

MIT

About

Farm management software which aims to help manage farm operations and production activities

https://agrosys-staging.herokuapp.com/dashboard/overview

License:MIT License


Languages

Language:JavaScript 66.4%Language:Python 29.8%Language:HTML 3.3%Language:SCSS 0.3%Language:Dockerfile 0.1%Language:Shell 0.0%Language:CSS 0.0%Language:Procfile 0.0%