Logo Lanfrica

heiskuol001/Agric-connect-backend

Domain:

agriculture

Record type:

software
Creator:
hei
Host:
Backend API for Agric Connect, a platform that connects farmers and buyers across East Africa. Built with Node.js, Express, MongoDB, and JWT authentication. # 🌱 Agric-Connect Backend The backend API for **Agric-Connect**, a web platform designed to connect farmers and buyers across East Africa. Agric-Connect provides a secure and scalable REST API for user authentication, farmer product management, product discovery, and role-based access control. ## πŸš€ Features * πŸ” JWT-based authentication * πŸ‘₯ Role-based access control (RBAC) * πŸ‘¨β€πŸŒΎ Farmer and buyer user roles * πŸ“¦ Product management * πŸ–ΌοΈ Product image uploads using Multer * πŸ”Ž Product retrieval and filtering * πŸ—„οΈ MongoDB database with Mongoose * ⚑ Redis caching for improved API performance * πŸ”’ Password hashing with bcrypt * πŸ›‘οΈ Helmet security middleware * 🌐 CORS configuration * πŸ“Š Structured controllers, services, models, and routes * πŸ”‘ Protected API endpoints * βš™οΈ Environment-based configuration ## πŸ› οΈ Tech Stack | Technology | Purpose | | ---------- | ----------------------------- | | Node.js | Backend runtime | | Express.js | REST API framework | | MongoDB | Database | | Mongoose | MongoDB ODM | | Redis | Caching | | JWT | Authentication | | bcrypt | Password hashing | | Multer | Image uploads | | Helmet | HTTP security | | CORS | Cross-origin resource sharing | | Postman | API testing | ## πŸ“ Project Structure ```text src/ β”œβ”€β”€ config/ β”‚ β”œβ”€β”€ db.js β”‚ └── redis.js β”‚ β”œβ”€β”€ controllers/ β”‚ β”œβ”€β”€ auth.controller.js β”‚ └── product.controller.js β”‚ β”œβ”€β”€ middleware/ β”‚ β”œβ”€β”€ auth.middleware.js β”‚ β”œβ”€β”€ upload.middleware.js β”‚ └── ... β”‚ β”œβ”€β”€ models/ β”‚ β”œβ”€β”€ user.model.js β”‚ β”œβ”€β”€ product.model.js β”‚ β”œβ”€β”€ role.model.js β”‚ └── permission.model.js β”‚ β”œβ”€β”€ routes/ β”‚ β”œβ”€β”€ auth.route.js β”‚ └── product.route.js β”‚ β”œβ”€β”€ services/ β”‚ β”œβ”€β”€ auth.service.js β”‚ └── product.service.js β”‚ β”œβ”€β”€ app.js └── server.js uploads/ .env .gitignore package.json README.md ``` ## …