Logo Lanfrica

skipperForREAL/shamba-mkononi

Domaine:

agriculture

Type de record:

software
Créateur:
ski
Hôte:
Marketplace for sellers and buyers to make advertisement of their products online # Shamba Mkononi - Agricultural Marketplace A complete full-stack web application connecting farmers/producers directly with buyers. Built with React, Node.js, Express, and PostgreSQL. ## Features - **User Management**: Registration, login, and role-based access (Admin, Seller, Buyer) - **Product Catalog**: Browse, search, and filter agricultural products - **Shopping Cart**: Add products, manage quantities, and checkout - **Order Management**: Track orders from processing to delivery - **Reviews & Ratings**: Rate products and sellers after delivery - **Admin Dashboard**: Manage users, approve sellers, view statistics - **Seller Dashboard**: Manage products, track orders, update inventory - **Buyer Dashboard**: Manage cart, view order history ## Tech Stack ### Frontend - React 18 with Vite - React Router for navigation - Tailwind CSS for styling - Axios for API calls - React Icons ### Backend - Node.js with Express - PostgreSQL database - JWT authentication - bcrypt for password hashing - Multer for file uploads ## Prerequisites - Node.js (v16 or higher) - PostgreSQL (v12 or higher) - npm or yarn ## Installation ### 1. Clone the repository ```bash git clone cd Pembejeo ``` ### 2. Set up the database 1. Create a PostgreSQL database: ```sql CREATE DATABASE shamba_mkononi; ``` 2. Run the schema: ```bash psql -U postgres -d shamba_mkononi -f database/schema.sql ``` 3. (Optional) Seed initial data: ```bash psql -U postgres -d shamba_mkononi -f database/seed.sql ``` ### 3. Set up the backend 1. Navigate to the backend directory: ```bash cd backend ``` 2. Install dependencies: ```bash npm install ``` 3. Create a `.env` file in the `backend` directory: ```env PORT=5000 NODE_ENV=development DB_HOST=localhost DB_PORT=5432 DB_NAME=shamba_mkononi DB_USER=postgres DB_PASSWORD=your_password JWT_SECRET=your_super_secret_jwt_key_change_in_production JWT_EXPIRE=7d UPLOAD_PATH=./uploads MAX_FILE_SIZE=5242880 ``` 4. Create the uploads directory: ```bash …