Skip to content
G

Gram Vikas

Gram Vikas Agricultural Marketplace Platform

Created on 17th January 2026

•

G

Gram Vikas

Gram Vikas Agricultural Marketplace Platform

The problem Gram Vikas solves

Project Overview
Gram Vikas is a comprehensive agricultural marketplace platform designed to bridge the gap between rural farmers and urban buyers. The platform provides real-time analytics, multi-role dashboards, and innovative features tailored for agricultural communities in India.

Key Features

  • Agricultural Marketplace

    Product Listings: Farmers can list agricultural products with detailed descriptions
    Bidding System: Real-time auction system for fair price discovery
    Search & Filter: Advanced product search with categories and filters
    Order Management: Complete order processing workflow
    Payment Integration: Secure Razorpay payment gateway

  • Multi-Role User Management

    Buyer Dashboard: Purchase analytics, order tracking, spending patterns
    Farmer Dashboard: Sales analytics, listing management, revenue tracking
    Admin Dashboard: Platform-wide analytics, user management, system monitoring
    Hub Operator Dashboard: Hub-specific analytics, logistics management
    SHG Leader Dashboard: Group analytics, member management, collective sales

  • Real-time Analytics

    Live Charts: 4 chart types (line, bar, pie) updating every 5 seconds
    User Growth Tracking: Monthly user registration trends
    Transaction Volume: Real-time transaction monitoring
    Revenue Analytics: Category-wise revenue breakdown
    User Distribution: Role-based user analytics

  • Rural Technology Integration

    USSD Support: Mobile USSD integration for feature phones
    OTP Authentication: SMS-based verification for rural users
    Offline Capability: Designed for low-connectivity areas
    Multi-language Support: Hindi and English interface

Challenges I ran into

1. CORS Configuration Issues

  • Challenge: React (localhost:3000/5173) and Django (localhost:8000) cross-origin requests
  • Solution: Added multiple allowed origins in settings.py and set CORS_ALLOW_ALL_ORIGINS = True for development
  • Evidence: Multiple ports listed (3000, 3001, 3002, 5173) in CORS_ALLOWED_ORIGINS

2. JWT Token Authentication & Refresh Flow

  • Challenge: Auto-refresh expired tokens without disrupting user flow
  • Solution: Axios interceptors in api.ts to:
    • Attach tokens to requests
    • Catch 401 errors
    • Refresh and retry original request
    • Redirect to login on refresh failure
  • Complexity: Preventing refresh loops with _retry flag

3. Frontend-Backend Integration

  • Challenge: Connecting React TypeScript frontend to Django REST API
  • Issues:
    • Different ports and protocols
    • Type mismatches (TypeScript vs Python types)
    • Async/await handling for API calls
    • State management across components

4. Offline-First Data Synchronization

  • Challenge: Sync data for rural areas with unreliable connectivity
  • Issues:
    • Timezone parsing (timezone.datetime.fromisoformat() with 'Z' format)
    • Role-based data filtering (COWORKER vs DOCTOR vs ADMIN)
    • Incremental sync with last_sync timestamps
    • Conflict resolution when uploading offline data
  • Note: Upload endpoint is a placeholder

5. Role-Based Access Control (RBAC)

  • Challenge: Permissions by user role
  • Implementation:
    • Custom User model with role field
    • Different data access per role
    • Filtering patients/vitals/consultations by role
  • Complexity: Ensuring users only see/modify permitted data

6. Database Migrations & Setup

  • Challenge: Setting up database on Windows with SQLite
  • Issues:
    • Migration conflicts
    • Database locking errors
    • Custom User model requiring early migration order
    • Switching between SQLite (dev) and PostgreSQL (production)

7. Windows-Specific Setup Challenges

  • Challenge: Windows environment setup
  • Issues:
    • Virtual environment activation (venv\Scripts\activate)
    • Path separators in batch files
    • Port conflicts (multiple processes on 8000/3000)
    • Node modules installation issues
  • Solution: Multiple batch scripts for setup/startup

8. Port Conflicts

  • Challenge: Ports 8000 (backend) and 3000 (frontend) already in use
  • Solutions:
    • Multiple fallback ports configured (3001, 3002, 5173)
    • Instructions to change ports in README
    • Development server port configuration

9. TypeScript Integration with React

  • Challenge: Type safety with API responses
  • Issues:
    • No explicit API response types
    • Type inference challenges with Axios
    • Ensuring component props match API data structures

10. Error Handling & User Feedback

  • Challenge: Clear user feedback for API errors
  • Implementation:
    • Token refresh retry logic
    • 401 handling with redirect to login
    • CORS error handling
    • Network error handling for offline scenarios

11. Timezone Handling in Sync Views

  • Challenge: Converting ISO datetime strings with timezone info
  • Issue: Parsing last_sync parameter with 'Z' (UTC) notation
  • Solution: timezone.datetime.fromisoformat(last_sync.replace('Z', '+00:00'))
  • Complexity: Handling multiple timezone formats

12. BMI Calculation Logic

  • Challenge: Calculating BMI from weight (kg) and height (cm)
  • Implementation: Converting cm to meters in property method
  • Edge Case: Division by zero if height is 0

13. Multiple Build Tools & Configuration

  • Challenge: Vite for frontend, Django for backend
  • Issues:
    • Different development servers
    • Configuration synchronization
    • Hot reload coordination

14. Authentication State Management

  • Challenge: Persisting auth state across page refreshes
  • Solution: localStorage for tokens
  • Concern: Security implications of client-side token storage

15. Dependency Management

  • Challenge: Managing Python and Node.js dependencies
  • Issues:
    • Version conflicts
    • Virtual environment isolation
    • Package lock file synchronization
    • Windows-specific package installation issues

16. Offline Data Upload Implementation

  • Challenge: Bulk upload of offline-recorded data
  • Current Status: Placeholder implementation in sync/views.py
  • Complexity: Conflict resolution, duplicate detection, transaction handling

17. Production vs Development Configuration

  • Challenge: Different settings for dev and production
  • Configuration:
    • DEBUG mode toggle
    • Database switching (SQLite → PostgreSQL)
    • CORS settings (permissive vs restricted)
    • Secret key security

18. Component State Synchronization

  • Challenge: Keeping UI in sync with API data
  • Issues:

Tracks Applied (2)

Software Development

Architecture and practices Full-stack development Backend: Django 4.2.7 with Django REST Framework Frontend: React 18 w...Read More

AI

Rule-based symptom analysis The medical-symptom-checker-master uses a pattern-matching algorithm that: Matches user sym...Read More

Discussion

Builders also viewed

See more projects on Devfolio