Coder Social home page Coder Social logo

ets-reactnative3 / collabiz Goto Github PK

View Code? Open in Web Editor NEW

This project forked from team-dolan/collabiz

0.0 0.0 0.0 18.34 MB

Our hackathon solution

License: Apache License 2.0

JavaScript 80.69% Ruby 3.08% Objective-C 4.10% Java 2.65% CSS 3.15% HTML 5.26% Starlark 0.58% Shell 0.49%

collabiz's Introduction

CollabBiz - an initiative to collaborate small businesses

This application was devloped as a solution for Microsoft's HackOnAzure.

Team-Dolan

  • ROHAN TANEJA (Leader)
  • Ujjawal Aggarwal
  • Aaryaman Saini

Contents

  1. Overview
  2. Diagrams
  3. Technologies
  4. Getting started
  5. Deployment
  6. Usages

Overview

We identified two problems and came up with a solution that can help both the entities. These problems were identified from our own personal experiences when it became hard for us to get certain items in stores. While the Lockdown, has proved to be a good step, but it came with some new problem. There are many small businesses, which depend on their daily sales and in Lockdown, many people stopped buying stuff. So, they had to face huge backlashes. Also, there are many things that people need, like important medicines and electronics, but these are not available in their local stores on which they counted on normally. The reason for unavailability of such items in some stores can be because of restrictions on delivery of goods to every store. So, we can see there are two problems here. So, the question was, how can we help small businesses to be able to keep selling products and how can people get those products for which they would normally depend on local stores? The answer is CollabBiz.

Diagrams

Workflow diagram

Flow-chart diagram

Technologies

Getting started

Click here to view!

Prerequisites

Steps

Click here to view!
  1. Set up an instance of Watson Assistant.
  2. Provision a CouchDB instance using Cloudant.
  3. Generate an API Key from the HERE Developer Portal.
  4. Run the server.
  5. Run the mobile application.

1. Set up an instance of Watson Assistant

Log in to IBM Cloud and provision a Watson Assistant instance.

  1. Provision an instance of Watson Assistant from the IBM Cloud catalog.

  2. Launch the Watson Assistant service.

  3. Create an Assistant.

  4. Add a dialog skill to the Assistant by importing the starter-kit-cooperation-dialog-skill.json file.

  5. Go back to All Assistants page, open Settings from the action menu ( โ‹ฎ ) and click on API Details.

  6. Note the Assistant ID, API Key, and Assistant URL. For Assistant URL, make note of the base URL/domain (e.g., https://api.us-south.assistant.watson.cloud.ibm.com or https://api.eu-gb.assistant.watson.cloud.ibm.com) and not the full directory/path. You will need all three of these values in Step 4 below.

  7. Go to Preview Link to get a link to test and verify the dialog skill.

2: Provision a CouchDB instance using Cloudant

Log into the IBM Cloud and provision a CouchDB instance using Cloudant.

  1. From the catalog, select Databases and then the Cloudant panel.
  2. Once selected, you can choose your Cloudant plan -- there is a free tier for simple testing that is sufficient to run this CIR example. You should choose an appropriate region, give the service a name, and it is recommended you choose Use only IAM under Available authentication methods. You can leave the other settings with their defaults. Click the blue Create button when ready.
  3. Once your Cloudant instance has been created, you need to create a service credential that the CIR API Server can use to communicate with it. By selecting your running Cloudant instance, you can choose Service credentials from the left-hand menu. Create a new service credential and give it a name (it doesn't matter what you call it).
  4. Once created, you can display the credentials by selecting view service credentials, and then copy the credential, so you are ready to paste it into the code of the API server in Step 4.

3. Generate an API Key from the HERE Developer Portal

The application uses HERE Location Services for maps, searching, and routing.

To access these services, you'll need an API key. Follow the instructions outlined in the HERE Developer Portal to generate a JavaScript API key.

4. Run the server

To set up and launch the server application:

  1. Go to the starter-kit/server-app directory of the cloned repo.
  2. Copy the .env.example file in the starter-kit/server-app directory, and create a new file named .env.
  3. Edit the newly created .env file and update the ASSISTANT_URL, ASSISTANT_ID, and ASSISTANT_IAM_APIKEY with the values from the dialog skill's API Detail page in Watson Assistant, from Step 1. Also, update the CLOUDANT_ID and CLOUDANT_IAM_APIKEY with the values from the service credential you created in Step 2. (Note that the username from the credential is what should be used for the CLOUDANT_ID.)
  4. Edit the name value in the manifest.yml file to your application name (for example, my-app-name).
  5. From a terminal:
    1. Go to the starter-kit/server-app directory of the cloned repo.
    2. Install the dependencies: npm install.
    3. Launch the server application locally or deploy to IBM Cloud:
      • To run locally:
        1. Start the application: npm start.
        2. The server can be accessed at http://localhost:3000.
      • To deploy to IBM Cloud:
        1. Log in to your IBM Cloud account using the IBM Cloud CLI: ibmcloud login.
        2. Target a Cloud Foundry org and space: ibmcloud target --cf.
        3. Push the app to IBM Cloud: ibmcloud app push.
        4. The server can be accessed at a URL using the name given in the manifest.yml file (for example, https://my-app-name.bluemix.net).

5. Run the mobile application

To run the mobile application (using the Xcode iOS Simulator or Android Studio Emulator):

  1. Go to the starter-kit/mobile-app directory of the cloned repo.
  2. Copy the .env.example file in the starter-kit/mobile-app directory, and create a file named .env.
  3. Edit the newly created .env file:
    • Update the STARTER_KIT_SERVER_URL with the URL to the server app launched in the previous step.

      Note: If you are running the server locally and testing with the Android Emulator set the STARTER_KIT_SERVER_URL using the local machine's URL (e.g., http://10.0.2.2:3000) instead of localhost

    • Update the HERE_APIKEY with the API key generated in the HERE Developer Portal.
  4. From a terminal:
    1. Go to the starter-kit/mobile-app directory.
    2. Install the dependencies: npm install.
      • Android only: npm run android

        Note: Your Android Studio needs to have the Android 9 (Pie) SDK and a Pie API Level 28 virtual device

With the application running in the simulator/emulator, you should be able to navigate through the various screens:

Click here to view!

Home Page Current Inventory Add Inventory Update Inventory Search Inventory Chat with Watson User Chat Init User Chat Interface

Deployment

A Supplier (who may be a regular resident, a small business, a voluntary organization, etc.) that has food, supplies, resources, or other essentials they can provide opens the mobile application and fills out a brief form that indicates what they have. This information is then stored in the database.

A Recipient, who is in need of food, supplies, resources, or other essentials, opens the mobile application and can use the chat interface to locate supplies near them. For instance, they might type "Where can I find bread?" or "Can someone collect my shopping for me?" The mobile application then accesses the database (after first understanding the question) and then displays a map showing locally where they can find what they are looking for.

Usages

The goal was to make a web-application to get businesses to collaborate. We aimed to establish a networking model for business to function, especially Pharmacies, which tend to be most frequently visited for need of sanitization and hygiene products. This helps in modelling a market to get in touch with the supply chain as closely and conviniently, and restrict the movement of community to look in search of certain products. The application can come in handy even after lockdown.

collabiz's People

Contributors

bardiaalavi-2020 avatar henrynash avatar jjasghar avatar jodyburksphd avatar johncswanson avatar johnwalicki avatar kestin830 avatar krook avatar rohantaneja avatar saini1998 avatar ujjawal61 avatar vabarbosa 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.