Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LINK TO MY VIDEO PRESENTATION: https://www.loom.com/share/ef98a793899e414ebba8fa7ca547ad5b?sid=cf947159-a15c-411f-bf00-492c3097ff45

LINK TO MY ANDROID APP PACKAGE: https://drive.google.com/file/d/1d80EYiXnEPMB1La55TLqBFFG_Od0CKM-/view?usp=sharing

LINK TO MY WEDAPP ADMIN DASHBOARD: https://admin.sentraimpact.org

Sentra: AI-Powered Agricultural Intelligence Platform

Sentra is a comprehensive, multi-component platform designed to provide advanced agricultural intelligence. It leverages a microservices-based backend, a web-based administrative dashboard, a mobile application for farmers, and a sophisticated machine learning model for crop health analysis.

Table of Contents

Project Overview

Sentra is designed to empower farmers and agricultural businesses with data-driven insights. The platform integrates IoT device data, user-provided information, and advanced machine learning to provide real-time monitoring, alerts, and analytics for crop health and farm management.

Architecture

The Sentra platform is built on a distributed architecture, with several key components working together:

  • Backend Services: A set of microservices responsible for handling business logic, data processing, and API endpoints.
  • Admin Dashboard: A web application for administrators to manage users, devices, and view analytics.
  • Mobile App: A cross-platform mobile application for farmers to interact with the system, receive alerts, and view their farm data.
  • Machine Learning Model: A Python-based service that provides crop health analysis, disease detection, and other AI-powered insights.

Components

Backend Services

The backend is a collection of Node.js microservices, containerized with Docker.

Backend Services

  • Services:
    • user-service: Manages user authentication and profiles.
    • device-service: Handles IoT device registration, data ingestion, and management.
    • farm-crop-service: Manages farm and crop data.
    • alerts-service: Generates and manages alerts based on device data and model insights.
    • reports-analytics-service: Provides data analytics and reporting features.
    • notification-service: Sends notifications to users via various channels.
  • Technology: Node.js, Express, TypeScript, Docker.
  • Database: Assumes an external PostgreSQL database (e.g., Neon).

Admin Dashboard

A web-based dashboard for administrative tasks.

Admin Dashboard Admin Dashboard Admin Dashboard Admin Dashboard Admin Dashboard

  • Features: User management, device management, farm and crop monitoring, analytics and reporting.
  • Technology: React, Vite, TypeScript, Tailwind CSS, Shadcn UI.

Mobile App

A cross-platform mobile application for farmers.

Mobile App Mobile App Mobile App
Mobile App Mobile App Mobile App
Mobile App Mobile App Mobile App
  • Features: Real-time alerts, crop health status, farm data visualization, and interaction with the backend services.
  • Technology: React Native, Expo, Expo Router.

Machine Learning Model

A Python-based service that provides AI-powered insights.

  • Features: Crop disease detection (YOLO), health scoring, and a RAG agent for providing contextual information.
  • Technology: Python, FastAPI, PyTorch, ultralytics, OpenAI, Anthropic.

Getting Started

Prerequisites

  • Docker and Docker Compose
  • Node.js (v18 or later)
  • npm or yarn
  • Python (v3.9 or later)
  • A PostgreSQL database (e.g., a free tier Neon database)

Installation

  1. Clone the repository:

    git clone https://github.com/SmartIsrael/Sentra_Final_Product
    cd sentra
  2. Set up environment variables:

    • Create a .env file in the backend-services directory by copying the example file (.env.example if it exists) and fill in the required values, especially the DATABASE_URL.
    • Create a .env file in the admin-dashboards directory for frontend-specific environment variables.
  3. Install dependencies for each component:

    # For the admin dashboard
    cd admin-dashboards
    npm install
    cd ..
    
    # For the mobile app
    cd mobile-app
    npm install
    cd ..
    
    # For the machine learning model
    cd model
    pip install -r requirements.txt
    cd ..

Usage

Running the Backend Services

The backend services are orchestrated using Docker Compose.

cd backend-services
docker-compose up --build

This will build and start all the microservices defined in the docker-compose.yml file. The services will be accessible on their respective ports (3001-3006).

Running the Admin Dashboard

cd admin-dashboards
npm run dev

The admin dashboard will be available at http://localhost:5173 (or another port if 5173 is in use).

Running the Mobile App

cd mobile-app
npm start

This will start the Metro bundler. You can then run the app on an iOS simulator, Android emulator, or on your physical device using the Expo Go app.

Running the Machine Learning Model

The machine learning model is served via a FastAPI application.

cd model
uvicorn main:app --reload

The model's API will be available at http://localhost:8000.

Environment Variables

Each component may require specific environment variables. Please refer to the respective directories for .env.example files or further documentation on required environment variables. A central .env file in backend-services is used for all microservices.

smartel-capstone

Testing

Each test file screenshot can be observed below, the testing used was a unit testing approach as well as integration testing

Testing Testing Testing Testing

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages