a2i-code-For-Govstack / sp-service-solutions-api

0 stars 6 forks source link

[DMP 2024]: Survey and Polling( Django Implementation) - Backend API #3

Open Sanchay-T opened 5 months ago

Sanchay-T commented 5 months ago

Ticket Contents

Description

The Sp Polling Backend feature is aimed at enhancing the functionality of the Sp Polling application within the healthcare domain. This feature will streamline the authentication processes for both creators and users, introduce a forms builder, and establish critical endpoints necessary for the application's operation. The overall objective is to improve user experience and ensure secure, efficient data handling.

Goals & Mid-Point Milestone

Month 1:

Setup/Installation

No response

Expected Outcome

No response

Acceptance Criteria

No response

Implementation Details

Mockups/Wireframes

No response

Product Name

Sp Polling Backend

Organisation Name

a2i (aspire to innovate)

Domain

⁠Healthcare

Tech Skills Needed

Django, Python, React

Mentor(s)

@Sanchay-T

Category

API

dvjsharma commented 5 months ago

Weekly Learnings & Updates

Week 1

Week 2

image

Week 3

Note: This code can be found in config project at project/config

Note: All of these endpoints and their corresponding functionalities can be found in core app at project/core.

Week 4

image

image

Note: All of these endpoints and their corresponding functionalities can be found in live app at project/live.

Week 5

Below is the form structure:

{
    "title": "General Survey ",
    "createdAt": 1720720166108,
    "fields": [
        {
            "title": "Enter your email",
            "type": "short-text",
            "required": true
        },
        {
            "title": "Enter your name",
            "required": true,
            "type": "short-text"
        },
        {
            "title": "Tell something about you",
            "required": false,
            "type": "long-text"
        },
        {
            "title": "Enter your mobile no",
            "required": false,
            "type": "number"
        },
        {
            "title": "You like cat?",
            "required": true,
            "options": [
                "yes",
                "no"
            ],
            "type": "multioption-singleanswer"
        },
        {
            "title": "Um can't decide",
            "required": true,
            "options": [
                "you decide",
                "opt a",
                "none"
            ],
            "type": "multioption-multianswer"
        },
        {
            "title": "Upload an emoji",
            "required": true,
            "type": "file",
            "accepted": [
                "jpg",
                "png"
            ]
        }
    ],
    "endMessage": "thanks for nothing",
}

The database internally breaks every form into skeleton and fields, each of them completely modular.

Note: All of these endpoints and their corresponding functionalities can be found in data app at project/data.

Week 6

Below is the form response structure:

{
    "answers": [
        {
            "id": "16",
            "value": "hackme@gmail.com"
        },
        {
            "id": "17",
            "value": "yea its password"
        }
    ]
}

Note: For type 2 and 3 (when form is not open to all), we can also track who voted, there is a user field which is populated when any social user votes and their status turns to voted. Also, the responses only support view and delete operations to stop any kind of tampering.

Note: All of these endpoints and their corresponding functionalities can be found in data app at project/data.

Week 7

Week 8

Week 9

Week 10

Week 11

Week 12

Sanchay-T commented 4 months ago

Weekly Goals

Week 1

Week 2

Week 3

Week 4

Week 5

Week 6

Week 7

Week 8

Week 9

Week 10

Week 11

Week 12