Giter Site home page Giter Site logo

rcat-ui's Introduction

This project was bootstrapped with Create React App.

Setup

Setup enviroment files with your variables:

For development enviroment: cp env.example .env.development

For staging enviroment: cp env.example .env.staging

For QA enviroment: cp env.example .env.qa

For production enviroment: cp env.example .env.production

Environment vars

Open relevant env file and setup following:

  • REACT_APP_FB_APP_ID: This is you facebook application id. If you do not have it ask your admin or create it on https://developers.facebook.com/apps Be aware that the very same app id should be configured on the API side in order to work.

  • REACT_APP_GOOGLE_CLIENT_ID: This is your google application id. If you do not have it ask your admin or create it on https://console.developers.google.com/apis/credentials Be aware that the very same app id should be configured on the API side in order to work.

  • REACT_APP_GOOGLE_CAPTCHA: This is your google recaptchga key. If you do not have it ask your admin for it or create it going to https://www.google.com/recaptcha/ and then to Admin console and then create key.

  • REACT_APP_API_ENDPOINT: Your API endpoint. To assure you API endpoint is working open in the browser REACT_APP_API_ENDPOINT/status and if all ok you should see following response:

{
status: "ok"
}

Available Scripts

In the project directory, you can run:

npm start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

npm test

Launches the test runner in the interactive watch mode.
See the section about running tests for more information.

npm run build

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

See the section about deployment for more information.

npm run eject

Note: this is a one-way operation. Once you eject, you can’t go back!

If you aren’t satisfied with the build tool and configuration choices, you can eject at any time. This command will remove the single build dependency from your project.

Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except eject will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.

You don’t have to ever use eject. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.

Docker

Preconditions

You have to have .env.production file with appropriate values. Docker build use npm run build for build and environment is production so you have to create .env.production if you already do not have inside root of your project by executing:

cp env.example .env.production

and then setup enviroment variables inside .env.production. Check section Environment vars for more details

In order to build the image run the following command:

docker build -f Dockerfile -t asset-management-ui .

In order to start the container run the following command:

docker run -p 80:80 asset-management-ui

This will bring up docker with ngnix inside serving on port 80 build folder previously build with command npm run build using .env.production env file. If you have occupied port 80 and want to bind it on another, for example on 81, you execute:

docker run -p 81:80 asset-management-ui

If you want to run it in detached mode add param -d:

docker run -p 81:80 -d asset-management-ui

Deployment

In order to buyild and deploy local files on AWS S3 development environment execute:

./bin/deploy

Preconditions:

  • have installed aws cli
  • have appropriate AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY in the env

How to reset your social logins/apps access

Reset Facebook App

Login into your facebook account and then goto https://www.facebook.com/settings?tab=applications. Remove your appropriate RSong app.

Reset Google App

Login into your google account and then goto https://myaccount.google.com/permissions?pli=1 You will see all apps having access to your account. Find relevant RSong app, click on it and then click on the button REMOVE ACCESS.

Dependencies

Additional Dependencies

  • Sendgrid for sending email
  • Twillio for sending SMS
  • Dropbox token
  • Google Cloud Storage bucket name and project id
  • Sentry for errors logging

rcat-ui's People

Contributors

stefancramick avatar gandra avatar alex-l-crane avatar ivanaar avatar 9rb avatar djordjecramick avatar snyk-bot avatar mkostic-ing avatar dependabot[bot] avatar nedrob 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.