Skip to content

Latest commit

 

History

History
71 lines (51 loc) · 2.66 KB

README.md

File metadata and controls

71 lines (51 loc) · 2.66 KB

Stats Portal

ExtJS universal (modern && classic) responsive web portal with login and user statistics visualization.

  • Frontend has been developed using Ext JS 6.5.3
  • Backend has been developed with NodeJS && ExpressJS, and deployed as an AWS Lambda function using Claudia.js

User will be able to login in the portal and see some user statistics represented in a graph and a grid.

Table of Contents

Configuration

Database

For the database, JawsDB MySql Heroku plugin is used.

Datbase credentials will be saved on Heroku Config Var: JAWSDB_URL

Server

AWS Credentiasl

To deploy the server with ClaudiaJS you will need and AWS account correctly configured. Make sure that claudia.js is correctly installed and configured following these instructions.

Once you have everything configured, just put your AWS user credentials in the server/aws-credentials file with the following format:

[username]
aws_access_key_id = XXXXXXXXXXXXXXX
aws_secret_access_key = XXXXXXXXXXXXXXXX
Database and other

Fill the env var values in the file server/config-env.json:

  • MYSQL_HOST: database host (get it from JAWSDB_URL)
  • MYSQL_PORT: database port (default: "3306")
  • MYSQL_DB: database (get it from JAWSDB_URL)
  • MYSQL_USER: database user (get it from JAWSDB_URL)
  • MYSQL_PWD: database pwd for user (get it from JAWSDB_URL)
  • MASTER_USER: client login username (default: "stats")
  • MASTER_PWD: client login password (default: "st4ts")
  • SESSION_DURATION: session duration for the JWT (default: "86400" )
  • SESSION_SECRET: secrte key fot the JWT tokens generation

Client

  • In file client/app/config/Runtime.js just replace "API_GATEWAY_URL" with the backend service URI (usually the one returned by ClaudiaJS when backend is deployed in AWS)

  • Compilation

sencha app build testing

Deploy

Both frontend and backend are deployed using Heroku (for deploy with Docker please refer to docker-master branch):

  • Frontend: compile version of the portal is deployed with the heroku/php buildpack
git push heroku master
  • Backend: deployed as AWS Lambda using the heroku/nodejs buildpack through a dyno worker
heroku run deployapigateway