Code Monkey home page Code Monkey logo

homer-app's Introduction

homer-app

ezgif com-optimize 10

This projects provides the Front-End and Back-End components of Homer 7.x and higher

WARNING

This is a beta release mostly intended for developers.

Docker Bundles

Getting started with HOMER Seven?
The following H7 docker-compose bundles are available in multiple flavours with the following backends:

Developement Build

Node Requirments

  1. Install NVM curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash
  2. Restart terminal
  3. Get the current Homer-App node version cat homer-app/.node_version
  4. Install a matching node version accordingly, for example nvm install 8.9.1

Build Requirements

  1. Install Postgres
    • Create new user and database
sudo su - postgres
createuser homer --pwprompt
createdb -O homer homer_config
createdb -O homer homer_data
psql
postgres=# GRANT ALL PRIVILEGES ON DATABASE "homer_config" to homer;
postgres=# GRANT ALL PRIVILEGES ON DATABASE "homer_data" to homer;
* Configure database connection parameters in `server/config.js` (API)
* Make sure you use the correct db `connection` in `knexfile.js` (Provisioning)
  1. Install the Homer-App
    • npm install && npm install -g knex eslint eslint-plugin-html eslint-plugin-json eslint-config-google
  2. Provision migrations and defaults to database:
knex migrate:latest
knex seed:run
  1. Build app bundle by webpack
    • npm run build
  2. Start app
    • npm start or start in the development mode npm run dev
WARNINGS!
  • Check the seeds folder to avoid overwriting or dropping existing data.
  • Do not edit or eleminate existing migrations. If you need to change/add database schema - create a new knex migration.

API

Authentication

JWT Web Tokens are used to secure API. JWT settings are in src/private/jwt_settings.json.

First, get JWT token.

curl -X POST localhost:8001/api/v3/auth \
-d "username=admin&password=password"

You will receive a message similiar to the following one:

{
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6InRyZXgiLCJzY29wZSI6ImYwM2VkZTdjLWIxMjEtNDExMi1iY2M3LTEzMGEzZTg3OTg4YyIsImlhdCI6MTUwNzUzMDc1OSwiZXhwIjoxNTA3NTM0MzU5fQ.iDkeBJfPfj-MYGdbZDZJrzuTZOcQjRKM5Qi3SxmcBts",
  "scope":"f03ede7c-b121-4112-bcc7-130a3e87988c"
}

This token should be included in every API request, in the header section. It will expire in 1 hour; you can set the expire value in jwt_settings.json.


This project is part of HOMER


Made by Humans

This Open-Source project is made possible by actual Humans without corporate sponsors, angels or patreons.
If you use this software in production, please consider supporting its development with contributions or donations

Donate

homer-app's People

Contributors

sergibondarenko avatar lmangani avatar adubovikov avatar albertomellano 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.