Sellifi Developer Installation Guide

This guide provides detailed installation steps for each component in the Sellifi project.


Table of Contents

  1. sellifi-api-1 Installation
    • 1.1 Prerequisites
    • 1.2 Installation Steps
  2. sellifi-api-2 Installation
    • 2.1 Prerequisites
    • 2.2 Installation Steps
  3. sellifi-mobile-app Installation
    • 3.1 Prerequisites
    • 3.2 Installation Steps
  4. sellifi-mobile-app-food Installation
    • 4.1 Prerequisites
    • 4.2 Installation Steps
  5. sellifi-alertfuze Installation
    • 5.1 Prerequisites
    • 5.2 Installation Steps
  6. sellifi-hyperledger-fabric-net Installation
    • 6.1 Prerequisites
    • 6.2 Installation Steps

1. sellifi-api-1 Installation

sellifi-api-1 is a Go Fiber application serving as the server for the web client.

1.1 Prerequisites

  • Go (version 1.19 or above)
  • Redis (for caching)
  • PostgreSQL (for persistent storage)

1.2 Installation Steps

  1. Clone the Repository:

    git clone https://github.com/Forest-Economy-Alliance/sellifi-central.git
    cd sellifi-api-1
    
  2. Set Up Environment Variables:

    • Copy .env.example to .env and fill in the required values:
      PORT=8080
      DATABASE_URL=your_postgresql_database_url
      REDIS_URL=your_redis_url
      
  3. Install Dependencies:

    go mod tidy
    
  4. Run Database Migrations (if applicable):

    go run migrate.go
    
  5. Start the Application:

    go run main.go
    
  6. Verify API is Running:

    • Go to http://localhost:8080 to check.

2. sellifi-api-2 Installation

sellifi-api-2 is a Go Fiber application handling green score services.

2.1 Prerequisites

  • Go (version 1.19 or above)
  • Redis (for caching)
  • PostgreSQL (for persistent storage)

2.2 Installation Steps

  1. Clone the Repository:

    git clone https://github.com/Forest-Economy-Alliance/sellifi-central.git
    cd sellifi-api-2
    
  2. Set Up Environment Variables:

    • Copy .env.example to .env and configure values.
  3. Install Dependencies:

    go mod tidy
    
  4. Start the Application:

    go run main.go
    
  5. Verify API is Running:

    • Check http://localhost:8080.

3. sellifi-mobile-app Installation

sellifi-mobile-app is a React Native application used for forest commodity services.

3.1 Prerequisites

  • Node.js (version 14+)
  • npm or yarn
  • Android Studio (for Android)
  • Xcode (for iOS on macOS)

3.2 Installation Steps

  1. Clone the Repository:

    git clone https://github.com/Forest-Economy-Alliance/sellifi-central.git
    cd sellifi-mobile-app
    
  2. Install Dependencies:

    npm install
    # OR
    yarn install
    
  3. Set Up Environment Variables:

    • Copy .env.example to .env and set values.
  4. Start the App on Android/iOS:

    • For Android:
      npx react-native run-android
      
    • For iOS (macOS only):
      npx react-native run-ios
      

4. sellifi-mobile-app-food Installation

sellifi-mobile-app-food is a React Native application designed to streamline requirements from schools to Farmer Producer Companies (FPCs).

4.1 Prerequisites

  • Node.js (version 14+)
  • npm or yarn
  • Android Studio (for Android)
  • Xcode (for iOS on macOS)

4.2 Installation Steps

  1. Clone the Repository:

    git clone https://github.com/Forest-Economy-Alliance/sellifi-central.git
    cd sellifi-mobile-app-food
    
  2. Install Dependencies:

    npm install
    # OR
    yarn install
    
  3. Set Up Environment Variables:

    • Copy .env.example to .env and set values.
  4. Start the App on Android/iOS:

    • For Android:
      npx react-native run-android
      
    • For iOS (macOS only):
      npx react-native run-ios
      

5. sellifi-alertfuze Installation

sellifi-alertfuze is a Serverless Application Model (SAM) project.

5.1 Prerequisites

  • AWS CLI configured
  • AWS SAM CLI

5.2 Installation Steps

  1. Clone the Repository:

    git clone https://github.com/Forest-Economy-Alliance/sellifi-central.git
    cd sellifi-alertfuze
    
  2. Install Dependencies:

    sam build
    
  3. Deploy the Application:

    • Use the following command to deploy:
      sam deploy --guided
      
    • Follow the guided prompts, providing AWS configurations.
  4. Verify Deployment:

    • Verify endpoints in the AWS Console.

6. sellifi-hyperledger-fabric-net Installation

sellifi-hyperledger-fabric-net is a Hyperledger Fabric project managed with Fablo.

6.1 Prerequisites

  • Docker and Docker Compose
  • Fablo CLI

6.2 Installation Steps

  1. Clone the Repository:

    git clone https://github.com/Forest-Economy-Alliance/sellifi-central.git
    cd sellifi-hyperledger-fabric-net
    
  2. Start the Fabric Network:

    fablo up
    
  3. Install Chaincode (Smart Contracts):

    • Follow Fablo commands to install and approve chaincode on the network.
  4. Interact with the Network:

    • Use Fablo CLI or API endpoints to interact with the chaincode.
  5. Shut Down the Network:

    fablo down
    

Additional Notes

  • For environment-specific configurations, ensure each .env file is set up correctly for production, development, or testing environments.
  • Refer to each folder’s README.md file for component-specific instructions or troubleshooting.

This guide should cover basic installations and setup processes for each component in the Sellifi project. If there are any further questions, refer to individual project documentation within the repository.