DPDP Vighna Harta For CAs
AI & Accounting

DPDP Vighna Harta For CAs

Author : CA Siddharth Agrawal

Watch on Youtube

DPDP Vighna Harta

A Data Principal rights and grievance redressal tool for one business at a time. It gives individuals a working way to exercise their rights, and gives the Grievance Officer one place to handle every case and prove afterwards what was done and when.

Built by CA Siddharth Agrawal. "Vighna Harta" means remover of obstacles.

1. The problem

Every Data Fiduciary must give individuals a way to exercise their rights and raise grievances, and must publish who will answer and within what time. Most small and mid-sized businesses have no system for this. Requests arrive by email or phone, get lost, and nothing shows afterwards what was done.

ProvisionWhat the tool does for it

Section 11Request for a summary of personal data and processing activities
Section 12Correction, completion, updating and erasure requests
Section 13Grievance redressal, with the route to the Data Protection Board
Section 14Nomination of another individual, and its revocation
Section 9 / Rule 10, 11Guardian acting for a child or a person with disability, verified by the officer
Section 8(5)Security safeguards: encryption, hashed passwords, lockout, local-only binding
Section 8(7)Retention review and erasure once the purpose is over
Section 8(9), 8(10) / Rule 9, 14Grievance Officer contact and response timelines shown before login


2. Who uses it

Data Principal

An ordinary individual, or a parent or lawful guardian. Uses the Data Principal Portal, or simply writes, calls or walks in.

Grievance Officer

One person on the business side who handles the cases, sets the policy and answers for the records. Uses the Grievance Officer Console.

3. Technology deployed

LayerTechnologyRole

LanguagePython 3.12All logic and screens, so the owner can read and maintain it
ScreensFlet 1.0 in web mode (flet-web)Two browser apps: portal on port 8551, console on port 8550
DatabasePostgreSQL 16One database shared by both apps; base schema plus migrations 002 to 021
DB driverpsycopg2 with a connection poolTLS connection to the database (sslmode=require)
PasswordsbcryptPasswords stored only as hashes; login lockout after 5 wrong attempts for 15 minutes
Field encryptioncryptography (Fernet)Date of birth and guardian details encrypted before storage
Audit trailSeparate Postgres role dpdp_log_appenderCan only insert into the audit and notification logs; the database refuses edits and deletes
EmailSMTP with STARTTLS (Gmail app password)Every notification to the Data Principal and the officer
SchedulerBackground thread in the console containerRechecks deadlines every 300 seconds even when nobody has the tool open
PackagingDocker and Docker ComposeThree containers started with one command on Windows
Secrets.env file via python-dotenvNo password or key in code; Compose refuses to start if one is missing

How the pieces fit

Data Principal (browser)Grievance Officer (browser)

         |                                         |

[optional HTTPS: Caddy / Cloudflare]        this PC only

         |                                         |

+-------------------++---------------------+

| principal :8551 |                  | fiduciary :8550|

| Flet web portal  |                  | Flet web console   |

+-------------------+| + deadline scheduler|

         |+---------------------+

         |       shared Python modules (app/shared)      |

         |auth / rights / sla / notifications / audit   |

         |retention / register / field_crypto           |

+-----------------------+-------------------------+

                                 | TLS

+-------------------+       SMTP

                       | db: PostgreSQL 16 | ---> email to

                       | not published    |Data Principal

+-------------------+      and officer


Both apps answer on 127.0.0.1 only by default. The console and the database are never routed to the internet.

4. How a case moves, step by step

Step 1.Officer sets the policy

In Rule 14 Config the officer records name, designation, email and phone, and the three timelines: acknowledgement 48 hours, target response 30 days, absolute maximum 90 days. The tool refuses a maximum above the legal ceiling.

Step 2.Data Principal sees who will answer, before logging in

The portal's first screen shows the Grievance Officer's contact and the response time.

Step 3.Registration

Name, email or mobile, date of birth and a password. A unique reference ID is issued. If the date of birth shows a child, the guardian's name and relationship are captured, and the guardian emails the supporting document quoting the reference ID. The tool takes no file uploads.

Step 4.Officer verifies the person

The account cannot be used until the officer approves it. For a child's account the officer must record what was checked, from a fixed list, with a note.

Step 5.Data Principal raises a request or grievance

Four actions on the portal: Section 11 Access Data, Section 12 Correction, Section 14 Nominee, Section 13 Raise a Grievance. A grievance may be about one of their own requests or about any other act of the business. Only one open grievance per request.

Step 6.Requests that arrive by email, post, phone or in person

The officer logs them under Log Email / Offline Request with the channel, date of receipt, a reference to the original and how identity was confirmed. The deadline runs from the date of receipt and an acknowledgement is emailed on saving.

Step 7.The clock runs

Each case shows as on track, due soon, overdue or breached. The officer is emailed before the target date and again when the maximum is crossed. A request still unacknowledged at the end of the acknowledgement period is marked acknowledged and the Data Principal is emailed. That is the only step the tool takes by itself.

Step 8.Officer decides, always with written reasons

A Section 11 request closes only with three answers: the data processed, the processing activities, and who it was shared with. An approved Section 12 correction is applied to name, email or mobile, then closed. Erasure is never automatic. Guardian-filed requests wait in their own queue until the guardian is verified.

Step 9.Data Principal is told at every stage

Emails go out for registration received, account activated or declined, request or grievance received, acknowledged, guardian verified, resolved or rejected with reasons, and erasure. Each carries the officer's contact and the Section 13 route to the Data Protection Board. The portal's Request Register and Grievance Register show the same status.

Step 10.Everything is recorded

Every action is written to the audit register with who did it and when. It cannot be edited or deleted from the tool, even by the officer. The officer can view it newest first and export it as CSV.

Step 11.Retention and erasure

Closed cases come up for retention review. Before a closed record is permanently deleted, what it said and how it was answered is copied into the audit record, without guardian details. A Data Principal's account can be anonymised only when every case of theirs is closed.


5. Screens

Data Principal Portal (localhost:8551)

Portal login. The Grievance Officer's contact and the 30 day / 90 day response commitment appear below the login card, before any login.

Portal login. The Grievance Officer's contact and the 30 day / 90 day response commitment appear below the login card, before any login.

Registration. Only the fields the tool needs: name, email, mobile, date of birth and a password.

Registration. Only the fields the tool needs: name, email, mobile, date of birth and a password.

Portal dashboard after login: officer notice, counts, the four rights buttons, and the Request Register with the action taken and its explanation.

Portal dashboard after login: officer notice, counts, the four rights buttons, and the Request Register with the action taken and its explanation.

Section 11: request a summary of personal data and processing activities. A guardian ticks the box to file for a child or a person with disability.

Section 11: request a summary of personal data and processing activities. A guardian ticks the box to file for a child or a person with disability.

Section 12: correction, completion, updating or erasure.

Section 12: correction, completion, updating or erasure.

Section 14: nominate an individual. Existing nominees are listed below the form and can be revoked.

Section 14: nominate an individual. Existing nominees are listed below the form and can be revoked.

Section 13: raise a grievance. The officer's contact and response time are repeated on the form.

Section 13: raise a grievance. The officer's contact and response time are repeated on the form.

Grievance Officer Console (localhost:8550)

Console sign-in. Reachable from this computer only.

Console sign-in. Reachable from this computer only.

Case Dashboard: counts for open, due soon, overdue, breached, resolved, rejected and open grievances, with filters by type, deadline status and outcome.

Case Dashboard: counts for open, due soon, overdue, breached, resolved, rejected and open grievances, with filters by type, deadline status and outcome.

Case detail: the request, internal notes, the resolution note, and the audit history of that case.

Case detail: the request, internal notes, the resolution note, and the audit history of that case.

Log Email / Offline Request: what arrived, how and when, a reference to the original, and how identity was confirmed.

Log Email / Offline Request: what arrived, how and when, a reference to the original, and how identity was confirmed.

Guardian Requests (Section 9 / Rule 11): requests filed by a guardian wait here until the officer verifies the guardian.

Guardian Requests (Section 9 / Rule 11): requests filed by a guardian wait here until the officer verifies the guardian.

Grievances (Section 13): the grievance queue.

Grievances (Section 13): the grievance queue.

Processing Activity Register: purpose, data categories, children, persons with disability, legal basis, processors, cross-border transfer and retention.

Processing Activity Register: purpose, data categories, children, persons with disability, legal basis, processors, cross-border transfer and retention.

Rule 14 Config: officer details and the three timelines. The form rejects a maximum above 90 days.

Rule 14 Config: officer details and the three timelines. The form rejects a maximum above 90 days.

Audit Register: every action with who did it and when, newest first, with CSV export. It cannot be edited or deleted.

Audit Register: every action with who did it and when, newest first, with CSV export. It cannot be edited or deleted.


6. Deployment

1.     Install Docker Desktop on the Windows computer.

2.     Fill in .env: database password, log-appender password, field encryption key, SMTP details.

3.     Generate the database TLS certificate with db/certs/generate_dev_cert.sh.

4.     Run start_app.bat. It starts the three containers and opens both screens.

5.     Run apply_migration.bat for database changes and rebuild_and_restart.bat after code changes.

6.     Create the officer login with scripts/create_fiduciary_user.py and check email with test_email.bat.

7.     Optional: run start_public.bat to open the portal alone over HTTPS, through your own server with Caddy or through a Cloudflare Tunnel.

7. Boundaries

  1. The tool assists and the officer decides. Apart from the acknowledgement timestamp it never approves, rejects, closes, erases or deletes anything on its own.
  2. Out of scope: collecting consent, withdrawal of consent, Consent Manager functions and personal data breach intimation.
  3. It does not publish anything on the business's website. Showing the officer's details inside the portal is not that publication.
  4. It gives no legal advice to its users.