Skip to content

abrahman90/agroconnect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 

Repository files navigation

AgriConnect Flutter App

This Flutter app connects to a Django REST API backend with PostgreSQL database.

Setup

  1. Install Dependencies

    flutter pub get
  2. Configure API Base URL

    • Update lib/config/api_config.dart
    • Change baseUrl to your Django backend URL
    • Example: http://your-domain.com/api or http://localhost:8000/api
  3. Run the App

    flutter run

Project Structure

lib/
├── config/           # API configuration
├── models/           # Data models
├── services/         # API service classes
├── providers/        # State management providers
├── screens/          # UI screens
└── main.dart         # App entry point

Features

Authentication

  • User registration and login
  • JWT token-based authentication
  • Password reset functionality
  • Profile management

Farm Management

  • Create and manage farms
  • Upload farm documents
  • Track farm statistics
  • Location-based farm search

Crop Management

  • Track crop planting and growth
  • Log farming activities
  • Disease detection integration
  • Crop analytics and insights

Marketplace

  • Browse and search products
  • Create product listings (vendors)
  • Product reviews and ratings
  • Location-based product search

Learning Center

  • Course enrollment and progress tracking
  • Educational content management

Community Forum

  • Discussion posts and comments
  • Community interaction features

API Integration

The app uses the following services:

  • ApiService: Core HTTP client with JWT authentication
  • AuthService: Authentication operations
  • FarmService: Farm management operations
  • CropService: Crop management operations
  • ProductService: Product marketplace operations

State Management

Uses Provider pattern for state management:

  • AuthProvider: User authentication state
  • FarmProvider: Farm data and operations
  • CropProvider: Crop data and operations
  • ProductProvider: Product data and operations

Backend Requirements

  • Django REST Framework
  • PostgreSQL database
  • JWT authentication
  • File upload support
  • CORS enabled for Flutter app

Development

  1. Backend Setup

    • Set up Django backend with PostgreSQL
    • Configure API endpoints
    • Set up authentication
  2. Flutter Development

    • Update API configuration
    • Test API integration
    • Implement UI screens

Deployment

  1. Backend Deployment

    • Deploy Django app to server
    • Configure PostgreSQL database
    • Set up environment variables
  2. Flutter Deployment

    • Update API base URL for production
    • Build and deploy Flutter app
    • Test end-to-end functionality

AgriConnect Screen Architecture

This document outlines the comprehensive screen architecture for all user roles in the AgriConnect application.

User Roles and Their Functionalities

1. Farmer

Primary Functions:

  • Farm management and monitoring
  • Crop tracking and management
  • Disease detection and treatment
  • Weather monitoring and alerts
  • Learning and courses
  • Community forum participation
  • Selling products

Key Screens:

  • Dashboard with farm overview
  • Farm management (add, edit, view farms)
  • Crop management (planting, growth tracking, harvesting)
  • Disease detection camera
  • Weather forecast and alerts
  • Learning center and courses
  • Community forum
  • Product listing and selling
  • Orders and sales management

2. Vendor

Primary Functions:

  • Product catalog management
  • Order processing and fulfillment
  • Inventory management
  • Customer communication
  • Sales analytics and reporting

Key Screens:

  • Dashboard with sales overview
  • Product catalog management
  • Order processing and tracking
  • Inventory management
  • Customer management
  • Sales analytics and reports
  • Profile and business settings

3. Admin

Primary Functions:

  • Platform management and oversight
  • User management and verification
  • Content moderation
  • Analytics and reporting
  • System configuration
  • Support and help desk

Key Screens:

  • Admin dashboard with platform overview
  • User management (farmers, vendors, buyers)
  • Content moderation (forum, products, courses)
  • Analytics and reporting
  • System settings and configuration
  • Support tickets and help desk
  • Verification and approval workflows

4. Buyer

Primary Functions:

  • Browse and search products
  • Place orders and make payments
  • Track orders and deliveries
  • Rate and review products
  • Manage favorites and wishlist
  • Customer support

Key Screens:

  • Product browsing and search
  • Product details and reviews
  • Shopping cart and checkout
  • Order tracking and history
  • Payment and billing
  • Favorites and wishlist
  • Customer support and help

Screen Structure

lib/screens/
├── auth/                    # Authentication screens
│   ├── login_screen.dart
│   ├── register_screen.dart
│   ├── forgot_password_screen.dart
│   └── verify_email_screen.dart
├── farmer/                  # Farmer-specific screens
│   ├── dashboard/
│   │   ├── farmer_dashboard.dart
│   │   └── farm_overview_card.dart
│   ├── farms/
│   │   ├── farms_list_screen.dart
│   │   ├── add_farm_screen.dart
│   │   ├── farm_details_screen.dart
│   │   └── edit_farm_screen.dart
│   ├── crops/
│   │   ├── crops_list_screen.dart
│   │   ├── add_crop_screen.dart
│   │   ├── crop_details_screen.dart
│   │   ├── crop_activities_screen.dart
│   │   └── harvest_screen.dart
│   ├── disease_detection/
│   │   ├── disease_detection_screen.dart
│   │   ├── camera_screen.dart
│   │   └── detection_results_screen.dart
│   ├── weather/
│   │   ├── weather_dashboard.dart
│   │   ├── weather_forecast_screen.dart
│   │   └── weather_alerts_screen.dart
│   ├── learning/
│   │   ├── learning_dashboard.dart
│   │   ├── courses_list_screen.dart
│   │   ├── course_details_screen.dart
│   │   └── my_progress_screen.dart
│   ├── forum/
│   │   ├── forum_home_screen.dart
│   │   ├── create_post_screen.dart
│   │   ├── post_details_screen.dart
│   │   └── my_posts_screen.dart
│   ├── products/
│   │   ├── my_products_screen.dart
│   │   ├── add_product_screen.dart
│   │   ├── edit_product_screen.dart
│   │   └── product_analytics_screen.dart
│   └── sales/
│       ├── sales_dashboard.dart
│       ├── orders_received_screen.dart
│       ├── order_details_screen.dart
│       └── sales_analytics_screen.dart
├── vendor/                  # Vendor-specific screens
│   ├── dashboard/
│   │   ├── vendor_dashboard.dart
│   │   └── sales_overview_card.dart
│   ├── products/
│   │   ├── product_catalog_screen.dart
│   │   ├── add_product_screen.dart
│   │   ├── edit_product_screen.dart
│   │   ├── product_analytics_screen.dart
│   │   └── inventory_management_screen.dart
│   ├── orders/
│   │   ├── orders_dashboard.dart
│   │   ├── pending_orders_screen.dart
│   │   ├── processing_orders_screen.dart
│   │   ├── order_details_screen.dart
│   │   └── order_fulfillment_screen.dart
│   ├── customers/
│   │   ├── customers_list_screen.dart
│   │   ├── customer_details_screen.dart
│   │   └── customer_communication_screen.dart
│   ├── analytics/
│   │   ├── sales_analytics_screen.dart
│   │   ├── product_performance_screen.dart
│   │   └── customer_analytics_screen.dart
│   └── settings/
│       ├── vendor_profile_screen.dart
│       ├── business_settings_screen.dart
│       └── payment_settings_screen.dart
├── admin/                   # Admin-specific screens
│   ├── dashboard/
│   │   ├── admin_dashboard.dart
│   │   └── platform_overview_card.dart
│   ├── users/
│   │   ├── users_management_screen.dart
│   │   ├── farmers_management_screen.dart
│   │   ├── vendors_management_screen.dart
│   │   ├── buyers_management_screen.dart
│   │   ├── user_details_screen.dart
│   │   └── user_verification_screen.dart
│   ├── content/
│   │   ├── content_moderation_screen.dart
│   │   ├── forum_moderation_screen.dart
│   │   ├── product_moderation_screen.dart
│   │   ├── course_moderation_screen.dart
│   │   └── reported_content_screen.dart
│   ├── analytics/
│   │   ├── platform_analytics_screen.dart
│   │   ├── user_analytics_screen.dart
│   │   ├── sales_analytics_screen.dart
│   │   └── engagement_analytics_screen.dart
│   ├── settings/
│   │   ├── system_settings_screen.dart
│   │   ├── feature_flags_screen.dart
│   │   └── notification_settings_screen.dart
│   └── support/
│       ├── support_dashboard.dart
│       ├── support_tickets_screen.dart
│       ├── ticket_details_screen.dart
│       └── help_desk_screen.dart
├── buyer/                   # Buyer-specific screens
│   ├── dashboard/
│   │   ├── buyer_dashboard.dart
│   │   └── featured_products_card.dart
│   ├── products/
│   │   ├── products_browse_screen.dart
│   │   ├── product_search_screen.dart
│   │   ├── product_details_screen.dart
│   │   ├── product_reviews_screen.dart
│   │   └── category_products_screen.dart
│   ├── cart/
│   │   ├── shopping_cart_screen.dart
│   │   ├── checkout_screen.dart
│   │   └── payment_screen.dart
│   ├── orders/
│   │   ├── my_orders_screen.dart
│   │   ├── order_details_screen.dart
│   │   ├── order_tracking_screen.dart
│   │   └── order_history_screen.dart
│   ├── favorites/
│   │   ├── favorites_screen.dart
│   │   ├── wishlist_screen.dart
│   │   └── recently_viewed_screen.dart
│   ├── profile/
│   │   ├── buyer_profile_screen.dart
│   │   ├── address_management_screen.dart
│   │   └── payment_methods_screen.dart
│   └── support/
│       ├── customer_support_screen.dart
│       ├── help_center_screen.dart
│       └── contact_us_screen.dart
├── shared/                  # Shared screens across user roles
│   ├── profile/
│   │   ├── profile_screen.dart
│   │   ├── edit_profile_screen.dart
│   │   ├── settings_screen.dart
│   │   └── notifications_settings_screen.dart
│   ├── notifications/
│   │   ├── notifications_screen.dart
│   │   └── notification_details_screen.dart
│   ├── help/
│   │   ├── help_center_screen.dart
│   │   ├── faq_screen.dart
│   │   ├── contact_support_screen.dart
│   │   └── about_screen.dart
│   ├── search/
│   │   ├── global_search_screen.dart
│   │   └── search_results_screen.dart
│   └── common/
│       ├── loading_screen.dart
│       ├── error_screen.dart
│       ├── empty_state_screen.dart
│       └── confirmation_dialog.dart
├── home/                    # Home screens
│   ├── home_screen.dart
│   └── welcome_screen.dart
└── splash_screen.dart       # Splash screen

Navigation Structure

Farmer Navigation

  • Dashboard (Farm Overview)
  • Farms Management
  • Crops Management
  • Disease Detection
  • Weather
  • Learning
  • Forum
  • My Products
  • Sales
  • Profile

Vendor Navigation

  • Dashboard (Sales Overview)
  • Product Catalog
  • Orders Management
  • Customers
  • Analytics
  • Settings
  • Profile

Admin Navigation

  • Dashboard (Platform Overview)
  • User Management
  • Content Moderation
  • Analytics
  • System Settings
  • Support
  • Profile

Buyer Navigation

  • Dashboard (Featured Products)
  • Browse Products
  • Shopping Cart
  • My Orders
  • Favorites
  • Profile
  • Support

Key Features by User Role

Farmer Features

  • Farm registration and management
  • Crop planting and tracking
  • Disease detection with AI
  • Weather monitoring and alerts
  • Educational content and courses
  • Community forum participation
  • Product listing and selling
  • Sales analytics

Vendor Features

  • Product catalog management
  • Order processing and fulfillment
  • Inventory tracking
  • Customer relationship management
  • Sales performance analytics
  • Business profile management
  • Payment and billing

Admin Features

  • Platform oversight and management
  • User verification and approval
  • Content moderation and quality control
  • System analytics and reporting
  • Feature flag management
  • Support ticket management
  • Platform configuration

Buyer Features

  • Product discovery and search
  • Shopping cart and checkout
  • Order tracking and history
  • Product reviews and ratings
  • Favorites and wishlist
  • Customer support
  • Payment management

Implementation Priority

  1. Phase 1: Core authentication and basic screens
  2. Phase 2: Farmer functionality (farms, crops, disease detection)
  3. Phase 3: Vendor functionality (products, orders, analytics)
  4. Phase 4: Buyer functionality (shopping, orders, reviews)
  5. Phase 5: Admin functionality (management, moderation, analytics)
  6. Phase 6: Advanced features and optimizations

This architecture ensures that each user role has a tailored experience with screens and functionality specific to their needs while maintaining consistency in design and user experience across the platform.

About

AgriConnect - Connecting farmers, vendors, and buyers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors