QFarm is an innovative agricultural marketplace platform connecting farmers and buyers in Sierra Leone through a comprehensive digital solution. Built for the KNESST Qcell Challenge by Mohamed Barrie, Njala University Graduate 2024.
- User Authentication & Authorization
- Advanced Crop Marketplace
- Search functionality
- Price range filtering
- Category-based filtering
- Location filtering
- Featured crops section
- Farmer Profiles & Management
- Order Processing
- Secure Payments Integration
- Admin Dashboard
- Mobile Responsive Design
- Frontend: React 18 with TypeScript
- Styling: TailwindCSS 3
- Backend: Supabase
- State Management: Zustand
- Form Handling: React Hook Form
- Validation: Yup
- API Client: Axios & React Query
- Routing: React Router DOM
- Testing: Vitest
- Notifications: React Hot Toast
-
Clone the repository:
git clone https://github.com/mbarrie71/qfarm.git cd qfarm
-
Install dependencies:
npm install
-
Set up environment variables: Create a
.env
file in the root directory:VITE_SUPABASE_URL=your_supabase_url VITE_SUPABASE_ANON_KEY=your_supabase_anon_key
-
Start the development server:
npm run dev
src/
├── components/ # Reusable UI components
│ ├── AdvancedFilter/
│ ├── CropGrid/
│ ├── FeaturedCrops/
│ └── Footer/
├── features/ # Feature-specific components
│ ├── auth/
│ ├── marketplace/
│ └── profile/
├── hooks/ # Custom React hooks
├── lib/ # Third-party configurations
├── pages/ # Page components
├── services/ # API integrations
├── store/ # Global state
├── types/ # TypeScript types
└── utils/ # Utility functions
-
Fork the repository to your GitHub account
-
Connect your GitHub repository to Netlify:
- Log in to Netlify
- Click "New site from Git"
- Choose your repository
- Configure build settings:
- Build command:
npm run build
- Publish directory:
dist
- Node version: 18
- Build command:
-
Set up environment variables in Netlify:
- Go to Site settings > Build & deploy > Environment
- Add the required environment variables:
VITE_SUPABASE_URL VITE_SUPABASE_ANON_KEY
-
Deploy:
- Netlify will automatically deploy your site
- Any push to the main branch will trigger a new deployment
-
Build the project:
npm run build
-
Test the production build locally:
npm run preview
-
Deploy the
dist
directory to your hosting provider
npm run dev
- Start development servernpm run build
- Build for productionnpm run preview
- Preview production buildnpm run test
- Run testsnpm run lint
- Lint codenpm run format
- Format code
- ESLint for code linting
- Prettier for code formatting
- TypeScript for type safety
- Vitest for testing
- Developer: Mohamed Barrie
- Email: [Your Email]
- Phone: +232 99 715 857
- Location: Kamakwie Town, Sierra Leone
This project is part of the KNESST Qcell Challenge. All rights reserved.