https://github.com/stats4sd/holpa-platform
Data Platform for the HOLPA tool
https://github.com/stats4sd/holpa-platform
Last synced: 8 months ago
JSON representation
Data Platform for the HOLPA tool
- Host: GitHub
- URL: https://github.com/stats4sd/holpa-platform
- Owner: stats4sd
- Created: 2024-09-09T10:40:12.000Z (almost 2 years ago)
- Default Branch: dev
- Last Pushed: 2025-02-20T13:00:50.000Z (over 1 year ago)
- Last Synced: 2025-02-20T14:21:31.603Z (over 1 year ago)
- Language: PHP
- Size: 12.3 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 29
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# HOLPA Platform
## Setup
- clone this repo
- inside the cloned repo folder, run:
- `composer install`
- `npm install`
- create your local .env file:
- `cp .env.example .env`
- update the DB_* variables, the APP_URL variables.
- make sure the ODK_* variables are set so the system can connect to an ODK Central server.
## Development
There are 3 ways to set up your environment for local development. The intention is that, at any time, you can reset your local database and environment to one of these 3 pre-configured setups:
### Default; no specific ODK Database Link
This setup will give you a clean database, with 3 teams (linked to new ODK Central projects, if you have the `ODK_*` .env variables required ), and no XlsformTemplate entries.
To create:
- `php artisan migrate:fresh --seed`.
### Setup with Mini Test Forms
This setup will give you 3 teams, all linked to the following ODK Projects on our ODK Staging site:
- 2025 - HOLPA Data Platform LOCAL- P1 Test Team: https://odk-test.stats4sdtest.online/#/projects/1447
- 2025-HOLPA Data Platform LOCAL- P1 Test Team 2: https://odk-test.stats4sdtest.online/#/projects/1448
- 2025-TEST - HOLPA Data Platform LOCAL- Non Program Test Team: https://odk-test.stats4sdtest.online/#/projects/1449
Each team has 2 "mini" forms, which have the required parts to be compatible with the existing HOLPA localisation setup, and very little else.
To create:
1. Make sure you have `ODK_PLATFORM_PROJECT_ID=1390` in your .env file.
2. Run the following:
```
php artisan migrate:fresh --seed
php artisan db:seed TestWithMiniForms
# run custom script to copy the media file assets into the storage/app folder
php artisan app:copy-media-test
# run custom command to update your xlsform_versions table,
# just in case the versions on ODK Central have been changed since the seeder was created.
php artisan app:update-xlsform-versions-from-odk-central
```
### Setup with Real HOLPA Forms
This setup will give you 3 teams, all linked to the following ODK Projects on our ODK Staging site:
- HOLPA Real Forms - Local Test Team 1: https://odk-test.stats4sdtest.online/#/projects/2728
- HOLPA Real Forms - Local Test Team 2 : https://odk-test.stats4sdtest.online/#/projects/2729
- HOLPA Real Forms - Local Non-Program Test Team: https://odk-test.stats4sdtest.online/#/projects/2730
Each team has copies of the 2 real HOLPA forms, which have the required parts to be compatible with the existing HOLPA localisation setup, and very little else.
To create:
1. Make sure you have `ODK_PLATFORM_PROJECT_ID=1654` in your .env file.
2. Run the following:
```
php artisan migrate:fresh --seed
php artisan db:seed TestWithRealForms
# run custom script to copy the media file assets into the storage/app folder
php artisan app:copy-media-real
# run custom command to update your xlsform_versions table,
# just in case the versions on ODK Central have been changed since the seeder was created.
php artisan app:update-xlsform-versions-from-odk-central
```