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.
- Frontend Installation
- Backend Installation
- Running the App
- Project Structure
- Technologies Used
- Testing Instructions
- Troubleshooting Guide
- Contributing
- License
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 to your local machine:
git clone https://github.com/yourusername/govishakthi-app.git
Navigate to the frontend directory and install the required dependencies:
cd govishakthi-app/frontend
npm install
OR if you prefer Yarn:
yarn install
Make sure you have Node.js and npm installed on your system.
After cloning the repository, navigate to the backend directory:
cd govishakthi-app/backend
Install the required backend dependencies:
npm install
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
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.
/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
/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
- 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.
- Node.js: JavaScript runtime environment.
- Express.js: Web framework for Node.js.
- MongoDB/Mongoose: Database solution (optional, modify as needed).
-
Unit Testing: Run Jest tests using:
npm test
-
Manual Testing: Use Expo Go or an emulator to manually verify UI functionality.
-
API Testing with Postman:
Send GET, POST, PUT, and DELETE requests to verify API endpoints.
-Automated Testing with Jest:
npm run test
- Expo Not Starting
-
Ensure you have installed Expo CLI globally:
npm install -g expo-cli
-
Try clearing the cache:
expo start -c
- Backend Server Not Running
-
Ensure all dependencies are installed:
npm install
-
Check for TypeScript compilation errors before running:
npm run build
- Database Connection Failing
- Ensure MongoDB is running and the connection string is correct in your configuration file.
We welcome contributions to the Govishakthi project! To contribute:
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Make your changes and commit them (
git commit -am 'Add new feature'
). - Push the changes to your fork (
git push origin feature-branch
). - Create a Pull Request.
Make sure your code follows the project's coding standards and passes all linting checks before submitting a PR.
This project is licensed under the MIT License - see the LICENSE file for details.