Skip to content

Service-Design-Studio/AMADEUS

Repository files navigation

Logo

Service Design Studio 2022

A joint collaboration between SUTD and RSAF
Design Workbook . View Demo · Google Sites

About The Project

As an information portal, AMADEUS allows admin users to upload important articles, which are tagged, categorised and summarised by varying forms of artificial intelligence. Making use of Google's Cloud APIs, AMADEUS is able to effectively tackle the large diversity and high volumes of relevant information for its users.

(back to top)

Getting Started

Prerequisites

  • Base configuration
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
  • Install Ruby Version Manager
    • WSL:
      • Install rvm:
      gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
      \curl -sSL https://get.rvm.io | bash
    • MacOS:
      # Install GPG
      brew install gpg
      
      # Trust Keys
      echo 409B6B1796C275462A1703113804BB82D39DC0E3:6: | gpg --import-ownertrust
      echo 7D2BAF1CF37B13E2069D6956105BD0E739499BDB:6: | gpg --import-ownertrust
      
      # Import Keys
      curl -sSL https://rvm.io/mpapis.asc | gpg --import -
      curl -sSL https://rvm.io/pkuczynski.asc | gpg --import -
      
      # Install RVM
      \curl -sSL https://get.rvm.io | bash -s -- --ignore-dotfiles
  • Add rvm to $PATH in .bashrc or .zshrc
    export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting
    [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
    • Restart shell and check version
    exec bash # exec zsh
    rvm -v
  • Install Ruby 3.0.0
# Install
rvm install 3.0.0

# Check
rvm list rubies

# Use ruby
rvm use 3.0.0
  • Install Redis
    • WSL
    sudo apt update
    sudo apt install redis-server
    • MacOS:
    brew install redis
  • Install Python 3.9 and pip
    • WSL
    sudo apt update
    sudo apt install software-properties-common -y
    sudo add-apt-repository ppa:deadsnakes/ppa
    sudo apt install python3.9 -y
    sudo apt install python3-pip python3.9-distutils python3.9-venv -y
    python3.9 -m pip install pip
    • MacOS
    brew install [email protected]

(back to top)

Installation

  1. Clone the repo
git clone https://github.com/Service-Design-Studio/final-project-group-5-amadeus.git
  1. Install gem libraries
bundle install
  1. Setup database
rake db:create db:migrate db:seed
  1. Setup microservices
    1. Install python virtual environment under ./lib/assets and activate
    cd lib/assets
    python3.9 -m venv env  
    source env/bin/activate
    1. Install dependencies (might need install Rust to build transformers)
    pip install flask torch transformers

Run development

All commands is ran under repository root path

Test zip files can be downloaded from app/assets/test_zip

  1. Run microservices (1 terminal)
cd lib/assets
source env/bin/activate
python transfomers.py
  1. Run Rails application (1 terminal)
foreman start -f Procfile_test.dev

Troubleshooting

  1. Reset database
rake db:reset db:migrate db:seed
  1. Clean database
  • Install sqlite3
sudo apt update
sudo apt install sqlite3
  • Open development db
sqlite3 db/development.db
  • Common commands
# Get all tables
.tables

# Check schema
.schema [table-name]

# Get data
SELECT * FROM [table-name]

# Delete data
DELETE FROM [table-name] WHERE [column-name]=[value]

(back to top)

Testing

(back to top)

Acknowledgments

  1. Tran Nguyen Bao Long @TNBL265 (Project Manager + Technical Lead)
  2. Timothy Wee @weetimo (Scrum Master + ML Engineer)
  3. Wang Zhao @zhaaaoo (Fullstack Developer)
  4. Henry Lian @Hentard (Frontend Dev + UI/UX Designer)
  5. Ernest Lim @Anteloped (Backend Dev + DevOps)
  6. Tron Ng @gnnort (Backend Dev + QA Engineer)

(back to top)

About

A Ruby on Rails SaaS we application deployed on GCP

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published