README.md – Backend
This is the backend repository for the AGRI-HOPE Marketplace Platform.
- Nest.js + TypeScript
- MongoDB (Mongoose) for database
- JWT + Passport for authentication
- Axios-compatible APIs for frontend communication
- Vercel / Render for deployment
- User Authentication (Login/Register for Buyers & Vendors)
- Vendor Management: profile, product/service CRUD
- Buyer Management: orders, transaction tracking
- Admin Dashboard: oversee users and transactions
- API endpoints for frontend integration
- Optional: AI assistant integration
src/→ Main source codeauth/→ Authentication module (JWT, guards, strategies)users/→ User module (Buyer, Vendor, Admin profiles)products/→ Product CRUD APIsorders/→ Transactions / Order managementcommon/→ Shared DTOs, pipes, filters, utilsconfig/→ Environment configuration
test/→ Unit / e2e tests.env.example→ Sample environment variablesREADME.md→ Project documentationpackage.json→ Dependencies and scripts
- Clone the repository
git clone https://github.com/your-org/marketplace-backend.git
cd marketplace-backend
Install dependencies
npm install
Setup environment variables
cp .env.example .env
Example .env:
MONGO_URI=mongodb://localhost:27017/agrihope
JWT_SECRET=yourSecretKey
PORT=5000
Run development server
npm run start:dev
Open http://localhost:5000
to see the API (Swagger or test routes).
Build for production
npm run build
npm run start:prod
🌍 Deployment
Recommended platforms: Vercel (serverless functions), Render, or any Node.js hosting.
Push to main branch → auto-deploy (configure environment variables on host).
👥 Contributors
Backend Team