Cropswap eCommerce Platform
Cropswap is a demo application that was designed to connect local farmers to consumers to revolutionize the way we get our groceries.
Overview
TL;DR — Cropswap connects local farmers to consumers to revolutionize the way we get our groceries.
Check out the demo or follow on Github.
Goal
Create an eCommerce platform built with the MERN stack & Redux. The goal is to create a way connect local farmers to their communities.
Features
- Full featured shopping cart
- Product reviews and ratings
- Top products carousel
- Product pagination
- Product search feature
- User profile with orders
- Admin product management
- ProductAdmin user management
- Admin Order details page
- Mark orders as delivered option
- Checkout process (shipping, payment method, etc)
- PayPal / credit card integration
- Database seeder (products & users)
Checkout
Credit card checkout is also handled completely through Paypal, that way I don’t have to touch any credit card details in the app. This payment system is currently not functional and just has demo credentials. Feel free to try it out.
Setup Env Variables
NODE_ENV = development
PORT = 5000
MONGO_URI = your mongodb uri
JWT_SECRET = 'abc123'
PAYPAL_CLIENT_ID = your paypal client id
Setup Env Variables
npm install
cd frontend
npm install
Build & Deploy
Frontend prod build
cd frontend
npm run build
There is a Heroku postbuild script, so if you push to Heroku, no need to build manually for deployment to Heroku
Database Seeding
You can use the following commands to seed the database with some sample users and products as well as destroy all data
npm run data:import
npm run data:destroy
Sample User Logins
---
user: admin@example.com (Admin)
password: 123456
user: jane@example.com (Customer)
password: 123456
user: john@example.com (Customer)
password: 123456
---