A free discovery platform for consumers and farmers.
Farmer-to-Consumer Discovery Platform is a free discovery and connection platform where farmers can list their available products such as crops, vegetables, and fruits. Consumers can find nearby farmers based on location and product availability, and connect directly with sellers via phone calls or WhatsApp.
Our vision is to connect farmers directly with consumers to provide fresh, local produce without middlemen, thereby increasing farmers’ profits and ensuring fair prices.
💡 Quick Start: See SETUP_GUIDE.md for a comprehensive setup guide with troubleshooting tips!
Clone the project
git clone https://github.com/your_username/consumer-platform-backend.gitGo to the project directory
cd consumer-platform-backendInstall dependencies
npm installCreate a .env file in the root directory by copying the example file:
cp .env.example .envThen update the values in .env file:
DATABASE_URL- PostgreSQL connection stringJWT_SECRET- Secret key for JWT token generationPORT- Server port (default: 3000)NODE_ENV- Environment mode (development/production)
Option 1: Using Docker (Recommended for local development)
Start PostgreSQL using Docker Compose:
docker-compose up -dOption 2: Using your own PostgreSQL instance
Make sure PostgreSQL is installed and running, then update DATABASE_URL in your .env file accordingly.
Migrate all migrations to database
npx prisma migrate devGenerate Prisma client
npx prisma generateTo start the development server, run:
npm run dev