Skip to content

Latest commit

 

History

History
132 lines (95 loc) · 3.44 KB

README.md

File metadata and controls

132 lines (95 loc) · 3.44 KB

ODE-APP

Web Pipeline For Kinetic (ODE-Based) Models.

To start the application (production)

This simulation functionality currently does not work in the docker container.

This application makes use of docker and docker compose, so first install them. Learn more about this here.

Run the following commands to start the application:

docker-compose build
docker-compose up

After this open up a browser and go to http://localhost:3000

Repository Structure

 |- client              -> Contains the code of the react client
    |- src              -> Source files of the react client
        |- components   -> React components
        |- store        -> Redux store
 |- server              -> Contains the code of the node server
    |- routes           -> API routes
    |- controllers      -> API controllers
    |- models           -> Sequelize(SQL) models
    |- config           -> Configuration files for the database
    |- python           -> Python scripts to parse SBML files and simulate ODE models
    |- scripts          -> Utility scripts
 |- docker-compose.yml  -> Docker Compose files that runs the application using docker
 |- package.json        -> The main package.json governing the yarn workspaces
 |- README.md           -> The main documentation file. Also this file :)

Development

Follow the instructions below to get the app up and running in development:

  • You need Node, Yarn and Python 3(alongside pip) to run this application. Download them here - Node, Yarn and Python. Further you also need a server of a postgresql database running. Learn more about postgresql here.

  • First you will need to install the dependencies of the project. Do that by running this:

    # inside the repo
    yarn # Node and React dependencies
    # Python dependencies
    pip install python-libsbml
    python -m pip install server/python/lib/stimator-0.9.120-py3-none-any.whl
  • Next you have to setup an environment file (.env) with appropriate variables in the /server folder, an example .env would look like this:

    SERVER_PORT = /* Specifiy a port here (Optional) */
    DB_NAME = /* Your database name */
    DB_USER = /* Your database user */
    DB_PASSWORD = /* Your database user's password */
    DB_HOST = /* Your database host (Optional) */
  • Then run the following command to start both the React Client and Node Server(concurrently):

    yarn dev

Other Scripts

  • To run the node server individually, use:

    yarn server

    ---OR---

    # In /server
    yarn start
  • To sync tables in the database, use:

    # In /server
    yarn sync-tables

    With force option (will delete existing tables with the same names):

    # In /server
    yarn sync-tables -f
  • To run the react client individually, use:

    yarn client

    ---OR---

    # In /client
    yarn start
  • To run tests on the react client, use:

    # In /client
    yarn test
  • To build a production react client, use:

    # In /client
    yarn build
  • To eject the configuartion and scripts from the react-scripts package, use:

    # In /client
    yarn eject