AgroMarket is a marketplace where farmers can sell their produce. This project was developed by a team of three contributors.
AgroMarket is a web-based platform that connects farmers with potential buyers. It provides a convenient and efficient way for farmers to showcase and sell their produce directly to consumers. The platform also offers features such as product categorization, search functionality, and secure payment options to enhance the user experience.
To install AgroMarket, follow these steps:
-
Clone the repository:
git clone https://github.com/Sobilo34/AgroMarket.git -
Navigate to the project directory:
cd AgroMarket -
Create and activate a virtual environment:
python3 -m venv venv source venv/bin/activate -
Install the required packages:
pip install -r requirements.txt -
Install MySQL and MySQL client:
- For Ubuntu:
sudo apt-get install mysql-server libmysqlclient-dev - For macOS:
brew install mysql
- For Ubuntu:
vi .env Update the necessary environment variables in the .env file with the database name, user.
- Create a MySQL database and update the database configuration in
setup_mysql_dev.sql
- Start the api server:
python3 -m api.v1.app - Start the web app server: `python3 -m web_app.app
- Open your web browser and visit
http://localhost:5000 - Sign up or log in to your account
- Browse through the available products
- Add desired products to your cart and proceed to checkout
- Track the status of your orders in the dashboard
The AgroMarket API provides the following endpoints:
POST /api/v1/login: Logs a user inGET /api/v1/users: Get a list of all usersGET /api/v1/users/{id}: Get details of a specific userPOST /api/v1/users: Create a new userPUT /api/v1/users/{id}: Update details of a specific userGET /users/<user_id>/orders': Returns all user ordersPOST /users/<user_id>/image': uploads user imageDELETE /api/v1/users/{id}: Delete a specific user
GET /api/v1/products: Get a list of all productsGET /api/v1/products/{id}: Get details of a specific productPOST /api/v1/products: Create a new productPUT /api/v1/products/{id}: Update details of a specific productDELETE /api/v1/products/{id}: Delete a specific productGET '/products/<product_id>/images': Retrieves the images of a productPOST '/products/<product_id>/images': Uploads user image
GET /orders: Retrieve a list of all orders.POST /orders: Create a new order.GET /orders/{id}: Retrieve a specific order by ID.PUT /orders/{id}: Update a specific order by ID.DELETE /orders/{id}: Delete a specific order by ID.GET /orders/{id}/reviews: Retrieve reviews associated with a specific order.POST /orders/{id}/reviews: Create a review for a specific order.
GET /deliveries: Retrieve a list of all deliveries.POST /deliveries: Create a new delivery.GET /deliveries/{id}: Retrieve a specific delivery by ID.PUT /deliveries/{id}: Update a specific delivery by ID.DELETE /deliveries/{id}: Delete a specific delivery by ID.GET /orders/{order_id}/delivery: Retrieve the delivery associated with a specific order.POST /orders/{order_id}/delivery: Create a delivery for a specific order.
For more information on how to use these endpoints, please refer to the API documentation.
4. Push to the branch: git push origin feature/your-feature-name
5. Open a pull request
AgroMarket is released under the MIT License. See LICENSE for more information.
We welcome contributions from the community to improve AgroMarket. To contribute, please follow these guidelines:
- Fork the repository
- Create a new branch:
git checkout -b feature/your-feature-name - Make your changes and commit them:
git commit -m 'Add some feature' - Push to the branch:
git push origin feature/your-feature-name - Open a pull request
For any inquiries, please contact the project contributors:
- Adigwe Dennis: adigwedennis@gmail.com
- Bilal Oyeleke: bilalsolih60@gmail.com
- Gideon Oba: deyonoba@gmail.com