Skip to content

VinukaVilhan/iwb236-scriptrippers

Repository files navigation

WARAID

WARAID is a web application designed for emergency assistance, providing alert messages, first-aid chatbot functionalities, file management, news updates, and location-based services. The backend is developed using the Ballerina programming language.

Prerequisites

Before running the application, ensure you have the following installed:

Installation

  1. Clone the repository:

    git clone https://github.com/VinukaVilhan/iwb236-scriptrippers.git
    cd WARAID
  2. Install the frontend dependencies:

    npm install

Backend Setup

Some backend service needs to have its own Config.toml file which stores the configuration required for the service to run.

Alert Messages

  1. Navigate to the alertMsg service directory:

    cd Backend/alertMsg
  2. Create a Config.toml file and add the following configurations for the AWS RDS.

    host = "<aws-rds-host>" 
    port = "<port>"                  
    username = "<username>"        
    password = "<password>"  
    database = "<database_name>"
  3. Run the service:

    bal run

Files Control

  1. Navigate to the files-control service directory:

    cd Backend/files-control
  2. Create a Config.toml file and add the following configurations for OpenAI and AWS S3.

    openAIToken="<openai_token>"
    accessKeyId = "<aws-access-key-id>"
    secretAccessKey = "<aws-secret-access-key>"
    region = "<aws_bucket_region>"
    bucketName = "<bucket_name>"
  3. Run the service:

    bal run

First-Aid Chatbot

  1. Navigate to the first-aid-chatbot service directory:

    cd Backend/first-aid-chatbot
  2. Create a Config.toml file and add the following configurations for the OpenAI.

    openaiEndpointUrl = "<endpoint_url>"
    openaiDeploymentName = "<deployment_name>"
    openaiApiKey = "<api_key>"
  3. Run the service:

    bal run

JWT

  1. Navigate to the first-aid-chatbot service directory:

    cd Backend/first-aid-chatbot
  2. Run the service:

    bal run

Location Service

  1. Navigate to the location_service directory:

    cd Backend/location_service
  2. Create a Config.toml file and add the following configurations for the AWS RDS.

    host = "<aws-rds-host>" 
    port = "<port>"                  
    username = "<username>"        
    password = "<password>"  
    database = "<database_name>"
  3. Run the service:

    bal run

News

  1. Navigate to the news service directory:

    cd Backend/news
  2. Create a Config.toml file and add the following configurations for the newsapi.org API.

    apiKey = "<API_key>"	
  3. Run the service:

    bal run

Frontend Setup

The frontend of WARAID is built using Vite, a modern frontend build tool that provides a faster and leaner development experience.

Install Dependencies

Before running the frontend, ensure that the required Node.js packages are installed.

  1. Navigate to the root directory of the project where the package.json file is located:

    cd WARAID
  2. Install the required packages using npm:

    npm install

    Alternatively, if you are using yarn, you can install the dependencies with:

    yarn install

Running the Frontend in Development Mode

After installing the dependencies, you can start the frontend development server.

  1. In the root directory of the project, run the following command:

    npm run dev

    Or, if using yarn:

    yarn dev
  2. By default, Vite will start a local development server on port 5173. Open your browser and go to:

    http://localhost:5173
    

About

App developed for the Ballerina Competition

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors