Git Product home page Git Product logo

react-sc-web's Introduction

React sc-web

Quick start (recommended)

Go to the OSTIS Metasystem, checkout to the demo branch and follow installation and run instructions.

Run in another system

Build and run with Docker (using ostis-web-platform)

Change the docker-compose.yml using any editor to allow the origin of react-sc-web:

services:
  web:
     image: ostis/sc-web:0.8.1-Unlock
     build:
       context: ./sc-web
     restart: unless-stopped
     command:
       - "--server-host=machine"
       - "--allowed_origins=http://localhost:3000" # <- add this line
     ports:
       - "8000:8000"

Then proceed in the terminal:

docker compose run machine build # build kb
docker compose up # or run just the machine / web service, e.g. docker compose up machine

Install react-sc-web

git clone [email protected]:ostis-ai/react-sc-web.git
cd react-sc-web
./scripts/install_react_sc_web_dependencies.sh

Run sc-web with allowed_origins

cd sc-web
python3 server/app.py --allowed_origins=http://localhost:3000

Run react-sc-web

cd react-sc-web
./scripts/run_react_sc_web.sh

Application starts on port 3000.

Creating production build

To create production build run npm run build.
The build result is additionally gzipped to minimize the file size as much as possible.

Recommendations

The following IDE extensions are recommended for use.
Code Spell Checker is a great help to avoid typos when naming variables and functions.
To analyze the code and find problems according to the given rules, described in .eslintrc.js file a ESLint is used.
Prettier is used to ensure that the overall style of the code is followed throughout the project. This extension is integrated with ESLint, but can have its own rules described in .prettierrc file.

Files structure

├── public
│   └── index.html (template)
├── src
│   ├── @types
|   ├── api
│   ├── assets
│   ├── components
│   ├── constants
│   ├── hooks
│   ├── model
│   ├── pages
│   ├── store
│   ├── utils
│   └── index.ts (entry point)
├── webpack
│   ├── webpack.config.js
│   ├── webpack.dev.js
│   └── webpack.prod.js
├── .env
├── .eslintrc.js
├── .gitignore
├── .prettierrc
├── README.md
├── package-lock.json
├── package.json
└── tsconfig.json

react-sc-web's People

Contributors

mksmorlov avatar fallenchromium avatar mikhailsadovsky avatar andrewkapustin22 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.