Skip to content

The backend API supports Mandai by enabling real-time pricing, secure data management, and seamless market connectivity for farmers, vendors, and restaurants.

Notifications You must be signed in to change notification settings

yogesh-bhandare/mandai-backend-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mandai Backend

A Django-based web scraping application for commodity prices with vendor and market management.

Features

  • Automated web scraping of commodity prices using Selenium
  • Scheduled scraping tasks with Celery
  • CRUD operations for vendors and markets
  • Data persistence with Django ORM
  • API endpoints for data access
  • Redis integration for task queue management

Tech Stack

  • Django
  • Celery
  • Redis
  • Selenium
  • Docker

Prerequisites

  • Python 3.8+
  • Redis Instance

Setup & Installation

  1. Clone the repository
git clone https://github.com/yogesh-bhandare/mandai-backend-api.git
cd mandai-backend-api
  1. Create virtual environment For MacOS/Linux/Windows::
python3 -m venv venv
source venv/bin/activate
python -m venv venv
.\venv\Scripts\activate
  1. Install dependencies
pip install --upgrade pip
pip install -r requirements.txt
  1. Redis Setup Using Docker: This will start Redis on redis://localhost:6170
docker compose -f compose.yaml up -d
  1. Environment Configuration Create .env in project root:
CELERY_BROKER_REDIS_URL="redis://localhost:6170"
DEBUG=True
  1. Database Setup
python manage.py migrate
  1. Start Services In separate terminals:
# Terminal 1: Django Server
python manage.py runserver

# Terminal 2: Celery Worker & Beat
celery -A mandai worker --beat

About

The backend API supports Mandai by enabling real-time pricing, secure data management, and seamless market connectivity for farmers, vendors, and restaurants.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published