# Yara Ghana App
A comprehensive Flutter application for an agricultural products marketplace with Firebase integration.
## Features
### Core Functionality
- **User Authentication**: Login, signup, and logout with Firebase Auth
- **Role-based Access**: Admin vs regular user permissions
- **Product Catalog**: Browse products with categories, search, and filtering
- **Shopping Cart**: Add/remove items with quantity management
- **Order Management**: Place orders and track order history
- **Admin Panel**: Product and order management for administrators
### Technical Features
- Clean Architecture with Provider state management
- Firebase Authentication with email/password
- Firestore for data storage
- Firebase Storage for image uploads
- Responsive Material Design UI
- Error handling and loading states
## Firebase Setup
### Required Firebase Configuration
Before running the app, you need to set up Firebase:
1. **Create a Firebase Project**:
- Go to Firebase Console
- Create a new project
- Enable Authentication, Firestore, and Storage
2. **Configure Authentication**:
- Enable Email/Password authentication in Firebase Console
- Go to Authentication > Sign-in method > Email/Password > Enable
3. **Set up Firestore**:
- Create a Firestore database
- Set up the following collections:
- `users`
- `products`
- `categories`
- `orders`
- `carts`
4. **Configure Firebase for Flutter**:
- Install Firebase CLI: `npm install -g firebase-tools`
- Install FlutterFire CLI: `dart pub global activate flutterfire_cli`
- Run: `flutterfire configure`
- Replace the placeholder values in `lib/firebase_options.dart` with your actual Firebase configuration
5. **Security Rules** (Firestore):
```javascript
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
// Users can read/write their own user document
match /users/{userId} {
allow read, write: if request.auth != null && request.auth.uid == userId;
}
// Products are readable by all, writable by ad …