Google Summer of Code 2021 Work Product Submission


Prashant Dodiya

I am a pre-final year student (expected graduation month - May 2023) studying Electronics and Communication Engineering at Sardar Vallabhbhai National Institute of Technology, Surat, India. I have participated in GSoC’21 with WeField e.V. under the umbrealla of coala Association e.V. open-source organization. My project, Microfarm For Everybody (Django-Microfarm), aims to create a tool that allows anyone to become a market gardener, given some space. As a first step, a user will merely sign up and enter the amount of space that they wants to use. The system will then trigger tasks the user has to do to farm on his space efficiently. Those tasks are triggered by simple rules and may depend on weather events, date, and later also other triggers. Thus, anyone can be a market gardener, and this tool will be beneficial and easy to use.

Patches Tarball



Phase 1

Phase 2

Links to commits and repositories I've worked on:

Repository Link to Commit/s Description
G  GSoC/GSoC-2021 View

Business Model Canvas of Django Micorfarm

G  GSoC/GSoC-2021 View

Deciding project requirements and database handling

G  GSoC/GSoC-2021 View

Create Wireframe of the application

d  django-microfarm View Add Django Microfarm Proposal

d  django-microfarm View

Add django-microfarm setup

d  django-microfarm View Setup environment variables and test-requirements

d  django-microfarm View

gitlab-ci.yml: Add CI for black linter

d  django-microfarm View

Add User Authentication System

d  django-microfarm View

Add market-garden schemas

d  django-microfarm View

Add market-garden cropmap script

d  django-microfarm View

Add watering script using Weather and Forecast API

d  django-microfarm View

Implement watering tasks

d  django-microfarm View

Create Section and Bed objects

d  django-microfarm View

Create todo tasks objects

d  django-microfarm View

Create all the endpoints for the Application

d  django-microfarm View

Implement APIs Documentation

d  django-microfarm View

Creating single migration file for each model

Microfarm For Everybody

Work Done

  1. Designed Business Model Canvas
  2. Created Wireframe for the application
  3. Project setup and CI for black linter
  4. Setted up a User Authentication System
  5. Implemented database and schemas
  6. Implemented script to calculate the crop map and compost required
  7. Implemented weather and forecast API and script to check if watering is required or not?
  8. Implemented watering tasks
  9. Implemented daily tasks
  10. Setted up django-signals and celery to automatically create objects such Section and Bed objects, periodic tasks and todo objects.
  11. Implemented Todo task objects.
  12. Implemented APIs fetching the details, rules and tasks of the currently logged in user.
  13. Added APIs documentation using drf-yasg


The biggest challenge was writing the codebase from scratch such that it can become the strong foundation of the application in the future. It took time to design the project structure and deciding on the schemas of database. I learnt a lot during the journey, so learning new things also consumed time. The hurdles were:

  1. Designing the database and setting up JWT(Json Web Token) Authentication and Social Authentication.
  2. Writing the script calculating all the Cropmap parameters which should work in all the cases.
  3. Deciding on Watering Rules and writing the script that will check if we need to water our garden or not, on the basis of the rules.
  4. Setting up periodic tasks to check hourly weather to update the time when the garden was watered by the rain.
  5. Using django-signals, to automatically create objects and run scripts. For e.g., on saving a Market-Garden, a function to calculate cropmap and to create sections and beds objects should be executed.
  6. Implementing celery, to queue up these tasks and also to implement periodic tasks.
  7. Creating a task objects, such that it holds the status of the task to be done and its details.
  8. Automatic creation of all the tasks related to the Market-Garden and get the list of ToDo for the day.
  9. Creating APIs of the application and setting the permission such that every API return the objects that are owned by the user and if objects are public then they can only view the object.
  10. Fetching user details from the JWT Access token by decoding it.

Work left to be done

Unit tests for the models and functions, deployment of the application and some improvised documentation are required to be done.