Skip to content

πŸš€ AI-Powered Decision Support & Profit Maximization App for Farmers & SMEs. Aims to help farmers and small businesses make data-driven decisions to maximize profits. leveraging AI for price predictions, alternative product suggestions, and marketplace recommendations. Developed as part of a Software Development Group Project with a group of 6 πŸš€

Notifications You must be signed in to change notification settings

ThushanMadu/govi-shakthi-central

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation


Govishakthi App

Introduction

Govishakthi is a mobile application designed to empower farmers by providing decision support for agricultural product optimization and market intelligence. The project aims to help small and medium-scale farmers tackle price instability, market inefficiencies, and post-harvest losses by leveraging real-time market data, predictive analytics, and alternative product suggestions.

The frontend of Govishakthi is built using React Native with Expo, ensuring a smooth cross-platform experience for both Android and iOS users. The backend is powered by Node.js with Express.js, enabling efficient API management and data processing. Additionally, the system integrates a Large Language Model (LLM) to provide personalized recommendations, price forecasting, and alternative product insights to farmers, helping them make data-driven decisions.

Table of Contents


Frontend Installation (React Native with Expo)

Prerequisites

Ensure that you have the following tools installed:

  • Node.js (LTS version recommended)
  • Expo CLI (optional, but recommended for Expo commands)
    npm install -g expo-cli

Clone the Repository

Clone the repository to your local machine:

git clone https://github.com/yourusername/govishakthi-app.git

Install Dependencies

Navigate to the frontend directory and install the required dependencies:

cd govishakthi-app/frontend
npm install

OR if you prefer Yarn:

yarn install

Backend Installation (Node.js with Express)

Prerequisites

Make sure you have Node.js and npm installed on your system.

Navigate to Backend Directory

After cloning the repository, navigate to the backend directory:

cd govishakthi-app/backend

Install Dependencies

Install the required backend dependencies:

npm install

Running the App

Frontend (React Native with Expo)

To run the frontend, navigate to the frontend directory and start the Expo server:

cd frontend
npm start

This will open the Expo development server. You can scan the QR code with the Expo Go app on your phone or use a simulator/emulator.

  • For iOS:
    npx expo start --ios
  • For Android:
    npx expo start --android

Backend (Node.js with Express)

To start the backend server, navigate to the backend directory and run:

cd backend
npm run dev // Compiles the .ts files to .js and run

The server will be running on http://localhost:7000 (or a different port if you configure it). You can test the API using tools like Postman or integrate it with the frontend app.


Project Structure

Frontend (React Native with Expo)

/govishakthi-app/frontend
β”œβ”€β”€ /assets           # Static assets like images, fonts
β”œβ”€β”€ /components       # Reusable components (buttons, headers, etc.)
β”œβ”€β”€ /screens          # App screens
β”œβ”€β”€ /navigation       # React Navigation setup
β”œβ”€β”€ /hooks            # Custom hooks
β”œβ”€β”€ /context          # Context API for app state management
β”œβ”€β”€ App.js            # Entry point for the app
β”œβ”€β”€ app.json          # Expo configuration
β”œβ”€β”€ package.json      # Frontend dependencies and scripts

Backend (Node.js with Express)

/govishakthi-app/backend
β”œβ”€β”€ /src              # All the TypeScript files and directories
β”œβ”€β”€ /dist             # All the compiled JavaScript files
β”œβ”€β”€ /src/index.ts     # Main entry point for the Node.js server
β”œβ”€β”€ /config           # Database and server configuration
β”œβ”€β”€ package.json      # Backend dependencies and scripts

Technologies Used

Frontend

  • React Native: Framework for building mobile apps.
  • Expo: Platform and tools for building React Native apps.
  • React Navigation: For routing and navigation.
  • Axios/Fetch: For making HTTP requests.
  • Redux/Context API: For state management (optional).
  • Styled Components: (optional) for styling the components.

Backend

  • Node.js: JavaScript runtime environment.
  • Express.js: Web framework for Node.js.
  • MongoDB/Mongoose: Database solution (optional, modify as needed).

Testing Instructions

Frontend Testing

  • Unit Testing: Run Jest tests using:

    npm test

  • Manual Testing: Use Expo Go or an emulator to manually verify UI functionality.

Backend Testing

  • API Testing with Postman:

    Send GET, POST, PUT, and DELETE requests to verify API endpoints.

-Automated Testing with Jest:

npm run test

Troubleshooting Guide

Common Issues and Solutions

  1. Expo Not Starting
  • Ensure you have installed Expo CLI globally:

    npm install -g expo-cli

  • Try clearing the cache:

    expo start -c

  1. Backend Server Not Running
  • Ensure all dependencies are installed:

    npm install

  • Check for TypeScript compilation errors before running:

    npm run build

  1. Database Connection Failing
  • Ensure MongoDB is running and the connection string is correct in your configuration file.

Contributing

We welcome contributions to the Govishakthi project! To contribute:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature-branch).
  3. Make your changes and commit them (git commit -am 'Add new feature').
  4. Push the changes to your fork (git push origin feature-branch).
  5. Create a Pull Request.

Make sure your code follows the project's coding standards and passes all linting checks before submitting a PR.


License

This project is licensed under the MIT License - see the LICENSE file for details.


About

πŸš€ AI-Powered Decision Support & Profit Maximization App for Farmers & SMEs. Aims to help farmers and small businesses make data-driven decisions to maximize profits. leveraging AI for price predictions, alternative product suggestions, and marketplace recommendations. Developed as part of a Software Development Group Project with a group of 6 πŸš€

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 91.7%
  • Python 7.1%
  • JavaScript 1.2%