Asclepius API is a project designed to provide a backend service for medical-related applications. This README will guide you through the setup process, including connecting to a virtual machine (VM) using WSL (Windows Subsystem for Linux) or Compute Engine, as well as detailing the Google Cloud products utilized in this project.
- Prerequisites
- Setup
- Connecting to Your VM
- Google Cloud Products
- Running the API
- Contributing
- License
Before setting up the Asclepius API, ensure you have the following installed:
- tensorflow.js (Mandatory)
- Hapi.js (Mandatory)
- Git (Mandatory)
- Nodejs 20 higher/i recommend you to use NVM. (Mandatory)
- Google Cloud SDK (Opsional)
- WSL (Mandatory)
-
Clone the repository:
git clone https://github.com/faqih-rus/asclepius-api.git cd asclepius-api
-
Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install dependencies:
npm install @hapi/hapi @tensorflow/tfjs-node@3.21.1 @google-cloud/firestore dotenv
To connect to your VM, follow these steps:
-
Create SSH keys:
mkdir ~/.ssh ssh-keygen -t rsa -f ~/.ssh/<KEY_FILENAME> -C <USERNAME> -b 2048 cat ~/.ssh/<KEY_FILENAME>.pub
-
Connect to the VM:
ssh -i ~/.ssh/<PRIVATE_KEY_FILENAME> <Username>@<external_IP_VM>
-
Optional VM setup for ease of use:
htop cd ~/.ssh touch config nano config
Add the following configuration:
Host <Alias> HostName <IP_Address> User <VM_Username> IdentityFile <Path to Private SSH Key>
The Asclepius API utilizes several Google Cloud products:
- Compute Engine: Hosts the backend service.
- Cloud Storage: Stores machine learning models.
- Firestore: Stores prediction results.
- App Engine: Deploys the frontend application.
After connecting to your VM and setting up your environment, follow these steps to run the API:
-
Navigate to the project directory:
cd asclepius-api
-
Run the API:
npm run start
Contributions are welcome! Please open an issue or submit a pull request for any changes or improvements.
This project is licensed under the MIT License. See the LICENSE file for details.
Follow these instructions to set up and run the Asclepius API. If you encounter any issues or have questions, please refer to the project repository's issue tracker.