β Give this repo a star if you liked it!
Β
Connecting consumers with local farmers for a direct and fresh produce experience π§βπΎ
View Demo
Β·
Report Bug
Β·
Request Feature
Table of Contents
FarmFresh Finder is a platform designed to seamlessly connect farmers with consumers, fostering a direct and transparent exchange of fresh, locally sourced produce. Our application empowers farmers by providing a digital space to showcase their yields while offering consumers a convenient way to discover and purchase high-quality, sustainably grown products.
This project is for demonstration purposes only. The data displayed or curated is for illustrative purposes only and does not represent real-world information.
The v22.12.0 version of Node is required for the installation and building of this application.
- Clone this repository by running the following command in your terminal:
git clone /~https://github.com/Ktn-mariam/Find-FarmFresh.git
cd Find-FarmFresh
- Run the following command in the frontend side to install the dependencies:
cd client
npm install
- Run the following command in the server side to install the dependencies:
cd server
npm install
This project is connected to a mongodb database and cloudinary for storing images. Create a .env file in the server side of the application with the following required variables:
MONGO_URI=
JWT_SECRET=
JWT_LIFETIME=
CLOUDINARY_CLOUD_NAME=
CLOUDINARY_API_KEY=
CLOUDINARY_API_SECRET=
CLOUDINARY_URL=
- To run the React frontend:
cd client
npm start
- To run the NodeJS backend:
cd server
npm start
REGISTER
: Create an account and buy products from local farmersUPDATE PROFILE
: Update contact information as per needs.SEARCH AND FILTER PRODUCTS
: Discover products based on categories, filter them based on ratings and sort them as per preferences.View Farmer Profiles
: View farmer information and ratings, and access contact information.Persistent Shopping Cart
: Add products to the shopping cart and access them anytime, as they are also saved in the database.Track orders
: View all your orders, their delivery and payment statuses, and cancel them as well.Add comments
: Leave and read reviews of products and farmers for transparent, trustworthy relationships.Follow Farmers
: View recently added products of farmers you follow in your main store page.Top rated products
: View top rated products in your main store page.View discounts
: Take advantage of time limited discounts on products in your main store page.
Register
: Create an account and sell directly to consumers beyond local markets.Update Profile
: Update profile information as per needs.Add and update Products
: Add and update products, add or remove promotional discounts, and change visibility.View comments
: View consumer ratings and comments on your products and on your services for continuous improvement.30 Day Sales Graph
: Utilize a 30-day sales graph to track daily sales, gaining valuable insights.Track orders
: Track all your orders, update delivery and payment statuses, and delete them as well.Showcase products
: Showcase products online for visibility, even without delivery services.View products of other farmers
: View pricing of products of other farmers to maintain competitive.
Action | Route | Method |
---|---|---|
User login for farmers and Consumers | api/v1/auth/login |
POST |
Checks if email is already registered | api/v1/auth/userExists/email/:email |
GET |
Checks if name is already registered | api/v1/auth/userExists/name/:name |
GET |
Register Farmer | api/v1/auth/register/farmer |
POST |
Register Consumer | api/v1/auth/register/consumer |
POST |
Gets User Profile Information if token is present | api/v1/auth |
GET |
Action | Route | Method |
---|---|---|
Gets products of Farmer | api/v1/farmers/:farmerID/products |
GET |
Add comment to Farmer | api/v1/farmers/:farmerID/comments |
PATCH |
Get Farmer profile information | api/v1/farmers/:farmerID |
GET |
Update Farmer | api/v1/farmers/ |
PATCH |
Action | Route | Method |
---|---|---|
Gets products in shopping cart of Consumer | api/v1/consumers/shoppingCart |
GET |
Adds farmer to following list of Consumer | api/v1/consumers/followFarmer |
PATCH |
Removes farmer from following list of Consumer | api/v1/consumers/unFollowFarmer |
PATCH |
Get Consumer profile Information | api/v1/consumers/:consumerID |
GET |
Update Consumer | api/v1/consumers |
PATCH |
Action | Route | Method |
---|---|---|
Get All Products | api/v1/products/ |
GET |
Add Product | api/v1/products/ |
POST |
Get Top Rated Products | api/v1/products/topRatedProducts |
GET |
Get Discounted Products | api/v1/products/discountedProducts |
GET |
Get Recently added products of Farmer | api/v1/products/lastThirtyDayProducts/:farmerID |
GET |
Get Product Detail | api/v1/products/:productID |
GET |
Delete Product | api/v1/products/:productID |
DELETE |
Update Product | api/v1/products/:productID |
PATCH |
Get Products of Category | api/v1/products/category/:parentCategory |
GET |
Get Product Detail for Order | api/v1/products/orderDetail/:productID |
GET |
Action | Route | Method |
---|---|---|
Get Orders of User | api/v1/orders/ |
GET |
Add Order | api/v1/orders/ |
POST |
Get Orders that need Review | api/v1/orders/reviewOrders |
GET |
Get Earning stats of Farmer For Graph | api/v1/orders/getEarningsForLast30Days |
GET |
Update Order | api/v1/orders/:orderID |
PATCH |
Delete Order | api/v1/orders/:orderID |
DELETE |
Action | Route | Method |
---|---|---|
Get Number of Comments for Farmer | api/v1/comments/farmer/:farmerID/count |
GET |
Get Comments of Farmer | api/v1/comments/farmer/:farmerID |
GET |
Get Number of Comments for Product | api/v1/comments/product/:productID/count |
GET |
Get Comments of Product | api/v1/comments/product/:productID |
GET |
This application was deployed on Vercel. Make sure you enter the Environment Variables before deploying it. You also need to add vercel.json file with the following content:
{ "version": 2, "rewrites": [{ "source": "/(.*)", "destination": "/api" }] }
You also need to make sure the main file is named index.ts
and is in the /api folder.