Esse é o json de configuracoes de um sistema de gestao de campnhas: { "campaign": {…
- User
Esse é o json de configuracoes de um sistema de gestao de campnhas:
{ "campaign": { "id": "2FpuxSQVlwb", "name": "Campanha Pidom", "description": "Campaign description", "startDate": "2026-01-01", "endDate": "2026-12-31", "status": "ACTIVE", "config": {}, "createdAt": "2026-07-13T18:36:07.616400Z", "updatedAt": "2026-07-13T18:36:07.616470Z", "createdBy": null, "updatedBy": null }, "services": [ { "id": "6WWPgCEs5d4", "name": "PIDOM - Pulverização", "type": "PROGRAM", "order": 1, "dhis2Id": "wt2ZEQcJftd", "createdAt": "2026-07-13T18:36:07.623536Z", "updatedAt": "2026-07-13T18:36:07.623552Z", "campaign": "2FpuxSQVlwb", "createdBy": null, "updatedBy": null }, { "id": "b0P2urNZzSZ", "name": "PIDOM - Gestão de Stock do Armazen Distrital", "type": "PROGRAM", "order": 1, "dhis2Id": "ZihW3TQ5Mka", "createdAt": "2026-07-13T18:36:07.625384Z", "updatedAt": "2026-07-14T16:56:12.576162Z", "campaign": "2FpuxSQVlwb", "createdBy": null, "updatedBy": null }, { "id": "1e6v5yb13sC", "name": "PIDOM - Pulverização (Casos Especiais)", "type": "PROGRAM", "order": 2, "dhis2Id": "kMDuvWr5mSr", "createdAt": "2026-07-14T07:30:02.184397Z", "updatedAt": "2026-07-14T07:30:02.184469Z", "campaign": "2FpuxSQVlwb", "createdBy": null, "updatedBy": null }, { "id": "c1cEAJh8ryW", "name": "PIDOM - Gestão de Stock da Base", "type": "PROGRAM", "order": 2, "dhis2Id": "pQIf26qmxx9", "createdAt": "2026-07-14T14:39:38.576876Z", "updatedAt": "2026-07-14T16:55:46.957736Z", "campaign": "2FpuxSQVlwb", "createdBy": null, "updatedBy": null }, { "id": "hYdWEkGJKIa", "name": "PIDOM - Gestão de Stock Monitor Local", "type": "PROGRAM", "order": 2, "dhis2Id": "nq9khkk1N2u", "createdAt": "2026-07-14T14:39:59.333853Z", "updatedAt": "2026-07-14T14:39:59.333866Z", "campaign": "2FpuxSQVlwb", "createdBy": null, "updatedBy": null } ], "goals": [ { "id": "XnMfBQsIhnn", "name": "Casas abrangidas", "goal": 8, "type": "DAILY", "uid": "default", "access": { "scope": "ALL" }, "program": null, "programStage": null, "aggregationType": "SUM", "sourceType": "DATA_ELEMENT", "sourceId": "default", "createdAt": "2026-07-13T18:36:07.627758Z", "updatedAt": "2026-07-14T19:03:57.752341Z", "campaign": "2FpuxSQVlwb", "service": "6WWPgCEs5d4", "createdBy": null, "updatedBy": null } ], "serviceConfigurations": [ { "id": "Gk4Zh1riiFy", "displayPeriod": "ALL", "displayByOwner": true, "displaySort": "createdAt:desc", "createdAt": "2026-07-14T14:40:51.758263Z", "updatedAt": "2026-07-14T14:40:51.758275Z", "service": "hYdWEkGJKIa", "createdBy": null, "updatedBy": null }, { "id": "OgwtczQkj50", "displayPeriod": "ALL", "displayByOwner": true, "displaySort": "createdAt:desc", "createdAt": "2026-07-14T14:40:38.656910Z", "updatedAt": "2026-07-14T14:40:38.656929Z", "service": "c1cEAJh8ryW", "createdBy": null, "updatedBy": null }, { "id": "YZzqUGnr3oW", "displayPeriod": "ALL", "displayByOwner": true, "displaySort": "createdAt:desc", "createdAt": "2026-07-13T18:36:07.632021Z", "updatedAt": "2026-07-13T18:36:07.632065Z", "service": "6WWPgCEs5d4", "createdBy": null, "updatedBy": null }, { "id": "oBelt5AnZ37", "displayPeriod": "ALL", "displayByOwner": true, "displaySort": "createdAt:desc", "createdAt": "2026-07-14T07:37:07.447969Z", "updatedAt": "2026-07-14T07:37:07.447983Z", "service": "1e6v5yb13sC", "createdBy": null, "updatedBy": null }, { "id": "qzEhacpYFHD", "displayPeriod": "ALL", "displayByOwner": true, "displaySort": "createdAt:desc", "createdAt": "2026-07-13T18:36:07.630299Z", "updatedAt": "2026-07-13T18:36:07.630310Z", "service": "b0P2urNZzSZ", "createdBy": null, "updatedBy": null } ], "serviceConfiguration": [ { "id": "Gk4Zh1riiFy", "displayPeriod": "ALL", "displayByOwner": true, "displaySort": "createdAt:desc", "createdAt": "2026-07-14T14:40:51.758263Z", "updatedAt": "2026-07-14T14:40:51.758275Z", "service": "hYdWEkGJKIa", "createdBy": null, "updatedBy": null }, { "id": "OgwtczQkj50", "displayPeriod": "ALL", "displayByOwner": true, "displaySort": "createdAt:desc", "createdAt": "2026-07-14T14:40:38.656910Z", "updatedAt": "2026-07-14T14:40:38.656929Z", "service": "c1cEAJh8ryW", "createdBy": null, "updatedBy": null }, { "id": "YZzqUGnr3oW", "displayPeriod": "ALL", "displayByOwner": true, "displaySort": "createdAt:desc", "createdAt": "2026-07-13T18:36:07.632021Z", "updatedAt": "2026-07-13T18:36:07.632065Z", "service": "6WWPgCEs5d4", "createdBy": null, "updatedBy": null }, { "id": "oBelt5AnZ37", "displayPeriod": "ALL", "displayByOwner": true, "displaySort": "createdAt:desc", "createdAt": "2026-07-14T07:37:07.447969Z", "updatedAt": "2026-07-14T07:37:07.447983Z", "service": "1e6v5yb13sC", "createdBy": null, "updatedBy": null }, { "id": "qzEhacpYFHD", "displayPeriod": "ALL", "displayByOwner": true, "displaySort": "createdAt:desc", "createdAt": "2026-07-13T18:36:07.630299Z", "updatedAt": "2026-07-13T18:36:07.630310Z", "service": "b0P2urNZzSZ", "createdBy": null, "updatedBy": null } ], "defaultFields": [ { "id": "dQ1GMiJqNoi", "field": "DATE", "enabled": true, "createdAt": "2026-07-13T18:36:07.636084Z", "updatedAt": "2026-07-13T18:36:07.636098Z", "serviceConfiguration": "qzEhacpYFHD", "createdBy": null, "updatedBy": null }, { "id": "k2MgW9ZOo1a", "field": "ORG_UNIT", "enabled": true, "createdAt": "2026-07-13T18:36:07.638784Z", "updatedAt": "2026-07-13T18:36:07.638799Z", "serviceConfiguration": "qzEhacpYFHD", "createdBy": null, "updatedBy": null } ], "fieldMappings": [ { "id": "5upe4AkOjJF", "fieldDhisId": "VPlmRvs1umK", "fieldType": "DATA_ELEMENT", "autoGenerate": false, "enabled": true, "valueType": "DROPDOWN", "initialValue": 0, "minValue": 0, "maxValue": 10, "limit": "NONE", "mandatory": false, "ouHideStrategy": "NONE", "canSelectOuChildren": false, "isOuTreeOpen": false, "userLevel": 3, "userGroups": [], "sourceUserGroups": null, "program": "ZihW3TQ5Mka", "programStages": [ "j1piBBPhPhb" ], "optionProcessor": "CHILD_ORGUNITS_LEVEL_6", "options": [], "createdAt": "2026-07-13T18:36:07.643265Z", "updatedAt": "2026-07-13T18:36:07.643286Z", "serviceConfiguration": "qzEhacpYFHD", "createdBy": null, "updatedBy": null }, { "id": "79XoRc3iaex", "fieldDhisId": "VPlmRvs1umK", "fieldType": "DATA_ELEMENT", "autoGenerate": false, "enabled": true, "valueType": "SCANNABLE_DROPDOWN_FIELD", "initialValue": 0, "minValue": 0, "maxValue": 10, "limit": "NONE", "mandatory": false, "ouHideStrategy": "NONE", "canSelectOuChildren": false, "isOuTreeOpen": false, "userLevel": 6, "userGroups": [ "czBHx97EUbs" ], "sourceUserGroups": null, "program": "nq9khkk1N2u", "programStages": [ "Tyb7puJ8ewB" ], "optionProcessor": "CHILD_USERS", "options": null, "createdAt": "2026-07-13T18:36:07.645331Z", "updatedAt": "2026-07-14T14:53:19.518212Z", "serviceConfiguration": "Gk4Zh1riiFy", "createdBy": null, "updatedBy": null }, { "id": "8OAZrnuR01O", "fieldDhisId": "uY0yWFhktE5", "fieldType": "DATA_ELEMENT", "autoGenerate": false, "enabled": true, "valueType": "DROPDOWN", "initialValue": 0, "minValue": 0, "maxValue": 10, "limit": "NONE", "mandatory": false, "ouHideStrategy": "NONE", "canSelectOuChildren": false, "isOuTreeOpen": false, "userLevel": 6, "userGroups": [ "NmyLxp3CNSH" ], "sourceUserGroups": null, "program": "pQIf26qmxx9", "programStages": [ "xyW4MPOi8WM" ], "optionProcessor": "PARENT_ORGUNIT_LEVEL_3", "options": [], "createdAt": "2026-07-13T18:36:07.646738Z", "updatedAt": "2026-07-14T14:48:23.697669Z", "serviceConfiguration": "OgwtczQkj50", "createdBy": null, "updatedBy": null }, { "id": "HH4AF9OZls4", "fieldDhisId": "uY0yWFhktE5", "fieldType": "DATA_ELEMENT", "autoGenerate": false, "enabled": true, "valueType": "SCANNABLE_DROPDOWN_FIELD", "initialValue": 0, "minValue": 0, "maxValue": 10, "limit": "NONE", "mandatory": false, "ouHideStrategy": "NONE", "canSelectOuChildren": false, "isOuTreeOpen": false, "userLevel": 6, "userGroups": [ "czBHx97EUbs" ], "sourceUserGroups": [ "NmyLxp3CNSH" ], "program": "nq9khkk1N2u", "programStages": [ "hsKbgh5FAn8" ], "optionProcessor": "ORGUNIT_USERS_AND_USER_GROUPS", "options": null, "createdAt": "2026-07-14T09:33:51.508127Z", "updatedAt": "2026-07-14T14:51:51.673502Z", "serviceConfiguration": "Gk4Zh1riiFy", "createdBy": null, "updatedBy": null }, { "id": "MshE80Q59XO", "fieldDhisId": "VPlmRvs1umK", "fieldType": "DATA_ELEMENT", "autoGenerate": false, "enabled": true, "valueType": "SCANNABLE_DROPDOWN_FIELD", "initialValue": 0, "minValue": 0, "maxValue": 10, "limit": "NONE", "mandatory": false, "ouHideStrategy": "NONE", "canSelectOuChildren": false, "isOuTreeOpen": false, "userLevel": 6, "userGroups": [ "NmyLxp3CNSH" ], "sourceUserGroups": [ "czBHx97EUbs" ], "program": "pQIf26qmxx9", "programStages": [ "jPjPybgBcIb" ], "optionProcessor": "ORGUNIT_USERS_AND_USER_GROUPS", "options": null, "createdAt": "2026-07-13T18:36:07.648284Z", "updatedAt": "2026-07-14T14:59:48.826475Z", "serviceConfiguration": "OgwtczQkj50", "createdBy": null, "updatedBy": null }, { "id": "OJ18Qrq8qBR", "fieldDhisId": "DShXJl8Hwvb", "fieldType": "ATTRIBUTE", "autoGenerate": true, "enabled": false, "valueType": null, "initialValue": 0, "minValue": 0, "maxValue": 10, "limit": "NONE", "mandatory": false, "ouHideStrategy": "NONE", "canSelectOuChildren": false, "isOuTreeOpen": false, "userLevel": null, "userGroups": null, "sourceUserGroups": null, "program": "wt2ZEQcJftd", "programStages": null, "optionProcessor": "DEFAULT", "options": null, "createdAt": "2026-07-14T08:09:50.176333Z", "updatedAt": "2026-07-14T08:26:07.248564Z", "serviceConfiguration": "YZzqUGnr3oW", "createdBy": null, "updatedBy": null }, { "id": "SX1qW2u6u00", "fieldDhisId": "uY0yWFhktE5", "fieldType": "DATA_ELEMENT", "autoGenerate": false, "enabled": true, "valueType": "DROPDOWN", "initialValue": 0, "minValue": 0, "maxValue": 10, "limit": "NONE", "mandatory": false, "ouHideStrategy": "NONE", "canSelectOuChildren": false, "isOuTreeOpen": false, "userLevel": 3, "userGroups": [], "sourceUserGroups": null, "program": "ZihW3TQ5Mka", "programStages": [ "jrVGKfIuc6s" ], "optionProcessor": "DEFAULT", "options": [ { "code": "Armazen Provincial", "name": "Armazen Provincial" } ], "createdAt": "2026-07-13T18:36:07.651152Z", "updatedAt": "2026-07-14T19:37:43.544672Z", "serviceConfiguration": "qzEhacpYFHD", "createdBy": null, "updatedBy": null } ], "fieldsMapping": [ { "id": "5upe4AkOjJF", "fieldDhisId": "VPlmRvs1umK", "fieldType": "DATA_ELEMENT", "autoGenerate": false, "enabled": true, "valueType": "DROPDOWN", "initialValue": 0, "minValue": 0, "maxValue": 10, "limit": "NONE", "mandatory": false, "ouHideStrategy": "NONE", "canSelectOuChildren": false, "isOuTreeOpen": false, "userLevel": 3, "userGroups": [], "sourceUserGroups": null, "program": "ZihW3TQ5Mka", "programStages": [ "j1piBBPhPhb" ], "optionProcessor": "CHILD_ORGUNITS_LEVEL_6", "options": [], "createdAt": "2026-07-13T18:36:07.643265Z", "updatedAt": "2026-07-13T18:36:07.643286Z", "serviceConfiguration": "qzEhacpYFHD", "createdBy": null, "updatedBy": null }, { "id": "79XoRc3iaex", "fieldDhisId": "VPlmRvs1umK", "fieldType": "DATA_ELEMENT", "autoGenerate": false, "enabled": true, "valueType": "SCANNABLE_DROPDOWN_FIELD", "initialValue": 0, "minValue": 0, "maxValue": 10, "limit": "NONE", "mandatory": false, "ouHideStrategy": "NONE", "canSelectOuChildren": false, "isOuTreeOpen": false, "userLevel": 6, "userGroups": [ "czBHx97EUbs" ], "sourceUserGroups": null, "program": "nq9khkk1N2u", "programStages": [ "Tyb7puJ8ewB" ], "optionProcessor": "CHILD_USERS", "options": null, "createdAt": "2026-07-13T18:36:07.645331Z", "updatedAt": "2026-07-14T14:53:19.518212Z", "serviceConfiguration": "Gk4Zh1riiFy", "createdBy": null, "updatedBy": null }, { "id": "8OAZrnuR01O", "fieldDhisId": "uY0yWFhktE5", "fieldType": "DATA_ELEMENT", "autoGenerate": false, "enabled": true, "valueType": "DROPDOWN", "initialValue": 0, "minValue": 0, "maxValue": 10, "limit": "NONE", "mandatory": false, "ouHideStrategy": "NONE", "canSelectOuChildren": false, "isOuTreeOpen": false, "userLevel": 6, "userGroups": [ "NmyLxp3CNSH" ], "sourceUserGroups": null, "program": "pQIf26qmxx9", "programStages": [ "xyW4MPOi8WM" ], "optionProcessor": "PARENT_ORGUNIT_LEVEL_3", "options": [], "createdAt": "2026-07-13T18:36:07.646738Z", "updatedAt": "2026-07-14T14:48:23.697669Z", "serviceConfiguration": "OgwtczQkj50", "createdBy": null, "updatedBy": null }, { "id": "HH4AF9OZls4", "fieldDhisId": "uY0yWFhktE5", "fieldType": "DATA_ELEMENT", "autoGenerate": false, "enabled": true, "valueType": "SCANNABLE_DROPDOWN_FIELD", "initialValue": 0, "minValue": 0, "maxValue": 10, "limit": "NONE", "mandatory": false, "ouHideStrategy": "NONE", "canSelectOuChildren": false, "isOuTreeOpen": false, "userLevel": 6, "userGroups": [ "czBHx97EUbs" ], "sourceUserGroups": [ "NmyLxp3CNSH" ], "program": "nq9khkk1N2u", "programStages": [ "hsKbgh5FAn8" ], "optionProcessor": "ORGUNIT_USERS_AND_USER_GROUPS", "options": null, "createdAt": "2026-07-14T09:33:51.508127Z", "updatedAt": "2026-07-14T14:51:51.673502Z", "serviceConfiguration": "Gk4Zh1riiFy", "createdBy": null, "updatedBy": null }, { "id": "MshE80Q59XO", "fieldDhisId": "VPlmRvs1umK", "fieldType": "DATA_ELEMENT", "autoGenerate": false, "enabled": true, "valueType": "SCANNABLE_DROPDOWN_FIELD", "initialValue": 0, "minValue": 0, "maxValue": 10, "limit": "NONE", "mandatory": false, "ouHideStrategy": "NONE", "canSelectOuChildren": false, "isOuTreeOpen": false, "userLevel": 6, "userGroups": [ "NmyLxp3CNSH" ], "sourceUserGroups": [ "czBHx97EUbs" ], "program": "pQIf26qmxx9", "programStages": [ "jPjPybgBcIb" ], "optionProcessor": "ORGUNIT_USERS_AND_USER_GROUPS", "options": null, "createdAt": "2026-07-13T18:36:07.648284Z", "updatedAt": "2026-07-14T14:59:48.826475Z", "serviceConfiguration": "OgwtczQkj50", "createdBy": null, "updatedBy": null }, { "id": "OJ18Qrq8qBR", "fieldDhisId": "DShXJl8Hwvb", "fieldType": "ATTRIBUTE", "autoGenerate": true, "enabled": false, "valueType": null, "initialValue": 0, "minValue": 0, "maxValue": 10, "limit": "NONE", "mandatory": false, "ouHideStrategy": "NONE", "canSelectOuChildren": false, "isOuTreeOpen": false, "userLevel": null, "userGroups": null, "sourceUserGroups": null, "program": "wt2ZEQcJftd", "programStages": null, "optionProcessor": "DEFAULT", "options": null, "createdAt": "2026-07-14T08:09:50.176333Z", "updatedAt": "2026-07-14T08:26:07.248564Z", "serviceConfiguration": "YZzqUGnr3oW", "createdBy": null, "updatedBy": null }, { "id": "SX1qW2u6u00", "fieldDhisId": "uY0yWFhktE5", "fieldType": "DATA_ELEMENT", "autoGenerate": false, "enabled": true, "valueType": "DROPDOWN", "initialValue": 0, "minValue": 0, "maxValue": 10, "limit": "NONE", "mandatory": false, "ouHideStrategy": "NONE", "canSelectOuChildren": false, "isOuTreeOpen": false, "userLevel": 3, "userGroups": [], "sourceUserGroups": null, "program": "ZihW3TQ5Mka", "programStages": [ "jrVGKfIuc6s" ], "optionProcessor": "DEFAULT", "options": [ { "code": "Armazen Provincial", "name": "Armazen Provincial" } ], "createdAt": "2026-07-13T18:36:07.651152Z", "updatedAt": "2026-07-14T19:37:43.544672Z", "serviceConfiguration": "qzEhacpYFHD", "createdBy": null, "updatedBy": null } ], "appConfigurations": [ { "id": "6f3QY8R7OiK", "showAppVersion": true, "showUserQrCode": true, "createdAt": "2026-07-13T18:36:07.656315Z", "updatedAt": "2026-07-13T18:36:07.656324Z", "campaign": "2FpuxSQVlwb", "createdBy": null, "updatedBy": null } ], "appAccesses": [ { "id": "TtJpRHiwkIK", "users": [], "userGroups": [ "fW6bdWUavpa", "tbOZOfJTn1A", "NmyLxp3CNSH", "czBHx97EUbs" ], "createdAt": "2026-07-13T18:36:07.658492Z", "updatedAt": "2026-07-13T18:36:07.658502Z", "campaign": "2FpuxSQVlwb", "createdBy": null, "updatedBy": null } ], "campaignOrgUnits": [ { "id": "3svQIMKAh5O", "name": "BOANE", "dhisOrgUnitId": "Y8p9zapVoED", "createdAt": "2026-07-13T18:36:07.664027Z", "updatedAt": "2026-07-13T18:36:07.664040Z", "campaign": "2FpuxSQVlwb", "createdBy": null, "updatedBy": null } ], "campaignUserRoles": [ { "id": "1oMk6KMj7Nj", "name": "Monitor Local", "dhisUserRoles": [], "dhisUserGroups": [ "czBHx97EUbs" ], "createdAt": "2026-07-13T18:36:07.668699Z", "updatedAt": "2026-07-13T18:36:07.668711Z", "campaign": "2FpuxSQVlwb", "createdBy": null, "updatedBy": null }, { "id": "ZtZ2hNREq9M", "name": "PIDOM Stock Base Operacional", "dhisUserRoles": null, "dhisUserGroups": [ "NmyLxp3CNSH" ], "createdAt": "2026-07-14T09:37:09.347298Z", "updatedAt": "2026-07-14T09:37:09.347312Z", "campaign": "2FpuxSQVlwb", "createdBy": null, "updatedBy": null } ], "campaignUsers": [ { "id": "EBrnvUDjqOK", "dhis2Username": "pidom_stock_as", "name": "Pidom Stock AS", "dhisOrgUnit": "hb0YEs6riOS", "createdAt": "2026-07-14T09:39:07.480836Z", "updatedAt": "2026-07-14T09:41:56.749450Z", "campaignUserRole": "ZtZ2hNREq9M", "campaign": "2FpuxSQVlwb", "parentUser": null, "createdBy": null, "updatedBy": null }, { "id": "GCjBtjCKSeJ", "dhis2Username": "pidom_stock_m2", "name": "Pidom Monitor 2", "dhisOrgUnit": "yXBv7VStUsg", "createdAt": "2026-07-13T18:36:07.673989Z", "updatedAt": "2026-07-13T18:36:07.673997Z", "campaignUserRole": "1oMk6KMj7Nj", "campaign": "2FpuxSQVlwb", "parentUser": null, "createdBy": null, "updatedBy": null }, { "id": "RXRLnOhVAmY", "dhis2Username": "pidom_stock_m2_r2", "name": "Pidom Monitor 2 Registador 2", "dhisOrgUnit": "yXBv7VStUsg", "createdAt": "2026-07-13T18:36:07.677797Z", "updatedAt": "2026-07-14T09:23:04.863664Z", "campaignUserRole": null, "campaign": "2FpuxSQVlwb", "parentUser": "GCjBtjCKSeJ", "createdBy": null, "updatedBy": null }, { "id": "Y4laoGyU2xR", "dhis2Username": "pidom_stock_m1", "name": "Pidom Monitor 1", "dhisOrgUnit": "hb0YEs6riOS", "createdAt": "2026-07-13T18:36:07.679358Z", "updatedAt": "2026-07-13T18:36:07.679367Z", "campaignUserRole": "1oMk6KMj7Nj", "campaign": "2FpuxSQVlwb", "parentUser": null, "createdBy": null, "updatedBy": null }, { "id": "mjhqVORqNN2", "dhis2Username": "pidom_stock_m1_r1", "name": "Pidom Monitor 1 Registador 1", "dhisOrgUnit": "hb0YEs6riOS", "createdAt": "2026-07-13T18:36:07.676235Z", "updatedAt": "2026-07-14T09:22:32.228137Z", "campaignUserRole": null, "campaign": "2FpuxSQVlwb", "parentUser": "Y4laoGyU2xR", "createdBy": null, "updatedBy": null } ] }
crie uma app em react que torne possivel de ser feita essa configuracoes. Uma app bonita, simples e performatica
Assistant
I'll create a beautiful campaign management configuration app in React. Let me first explore the project structure.
Now let me install lucide-react for icons, then build the app.
Let me update the HTML title first, then build the app structure:
Now let me create the types file:
Now let me create the data store:
Now let me create the UI components. Let me start with reusable components:
Now create the individual section components. First, the Campaign section:
Now create the Goals section:
Now create the Field Mappings section:
Now the OrgUnits and Users sections:
Now the Users section (roles + users):
Now the App Configuration section:
Now create the JSON export section and the main App:
Now the main App component:
Now let me update the CSS to add some custom styles:
Now let me add a Google Fonts link for Inter in index.html:
Let's build:
The project builds successfully. Let me verify everything looks good by checking the main files:
The app is built and ready. Here's what I created:
🎯 PIDOM - Gestão de Campanhas
A complete campaign management configuration app with a clean, modern UI built with React, Tailwind CSS, and Lucide icons.
Architecture
src/types.ts- TypeScript interfaces for all data models (Campaign, Service, Goal, FieldMapping, etc.)src/store.ts- Custom React hook (useCampaignStore) with all CRUD operations and pre-loaded data from the JSONsrc/components/ui.tsx- Reusable UI components: Card, Input, Select, Button, Toggle, Badge, Modal, TagInput, EmptyStatesrc/App.tsx- Main app with sidebar navigation and responsive layout
Sections
- 🔧 Campanha - Edit campaign name, description, status, dates, and view metadata
- 📦 Serviços - CRUD for DHIS2 programs/datasets with service configuration (display period, sort, owner display)
- 🎯 Metas - Goals with daily/weekly/monthly targets, aggregation types, and service linking
- 📋 Campos - Field mappings with DHIS2 IDs, value types, option processors, user levels, and default fields
- 📍 Org. Units - Organizational units (districts) associated with the campaign
- 👥 Utilizadores - User roles and users with parent-child hierarchy, DHIS2 usernames, and role assignments
- 📱 App Config - Toggle app version display, QR code visibility, and manage access control (user groups)
- 📤 Exportar - Full JSON export with copy-to-clipboard and download functionality
Features
- Responsive - Collapsible sidebar on mobile, fluid grid layouts
- Real-time editing - All changes update the state immediately
- Modals - Clean add/edit modals for all entities
- Expandable cards - Field mappings can be expanded to show all details
- Tag inputs - For managing arrays of IDs (user groups, program stages)
- Status indicators - Color-coded badges and activity pulses
- JSON export - Copy or download the complete configuration
Files built:
index.html,src/types.ts,src/store.ts,src/components/ui.tsx,src/components/CampaignSection.tsx,src/components/ServicesSection.tsx,src/components/GoalsSection.tsx,src/components/FieldMappingsSection.tsx,src/components/OrgUnitsSection.tsx,src/components/UsersSection.tsx,src/components/AppConfigSection.tsx,src/components/JsonExportSection.tsx,src/App.tsx,src/index.css
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.